MCP 专家服务器
模型上下文协议服务器,使用 Claude AI 提供智能查询生成和文档辅助。该服务器会分析您的 API 文档并提供两个主要工具:
create-query :根据自然语言请求生成查询
文档:根据问题提供相关文档信息
先决条件
Node.js >= 18
Claude 的 Anthropic API 密钥
安装
克隆存储库
安装依赖项:
使用您的 Anthropic API 密钥创建一个
.env文件:
设置
在运行服务器之前,您需要:
构建项目并运行安装脚本:
这将:
创建所需的目录(
docs/和prompts/)创建默认提示文件
生成初始服务描述
将您的 API 文档文件添加到
docs/目录(支持.txt、.md和.json文件)可选择在
prompts/目录中自定义提示:system-prompt.txt:Claude 的主系统提示tool-metadata.txt:工具描述的附加上下文query-metadata.txt:查询生成的附加上下文service-description.txt:自动生成的服务描述
用法
独立服务器
启动服务器:
服务器通过模型上下文协议公开两个工具:
create-query :根据自然语言请求生成查询
{ "name": "create-query", "arguments": { "request": "Find all users who signed up in the last week" } }文档:从文档中获取信息
{ "name": "documentation", "arguments": { "request": "How do I authenticate API requests?" } }
Claude 桌面集成
将此配置添加到您的 Claude Desktop 配置文件:
将
/ABSOLUTE/PATH/TO/expert-server替换为服务器安装的实际绝对路径。重新启动 Claude Desktop。
目录结构
发展
构建项目:
服务器使用 TypeScript 并遵循模块化架构
所有 Claude 交互均由 ExpertService 类处理
调试日志以 [DEBUG] 前缀写入 stderr
故障排除
如果遇到连接问题:
确保您已运行安装脚本:
检查
prompts/目录中是否存在所有必需的文件验证您的
ANTHROPIC_API_KEY是否设置正确在 Claude Desktop 配置中使用绝对路径
检查调试日志(写入 stderr)
环境变量
ANTHROPIC_API_KEY:您的 Anthropic API 密钥(必需)
执照
麻省理工学院
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器利用 Claude AI 生成智能查询并根据 API 文档分析提供文档帮助。
Related Resources
Related MCP Servers
- -security-license-qualityA comprehensive suite of Model Context Protocol servers designed to extend AI agent Claude's capabilities with integrations for knowledge management, reasoning, advanced search, news access, and workspace tools.Last updated -5
- Asecurity-licenseAqualityA Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.Last updated -2540MIT License
- Asecurity-licenseAqualityA Model Context Protocol server implementation that enables AI assistants like Claude to perform Google searches and retrieve web data directly through natural language requests.Last updated -119453MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that enables AI assistants like Claude to interact with microCMS content management system through six core tools for performing CRUD operations on microCMS list-type APIs.Last updated -1015416MIT License