mcp-docs
mcp-docs
通用的 MCP 服务器,向 LLM 公开 Markdown 文档,使其能够搜索并回答有关任何软件文档的问题。
服务器标识(名称、指令、类别标签)完全由 docs/ 目录驱动——这是一个与本项目并列克隆的独立仓库。
要求
Python 3.14+
Related MCP server: repocks
设置
1. 克隆文档仓库
在服务器启动之前,必须存在 docs/ 目录。将文档仓库克隆到其中:
git clone <docs-repo-url> docs2. 安装依赖
uv syncdocs/ 目录结构
服务器会自动从子目录中发现类别。唯一必需的文件是 docs/ 根目录下的 config.toml。
docs/
├── config.toml # required — project identity
├── <category>/
│ ├── <topic>.md
│ └── ...
└── <category>/
└── ...config.toml
[project]
name = "my-project"
instructions = """
System instructions for the LLM. Describe what this documentation covers
and how the model should use the available tools.
"""
[categories]
folder-name = "Human-readable label"[project]是必需的。name用于标识服务器;instructions用于指导 LLM。[categories]是可选的。任何未列出的子目录都会自动获得标题大小写的标签(my-folder→My Folder)。img/子目录中的文件永远不会被提供。
使用方法
运行服务器(stdio 模式)
uv run main.py使用 MCP Inspector 进行开发
uv run mcp dev main.py在浏览器中打开 MCP Inspector。要连接到正在运行的 SSE 或 Streamable HTTP 服务器,请先启动它,并将 inspector 指向打印出的端点:
uv run main.py --transport sse
uv run main.py --transport streamable-http使用 Claude Desktop 配置
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"my-project": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-docs", "run", "main.py"]
}
}
}使用 Claude Code 配置
claude mcp add my-project -- uv --directory /path/to/mcp-docs run main.py功能
工具
工具 | 描述 |
| 列出可用的文档文件,可选择按类别过滤 |
| 读取文档文件的全部内容 |
| 在所有文档中进行全文搜索 |
资源
URI | 描述 |
| 所有可用文档文件的完整索引 |
| 特定文档文件的内容 |
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for querying Forkast documentation
Read-only MCP server for the OrchestKit docs: full-text search + Markdown fetch. No auth.
MCP server for langchain documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context15 npm263MIT
- AlicenseNot gradedqualityDmaintenanceTransforms Markdown documentation into an intelligent knowledge base with AI-powered search and Q\&A through an MCP server.4 npm9MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).29 npm36MIT
- AlicenseNot gradedqualityCmaintenanceA documentation MCP server that crawls websites and Git repositories, stores them as Markdown, and provides tools to search and retrieve documentation for local LLMs and AI agents.Apache 2.0