PromptX MCP 快速上手
启动服务器
本地模式(推荐)
npx -f -y dpml-prompt@snapshot mcp-server
HTTP 模式(远程访问)
npx -f -y dpml-prompt@snapshot mcp-server --transport http --port 3000
检查服务器状态:
curl http://localhost:3000/health
客户端配置
Claude Desktop(仅本地模式)
配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{"mcpServers": {"promptx": {"command": "npx","args": ["-f", "-y", "dpml-prompt@snapshot", "mcp-server"]}}}
VS Code
创建 .vscode/mcp.json:
本地模式:
{"servers": {"promptx": {"command": "npx","args": ["-f", "-y", "dpml-prompt@snapshot", "mcp-server"]}}}
HTTP 模式:
{"servers": {"promptx": {"type": "http","url": "http://localhost:3000/mcp"}}}
Cursor
本地模式:
{"mcpServers": {"promptx": {"command": "npx","args": ["-f", "-y", "dpml-prompt@snapshot", "mcp-server"]}}}
HTTP 模式:
{"mcpServers": {"promptx": {"url": "http://localhost:3000/mcp"}}}
LibreChat
编辑 librechat.yaml:
本地模式:
mcpServers:promptx:command: npxargs:- -f- -y- dpml-prompt@snapshot- mcp-server
HTTP 模式:
mcpServers:promptx:type: streamable-httpurl: http://localhost:3000/mcp
测试工具
重启客户端后,尝试使用以下工具:
promptx_hello- 查看可用角色promptx_action- 激活角色(需要参数:role)promptx_learn- 学习资源(需要参数:resource)promptx_recall- 查看记忆promptx_remember- 保存记忆(需要参数:content)
故障排除
服务器启动失败:
- 检查 Node.js 版本:
node --version(需要 >= 14) - 确认网络连接正常(npx 需要下载包)
客户端连接失败:
- 检查配置文件 JSON/YAML 语法
- 重启客户端应用
- 确认 npx 可以运行:
npx -f -y dpml-prompt@snapshot --help
HTTP 模式报错:
- 确认服务器正在运行
- 检查防火墙设置
- 使用
curl测试连接
