NextMCP文档服务器
> 一个MCP服务器,帮助编码助手理解并使用NextMCP进行构建
概述
此MCP服务器为使用NextMCP构建MCP服务器提供了全面的文档、示例和指导。它旨在帮助AI编码助手快速理解NextMCP概念并生成正确的代码。
特性
🔧 工具(5)
- 搜索文档:在NextMCP文档中搜索相关文章
- get_full_doc:获取特定主题的完整文档
- 列表_类别:列出所有文档类别
- get_example_code:获取常见模式的代码示例
📝 提示(3)
- build_server_prompt:生成构建新MCP服务器的工作流
- debug_prompt:获取常见问题的调试步骤
- learn_prompt:为NextMCP主题创建个性化学习路径
📚 资源(3)
- docs://stats:服务器统计信息和可用文档
- docs://{doc_id}:通过ID访问特定文档
- 示例://{示例名}:访问代码示例作为资源
文件覆盖范围
- 入门指南:安装、快速入门、基础知识
- 核心图元:工具、提示、资源
- 认证:API密钥、JWT、RBAC
- 中间件:请求/响应拦截器
- 部署:Docker、云平台、生产设置
- 例子:常见模式的代码示例
快速开始
地方发展```bash
Clone repository
git clone https://github.com/KeshavVarad/nextmcp-docs-server.git
cd nextmcp-docs-server
Install dependencies
pip install -r requirements.txt
Run server
python app.py
服务器将于启动 `http://localhost:8000`
### 码头工人```bash
# Build image
docker build -t nextmcp-docs-server .
# Run container
docker run -p 8000:8000 nextmcp-docs-server
部署到导管```bash
Prerequisites: Conduit account and project
Create project in Conduit dashboard
- Name: NextMCP Docs Server
- Git URL: https://github.com/KeshavVarad/nextmcp-docs-server
- Branch: main
Deploy via dashboard or CLI
conduit deploy
## 用法示例
### 搜索文档```python
# Tool call
search_documentation(query="authentication")
# Returns articles about API keys, JWT, RBAC, etc.
获取示例代码```python
Tool call
get_example_code(example_name="simple-tool")
Returns complete code example with explanation
### 构建服务器工作流```python
# Prompt call
build_server_prompt(
server_type="tool-based",
features="auth,metrics"
)
# Returns step-by-step guide for building the server
访问文档资源```
Resource URI
docs://deployment
Returns full deployment documentation
## API终点
- `GET /health` -健康检查(退货 `{"status": "healthy"}`)
- `POST /mcp` -MCP协议端点(JSON-RPC 2.0)
## 环境变量
- `PORT` -服务器端口(默认值:8000)
- `HOST` -服务器主机(默认值:0.0.0.0)
- `LOG_LEVEL` -日志记录级别(默认值:INFO)
## 发展
### 项目结构```
nextmcp-docs-server/
├── app.py # Main server code
├── requirements.txt # Python dependencies
├── Dockerfile # Container image definition
└── README.md # This file
添加文档
要添加新的文档文章,请编辑 DOCS 字典在 app.py:```python
DOCS["new-topic"] = {
"title": "New Topic Title",
"content": "Documentation content...",
"category": "guide",
"tags": ["tag1", "tag2"],
}
### 测试```bash
# Test locally
python app.py
# In another terminal, test with curl
curl http://localhost:8000/health
# Test MCP protocol
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/list",
"params": {},
"id": 1
}'
用例
适用于AI编码助理
此服务器帮助AI助手:
- 了解NextMCP架构和模式
- 生成正确的MCP服务器代码
- 提供调试指导
- 访问最新文档
- 学习最佳实践
面向开发者
- NextMCP API快速参考
- 常见模式的示例代码
- 部署指南
- 故障排除帮助
贡献
欢迎投稿!要添加文档,请执行以下操作:
- 分叉存储库
- 将文档添加到
DOCS词典 - 本地测试
- 提交拉取请求
许可证
MIT许可证-有关详细信息,请参阅许可证文件
链接
- 下一个MCP框架
- 模型上下文协议
- MCP规范
支持
对于问题或疑问:
- GitHub问题:https://github.com/KeshavVarad/nextmcp-docs-server/issues
- 下一篇MCP讨论:https://github.com/KeshavVarad/NextMCP/discussions
