Skip to main content
Glama

mcp-docs

通用的 MCP 服务器,向 LLM 公开 Markdown 文档,使其能够搜索并回答有关任何软件文档的问题。

服务器标识(名称、指令、类别标签)完全由 docs/ 目录驱动——这是一个与本项目并列克隆的独立仓库。

要求

  • Python 3.14+

  • uv

设置

1. 克隆文档仓库

在服务器启动之前,必须存在 docs/ 目录。将文档仓库克隆到其中:

git clone <docs-repo-url> docs

2. 安装依赖

uv sync

docs/ 目录结构

服务器会自动从子目录中发现类别。唯一必需的文件是 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-folderMy 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

功能

工具

工具

描述

list_docs(category?)

列出可用的文档文件,可选择按类别过滤

read_doc(category, topic)

读取文档文件的全部内容

search_docs(query, category?)

在所有文档中进行全文搜索

资源

URI

描述

docs://index

所有可用文档文件的完整索引

docs://{category}/{topic}

特定文档文件的内容

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gmantovani2005/mcp-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server