
MCP Documentation Server

2025.04.01
1
Python文档服务LLM集成开发效率
MCP Documentation Server 是一个定制化的文档服务器,旨在通过模型上下文协议(Model Context Protocol)为LLM应用程序(如Cursor、Claude Desktop、Windsurf等)与文档源提供集成服务。它允许访问特定的文档文件(如langgraph.txt和mcp.txt),并提供了从这些文件中的URL获取文档的工具。
View on GitHub
Overview
基本能力
产品定位
MCP Documentation Server 是一个专注于为LLM应用程序提供文档访问和集成的服务。
核心功能
- 访问特定的文档文件(langgraph.txt和mcp.txt)。
- 提供工具从文档文件中的URL获取文档。
- 支持LangGraph和MCP文档的集成。
适用场景
- 开发者在LLM应用程序中需要快速访问和集成特定文档时。
- 需要从文档文件中的URL动态获取文档内容的场景。
- 在IDE(如Cursor)中集成文档服务以提高开发效率。
工具列表
list_doc_sources
:获取可用的文档文件列表。fetch_docs
:读取langgraph.txt或mcp.txt文件,并从其中的URL获取文档内容。
常见问题解答
- 如何确保安全性?
- 严格的域访问控制,仅允许特定域或通过
--allowed-domains
显式添加的域。 - 使用
--allowed-domains '*'
可以允许所有域(需谨慎使用)。
使用教程
使用依赖
- 确保已安装Python和Git。
安装教程
# Clone the repository
git clone https://github.com/esakrissa/mcp-doc.git
cd mcp-doc
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package in development mode
pip install -e .
运行服务器
# Run the server with the config file
mcpdoc \
--json config.json \
--transport sse \
--port 8082 \
--host localhost
或使用UV运行:
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run the server with UV
uvx --from mcpdoc mcpdoc \
--json config.json \
--transport sse \
--port 8082 \
--host localhost
调试方式
- 在IDE(如Cursor)中集成服务器,并测试文档访问功能。
- 使用
list_doc_sources
和fetch_docs
工具验证文档获取功能是否正常工作。
许可证
None