DocsHub MCP Server
Allows fetching and querying FastAPI documentation via llms.txt files, providing tools to list projects, get project docs, and read specific pages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DocsHub MCP Server show me FastAPI documentation from llms.txt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
Related MCP server: MCP LLMS-TXT Documentation Server
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 configBundled 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.yamlYou 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 |
| (none) | Local file path or |
|
| Seconds between config reload checks. The server polls this source in the background and notifies clients when the project list changes. Set to |
|
| Seconds to cache fetched documentation in memory. Subsequent tool calls within the TTL window are served instantly without a network round-trip. Set to |
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.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
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 docshubTo 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.yamlGitHub 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 |
| Lists configured projects. Always called first to discover what's available. |
| Fetches documentation for a project. Tries |
| Fetches a specific page by URL. Only needed when |
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 |
| JSON list of all configured projects with names and descriptions. |
| 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 |
|
| Answer a specific question using a project's documentation. |
|
| Produce a structured overview of a project's docs. |
Available Tools
3 toolsget_project_docsFetch Project DocumentationARead-onlyIdempotent
Fetch documentation for a project.
Automatically tries llms-full.txt first, which returns the complete
documentation in a single response — no further calls needed.
If llms-full.txt is unavailable, falls back to llms.txt and returns
an index of URLs; use read_doc_page with those URLs to retrieve individual
pages.
Call list_available_docs first to get valid project names.
Inputs: project_name (required). Returns: result
list_available_docsList Available DocsARead-onlyIdempotent
List all configured documentation projects.
Always call this first to discover available project names before using
get_project_docs. Pass the exact value of the name field to
get_project_docs.
Returns:
List of dicts with name and description keys.
Returns an empty list if no projects are configured.
Inputs: no named parameters. Returns: result
read_doc_pageRead Documentation PageARead-onlyIdempotent
Fetch the Markdown content of a specific documentation page.
Use URLs obtained from get_project_docs when it returns an llms.txt
index. Do not call this if get_project_docs already returned complete
documentation. Only URLs from configured project hosts are permitted.
Inputs: url (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct, non-overlapping role in the documentation workflow: listing projects, fetching project docs (full or index), and reading individual pages. The descriptions clearly define when to use each tool.
All tool names follow a consistent snake_case verb_noun pattern: list_available_docs, get_project_docs, read_doc_page. This is predictable and easy for an agent to interpret.
With 3 tools, the server is tightly scoped to its purpose of retrieving documentation. Each tool is essential to the workflow, and there is no redundancy or excess.
The tool set covers the full lifecycle of fetching documentation: discover projects, retrieve either full content or an index, and then fetch specific pages. The fallback mechanism ensures no dead ends for users.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for agentverse documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides LLMs access to other LLMs449 npm82MIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that provides tools to load and fetch documentation from any llms.txt source, giving users full control over context retrieval for LLMs in IDE agents and applications.1,031MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes the llms.txt file and its referenced local or external resources from a project root to provide context for AI models. It automatically parses documentation links and URLs to make them accessible as additional MCP resources.1MIT
- AlicenseNot gradedqualityDmaintenanceGeneric MCP server that exposes Markdown documentation to LLMs, enabling them to search and answer questions about any software documentation.MIT