DocsHub MCP Server
An MCP server that provides AI clients with access to developer documentation via llms.txt files. Exposes tools, resources, and prompts.
README
DocsHub MCP Server
An MCP server that provides AI clients with access to developer documentation via llms.txt files. Exposes tools, resources, and prompts.
Prerequisites
You must have uv installed on your machine.
(macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh)
Configuration
DocsHub loads its project list from a docs_config.yaml file. Sources are tried in this order:
DOCSHUB_CONFIGenvironment variable — set to a local file path or a remotehttps://URL pointing to a raw YAML file (e.g. a file hosted in a GitHub repository)docs_config.yamlin the working directory~/.config/docshub/docs_config.yaml— user-level config- Bundled default — the
docs_config.yamlin the DocsHub repo (used automatically as a fallback when no other config is found)
The YAML format:
projects:
- name: "FastAPI"
description: "FastAPI official documentation"
llms_txt_url: "https://fastapi.tiangolo.com/llms.txt"
Using a remote config from a GitHub repository:
Set DOCSHUB_CONFIG to the raw file URL:
DOCSHUB_CONFIG=https://raw.githubusercontent.com/ORG/docshub/main/docs_config.yaml
You can pass this to any AI client as an environment variable in its MCP server configuration (see Client Setup below).
Environment variables
| Variable | Default | Description |
|---|---|---|
DOCSHUB_CONFIG |
(none) | Local file path or https:// URL to the config file. |
DOCSHUB_CONFIG_RELOAD_INTERVAL |
900 |
Seconds between config reload checks. The server polls this source in the background and notifies clients when the project list changes. Set to 0 to disable polling entirely. |
DOCSHUB_CACHE_TTL |
1800 |
Seconds to cache fetched documentation in memory. Subsequent tool calls within the TTL window are served instantly without a network round-trip. Set to 0 to disable caching. |
Client Setup
MCP server configuration
Claude Desktop, VS Code Cline, and GitHub Copilot CLI use the same JSON format. Add this block to the mcpServers object in each client's config file (see per-client instructions below):
{
"mcpServers": {
"docshub": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/rkratky/docshub",
"docshub"
]
}
}
}
To load a remote docs_config.yaml, add an env key:
{
"mcpServers": {
"docshub": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/rkratky/docshub",
"docshub"
],
"env": {
"DOCSHUB_CONFIG": "https://raw.githubusercontent.com/ORG/docshub/main/docs_config.yaml"
}
}
}
}
Claude Desktop
- Open your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the configuration block above to the
mcpServersobject. - Completely quit and restart Claude Desktop.
VS Code — Cline extension
- Open VS Code and open the Cline extension sidebar.
- Click the MCP Servers icon → Configure MCP Servers to open
cline_mcp_settings.json. - Add the configuration block above to the
mcpServersobject. - Save. Cline automatically restarts the server.
GitHub Copilot (VS Code)
GitHub Copilot in VS Code uses VS Code's native MCP configuration, which has a slightly different format.
Option A — User settings (available across all workspaces):
- Open VS Code user settings:
Ctrl+,→ Open Settings (JSON) (top-right icon). - Add the following:
{
"mcp": {
"servers": {
"docshub": {
"type": "stdio",
"command": "uvx",
"args": [
"--from", "git+https://github.com/rkratky/docshub",
"docshub"
]
}
}
}
}
Option B — Workspace settings (scoped to a single project):
Create or edit .vscode/mcp.json in your project root:
{
"servers": {
"docshub": {
"type": "stdio",
"command": "uvx",
"args": [
"--from", "git+https://github.com/rkratky/docshub",
"docshub"
]
}
}
}
After saving, open GitHub Copilot Chat — the docshub tools will be available automatically.
Claude Code
Run this command once to register the server at user scope:
claude mcp add --scope user docshub -- \
uvx --from git+https://github.com/rkratky/docshub docshub
To use a remote docs_config.yaml, set the environment variable before running the command or add it to your shell profile:
export DOCSHUB_CONFIG=https://raw.githubusercontent.com/ORG/docshub/main/docs_config.yaml
GitHub Copilot CLI
Edit ~/.copilot/mcp-config.json (created automatically by the CLI the first time you run it; you can also create it manually) and add the configuration block above to the mcpServers object.
To use a remote docs_config.yaml, add an env key to the server entry:
{
"mcpServers": {
"docshub": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/rkratky/docshub",
"docshub"
],
"env": {
"DOCSHUB_CONFIG": "https://raw.githubusercontent.com/ORG/docshub/main/docs_config.yaml"
}
}
}
}
The config file location can be changed by setting the COPILOT_HOME environment variable.
Usage
DocsHub exposes three types of MCP primitives: tools (called automatically by the AI), resources (attached to context on demand), and prompts (predefined conversation starters).
Tools
The AI calls these automatically when you ask about documentation:
| Tool | Description |
|---|---|
list_available_docs |
Lists configured projects. Always called first to discover what's available. |
get_project_docs |
Fetches documentation for a project. Tries llms-full.txt first (complete docs); falls back to llms.txt (an index of page URLs) if unavailable. |
read_doc_page |
Fetches a specific page by URL. Only needed when get_project_docs returned an llms.txt index. |
Example: "Check the docs for FastAPI and show me how to write a route."
Performance note: fetched documentation is cached in memory for 30 minutes by default (
DOCSHUB_CACHE_TTL); set to0to disable caching. The server also polls the config source in the background every 15 minutes (DOCSHUB_CONFIG_RELOAD_INTERVAL) and notifies connected clients when the project list changes, so doc sets can be added or removed without restarting the server; set to0to disable polling.
Resources
Resources provide structured access to the documentation registry and content. Attach them to your conversation context when you want to ground the AI in a specific project's docs.
| URI | Description |
|---|---|
docshub://projects |
JSON list of all configured projects with names and descriptions. |
docshub://project/{name}/docs |
Raw documentation content for the named project. |
Prompts
Prompts are predefined conversation starters for common documentation tasks. How to invoke them depends on your AI client (look for a prompt/slash-command picker or similar):
| Prompt | Arguments | Description |
|---|---|---|
query_docs |
project_name, question |
Answer a specific question using a project's documentation. |
summarize_project |
project_name |
Produce a structured overview of a project's docs. |
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。