CP

cremich/promptz-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 5 forks 质量 61 趋势 12MIT-0

MCP Server implementation for promptz.dev

概览

Access prompts from promptz.dev directly within Amazon Q Developer. This MCP server allows to access prompts from the promptz.dev API without copy-pasting, reducing context switching and friction in your development workflow. The promptz.dev MCP Server provides two main capabilities: 1. - Executable functions to search and execute prompts. 2. - Executable functions to search for project rules and by integrating with other tools adding/updating them in your workspace. Once the server is connected to Amazon Q Developer, you can use it with natural language like: - "Search for CLI prompts about JavaScript" - "Show me the prompt called 'React Component Documentation'" - "Use the React Component Documentation prompt to improve my documentation" - "Find project rules for CDK Development" - "Add the CDK Project Structure project rule to my workspace" 1. Navigate to https://promptz.dev/mcp 2. Copy the MCP settings like API Key, API URL or the sample MCP configuration snippet.

README

以下为原文 README 节选,完整内容请查看原文。

promptz.dev MCP Server

Access prompts from promptz.dev directly within Amazon Q Developer.

This MCP server allows to access prompts from the promptz.dev API without copy-pasting, reducing context switching and friction in your development workflow.

Features

The promptz.dev MCP Server provides two main capabilities:

  1. Prompts - Executable functions to search and execute prompts.
  2. Rules - Executable functions to search for project rules and by integrating with other tools adding/updating them in your workspace.

Example Usage

Once the server is connected to Amazon Q Developer, you can use it with natural language like:

  • “Search for CLI prompts about JavaScript”
  • “Show me the prompt called ‘React Component Documentation’”
  • “Use the React Component Documentation prompt to improve my documentation”
  • “Find project rules for CDK Development”
  • “Add the CDK Project Structure project rule to my workspace”

Installation

Step 1: Get API Credentials

  1. Navigate to https://promptz.dev/mcp
  2. Copy the MCP settings like API Key, API URL or the sample MCP configuration snippet.

Step 2: Install the MCP Server

Open the Amazon Q Developer MCP client settings file located at ~/.aws/amazonq/mcp.json

The easiest way to use the server is with npx, which doesn’t require installation:

  1. Add the following configuration to your Amazon Q Developer MCP client’s settings file:
{
  "mcpServers": {
    "promptz.dev": {
      "command": "npx",
      "args": ["-y", "@promptz/mcp"],
      "env": {
        "PROMPTZ_API_URL": "your-api-url-from-promptz.dev",
        "PROMPTZ_API_KEY": "your-api-key-from-promptz.dev"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Option 2: Local Installation

  1. Clone the repository:
git clone https://github.com/cremich/promptz-mcp.git
cd promptz-mcp
  1. Install dependencies and build:
npm install
npm run build
  1. Add the following configuration to your MCP client’s settings file:
{
  "mcpServers": {
    "promptz.dev": {
      "command": "node",
      "args": ["/path/to/promptz-mcp/build/index.js"],
      "env": {
        "PROMPTZ_API_URL": "your-api-url-from-promptz.dev",
        "PROMPTZ_API_KEY": "your-api-key-from-promptz.dev"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Troubleshooting

If you encounter issues with the server:

  1. Check that your API credentials are correct
  2. Ensure the server is properly configured in your MCP client
  3. Look for error messages in the logs located ad ~/.promptz/logs/mcp-server.log
  4. Use the MCP Inspector for debugging:
# Run with environment variables
PROMPTZ_API_URL="your-api-url" PROMPTZ_API_KEY="your-api-key" npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Development

在 GitHub 查看完整 README

安装

npx -y @promptz/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "promptz.dev": { "command": "npx", "args": ["-y", "@promptz/mcp"], "env": { "PROMPTZ_API_URL": "your-api-url-from-promptz.dev", "PROMPTZ_API_KEY": "your-api-key-from-promptz.dev" }, "disabled": false, "autoApprove": [] } } }