promptz.dev MCP Server

by cremich
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Offers JavaScript-specific prompts from promptz.dev, including content related to JavaScript development that can be accessed and used directly without copy-pasting.

  • Integrates with npm through the npx command for easy installation and usage of the MCP server without requiring local installation.

  • Provides access to React-focused prompts from promptz.dev, such as 'React Component Generator' for creating React components and 'React Component Documentation' for improving documentation.

promptz.dev MCP 服务器

直接从您的 AI 助手访问来自 promptz.dev 的提示。

此 MCP 服务器允许从 promptz.dev API 访问提示而无需复制粘贴,从而减少开发工作流程中的上下文切换和摩擦。

特征

promptz.dev MCP 服务器提供两项主要功能:

  1. 工具- 允许 AI 助手与 promptz.dev API 交互的可执行函数
  2. 提示- 直接访问提示作为 MCP 提示模板

工具和提示 API

工具

服务器通过 MCP 协议公开以下工具:

list_prompts

列出 promptz.dev 平台可用的提示。

输入模式:

{ "type": "object", "properties": { "cursor": { "type": "string", "description": "Pagination token for fetching the next set of results" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Filter prompts by tags (e.g. ['CLI', 'JavaScript'])" } } }

示例用法:

// List all prompts list_prompts() // List prompts with pagination list_prompts({ "cursor": "next-page-token" }) // Filter prompts by tags list_prompts({ "tags": ["JavaScript", "CLI"] })

响应格式:

{ "prompts": [ { "name": "React Component Generator", "description": "Generates React components based on specifications", "tags": ["React", "JavaScript", "Frontend"] } // More prompts... ], "nextCursor": "optional-pagination-token" }

get_prompt

按名称检索特定提示。

输入模式:

{ "type": "object", "properties": { "name": { "type": "string", "description": "Name of the prompt to retrieve" } }, "required": ["name"] }

示例用法:

get_prompt({ "name": "React Component Generator" })

响应格式:

{ "name": "React Component Generator", "description": "Generates React components based on specifications", "instruction": "Create a React component that...", "tags": ["React", "JavaScript", "Frontend"] }

提示 API

该服务器还实现了 MCP Prompts 功能,允许 AI 助手直接访问提示作为模板:

  • 列出提示:以 MCP 提示模板格式返回可用的提示
  • 获取提示:返回特定提示作为 MCP 提示模板,可供 AI 助手直接使用

安装

步骤 1:获取 API 凭证

  1. 导航至https://promptz.dev/mcp
  2. 复制 MCP 设置,如 API 密钥、API URL 或示例 MCP 配置片段。

步骤 2:安装 MCP 服务器

选项 1:使用 npx(推荐)

使用服务器的最简单方法是使用 npx,它不需要安装:

  1. 将以下配置添加到您的 MCP 客户端的设置文件:
{ "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": [] } } }

选项 2:本地安装

  1. 克隆存储库:
git clone https://github.com/cremich/promptz-mcp.git cd promptz-mcp
  1. 安装依赖项并构建:
npm install npm run build
  1. 将以下配置添加到您的 MCP 客户端的设置文件:
{ "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": [] } } }

步骤 3:配置您的 MCP 客户端

克劳德桌面

将服务器配置添加到 Claude Desktop 配置文件:

  • MacOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%/Claude/claude_desktop_config.json

如果该文件不存在,请使用以下内容创建它:

{ "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": [] } } }

其他 MCP 客户端

对于其他 MCP 客户端,请参阅其文档以了解如何配置 MCP 服务器。

故障排除

如果您遇到服务器问题:

  1. 检查您的 API 凭证是否正确
  2. 确保服务器在 MCP 客户端中正确配置
  3. 在日志中查找错误消息
  4. 使用 MCP Inspector 进行调试:
# Run with environment variables PROMPTZ_API_URL="your-api-url" PROMPTZ_API_KEY="your-api-key" npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

发展

对于那些想要贡献或修改服务器的人:

# Install dependencies npm install # Build the server npm run build # For development with auto-rebuild npm run watch # Run tests npm test

示例用法

一旦服务器连接到您的 MCP 客户端,您就可以使用自然语言:

  • “列出来自 promptz.dev 的可用提示”
  • “搜索有关 JavaScript 的 CLI 提示”
  • “向我显示名为‘React 组件文档’的提示”
  • “使用 React 组件文档提示来改进我的文档”

安全注意事项

  • 该服务器仅提供对提示的读取权限,不执行任何写入操作
  • API 凭证存储在您的 MCP 客户端的配置文件中
  • 与 promptz.dev API 的所有通信均通过 HTTPS 完成
  • 服务器记录到您的主目录中的文件(~/.promptz/logs/mcp-server.log)
-
security - not tested
F
license - not found
-
quality - not tested

允许 AI 助手访问来自 promptz.dev API 的提示而无需复制粘贴,从而减少开发工作流程中的上下文切换。

  1. Features
    1. Tools and Prompts API
      1. Tools
      2. Prompts API
    2. Installation
      1. Step 1: Get API Credentials
      2. Step 2: Install the MCP Server
      3. Step 3: Configure Your MCP Client
      4. Troubleshooting
    3. Development
      1. Example Usage
        1. Security Considerations
          ID: 6esunzjyfa