Skip to main content

Universal MCP server for documentation with llms.txt support

Project description

docr-mcp

A framework for building MCP servers that give LLMs access to any documentation.

Give LLMs the ability to search and read documentation from any source - public or private, official or internal. Stop getting outdated answers. Start getting accurate information directly from current docs.

Tests Python 3.10+ License: MIT

Why docr-mcp?

The Problem: LLMs give you outdated answers based on their training data. They don't know about the latest API changes, new features, or the specific libraries and tools you use daily.

The Solution: docr-mcp provides a proven framework to connect any documentation to LLMs through MCP servers. Give your AI assistant real-time access to current documentation - from popular libraries to your internal tools.

Key Features:

  • Universal framework for any documentation site (public or private)
  • Smart BM25 search with code-aware tokenization and relevance ranking
  • Full customization - control parsing, indexing, search, and tool descriptions
  • Production ready - 31+ tests, secure by default, proper resource management
  • Easy to extend - YAML config + Python implementation to add any library

Supported Documentation

Library Status Install Command (Claude Code)
Strands Agents ✅ Active claude mcp add docr-mcp-strands -- uv --directory $(pwd) run docr-mcp --library strands

Want to add a library? See CONTRIBUTING.md for guidelines.

Installation

# Clone the repository
git clone https://github.com/JacobHuang91/docr-mcp.git
cd docr-mcp

# Install dependencies
uv sync

# Add to your MCP client
# Example for Claude Code:
claude mcp add docr-mcp-strands -- \
  uv --directory $(pwd) run docr-mcp --library strands

# Restart your client to activate

Usage

After installation, ask your AI assistant to search documentation:

Search Strands docs for "agent state"
What is agent-loop in Strands?
Show me how to use model providers in Strands

How It Works

graph LR
    A[Index Source] --> B[Build BM25 Index]
    B --> C[Query]
    C --> D[Search Index]
    D --> E[Fetch Live Docs]
    E --> F[LLM Response]
  1. Startup: Fetch index source (llms.txt, sitemap) and build searchable BM25 index
  2. Query: Search pre-built index, then fetch live documentation from URLs
  3. Search: BM25 ranking with code-aware tokenization and field weighting

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docr_mcp-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docr_mcp-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file docr_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: docr_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docr_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4eb8031a32891f5239d6a95006484f3bc17b9771c475b086c409c43b6075a549
MD5 70e0c7261d164571d88c40d6e264fc07
BLAKE2b-256 f80c6fbfe19cd10a810b6981ffe99a95f8d3b1c130af0d0c70770b61112d61d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for docr_mcp-0.1.0.tar.gz:

Publisher: publish.yml on JacobHuang91/docr-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docr_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docr_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docr_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5de699d02c075df6be93f61a9ac1b7866a52d3669d4e155ccb5facc2dc9af787
MD5 c25a812043fc61b08f0d4becbb527960
BLAKE2b-256 95ab20c9443bc000bfd5e92e4f05731e39fc1ac46a9cdd71e0ee3c37274f0a3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for docr_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on JacobHuang91/docr-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page