Sponsored by Deepsite.site

rtfmbro-mcp

Created By
marckrenn6 months ago
rtfmbro provides always-up-to-date, version-specific package documentation as context for coding agents. An alternative to context7
Content

rtfmbro-mcp

rtfmbro provides always-up-to-date, version-specific package documentation as context for coding agents. An alternative to context7.

https://github.com/user-attachments/assets/dbe0b3b4-a42c-4e91-8bcd-a94d430ef0b8

Demonstration of rtfmbro in use, fetching a specific version (3.1.1) of Flask's readme and docs.

Overview

rtfmbro is a Model Context Protocol (MCP) server that provides real-time, version-aware documentation fetching for packages across multiple ecosystems. It bridges the gap between AI agents and accurate, up-to-date package documentation by fetching docs directly from GitHub repositories at the exact version your project uses.

Supported Ecosystems

EcosystemRegistryStatus
PythonPyPI✅ Full Support
Node.jsnpm✅ Full Support
SwiftSPM🚧 Alpha
GitHubDirect⚠️ Fallback

Why rtfmbro?

The Problem

  • Stale Documentation: AI models often rely on outdated training data about packages
  • Missing Context: Source code in node_modules etc. lacks high-level documentation, browsing it is usually token-consuming and inefficient
  • Version Mismatches: Generic documentation doesn't match your specific package version, especially for legacy projects or brand new packages

The Solution

rtfmbro tries to solve these issues by:

  1. Version-Precise Fetching: Retrieves documentation from the exact git tag/commit that matches your lockfile
  2. Comprehensive Coverage: Extracts all documentation files (.md, .mdx, .txt, .rst, .html) from the repository
  3. Intelligent Caching: SHA-based currency checking ensures docs stay fresh without unnecessary re-fetching
  4. Agent Integration: Seamlessly integrates with AI coding assistants via the Model Context Protocol
  5. Great DX: Zero seting up for developers, just add the server to your MCP configuration, instructions and start fetching docs

MCP Tools

The server exposes four primary tools to AI agents:

ToolPurposeParametersReturns
get_readmeFetches and returns the README file for a specific package versionpackage, version, ecosystemREADME content as string
get_documentation_treeGenerates a comprehensive folder structure of all documentation filespackage, version, ecosystemTree structure as string
read_filesReads specific documentation files with optional line range slicingpackage, version, ecosystem, requests[]Dictionary mapping paths to content
search_github_repositoriesSearches for GitHub repositories using the GitHub Search APIquery, sort, order, per_pageFormatted repository search results

Installation & Setup

Quick Start

Add the remote server to your MCP configuration:

{
  "rtfmbro": {
    "type": "http", 
    "url": "https://rtfmbro.smolosoft.dev/mcp/"
  }
}

Agent Integration

Add this policy to your agent instructions (e.g., .github/copilot-instructions.md):

## Package Documentation Policy

* Before using any package, module, or library, ALWAYS consult its documentation — your internal knowledge may be outdated and could cause errors or failures.
* Don't assume anything about the package's functionality, usage, or configuration without verifying it against the official documentation.
* If you are unsure about a user's request that may involve a package, module, or library, **ALWAYS** refer to the documentation first or ask the user to provide the package name and version.

### Workflow
1. **Identify** the package name and EXACT pinned version (e.g., "==1.0.5") from the project's lock file (uv.lock, package-lock.json, etc.)
2. **Fetch documentation** using the available tools:
   - `get_readme` - Get package README
   - `get_documentation_tree` - Browse available docs
   - `read_files` - Read specific documentation files
   - `search_github_repositories` - Search for Github packages and repositories by topic, language, or keywords
3. **Review** the documentation to understand:
   - Core functionality and API surface
   - Usage patterns and best practices  
   - Breaking changes and migration guides
   - Configuration options and defaults
4. **Apply** documentation insights to provide accurate, version-specific guidance

**Ecosystem Selection:**
- Use `pypi` for Python packages
- Use `npm` for Node.js packages  
- Use `spm` for Swift packages
- Use `gh` only as a fallback for languages not supported by the above registries (package name must be in 'owner/repo' format) or if you're unsure about the package's ecosystem. Also use `gh` when you don't find the package in the lock file.

How It Works

Documentation Workflow

  1. Registry Lookup: Queries the package registry (PyPI, npm, etc.) for metadata
  2. GitHub Discovery: Extracts the GitHub repository URL from package metadata
  3. Version Resolution: Fetches available git tags and matches them against your semantic version
  4. Smart Fetching: Clones the repository at the exact matched tag/commit
  5. Content Filtering: Extracts only documentation files, removing source code and build artifacts
  6. Caching & Currency: Stores results with SHA-based currency checking for efficient re-access

Caching Strategy

  • SHA-Based Validation: Compares current repository commit SHA with cached version
  • Automatic Invalidation: Re-fetches documentation when new commits are detected
  • Persistent Storage: Maintains local cache to avoid redundant GitHub API calls
  • Metadata Preservation: Stores documentation tree structure for fast browsing

Prerequisites

  • Package must be published to a supported registry (PyPI, npm)
  • Package metadata must contain a valid GitHub repository link
  • Repository must use git tags for version management
  • Documentation files must be present in the repository (not just generated sites)

Roadmap

Near Term

  • Ecosystem independent fallback: Implement a fallback mechanism for unsupported ecosystems
  • Provide rtfmbro source code: Open source the server codebase
  • Public docker image: Create a public Docker image for easy deployment
  • Private repo support: Allow authenticated access to private repositories
  • Add Tests: Implement unit and integration tests for core functionality
  • Enhanced Python Support: Include pydocs and docstring extraction
  • Search Capabilities: Search across documentation corpus

Future Ecosystems / Languages / Registries

Source code hosting and repository support:

  • GitHub: Support for GitHub repositories
  • Gitlab: Support for GitLab repositories
  • Bitbucket: Support for Bitbucket repositories
  • Launchpad: Support for Launchpad repositories

Known Issues

  • Some packages may have documentation in separate standalone repos
  • Large repositories may take a bit of time to clone and process initially

Similar / Additive Projects

  • mcp-package-docs: Another MCP server for package documentation, focusing on documentation extraction, LSP servers, etc. May be a great supplement to rtfmbro.
  • rust-docs-mcp-server: MCP server for Rust documentation, focused on Rust-specific features and documentation formats.
  • mcp-ragdocs: MCP server for RAG (Retrieval-Augmented Generation) documentation, aimed at improving the documentation experience for AI models.
  • godoc-mcp: MCP server for Go documentation, providing access to Go package documentation via the Model Context Protocol.
  • context7: Alternative to rtfmbro

Differences between context7 and rtfmbro

Aspectcontext7rtfmbro
ActualityScrapes documentation ahead-of-time at intransparent intervals or upon user trigger. As of writing, the "latest" Next.js docs are already 2 days old.Fetches documentation just-in-time, ensuring it's always up-to-date.
Version-specific docsTheoretically allows scraping older versions (useful for legacy or longtime projects), but the process is complicated, limiting practical availability effectively to latest versions.Fetches older documentation just-in-time, and always remains current, identical to latest docs.
Search strategyUses either A) optionally token-limited RAG search to filter/preprocess docs which can be hit-or-miss, or B) dumps all content into LLM's context, resulting in excessive token-use.Employs agentic discovery (as used by Claude Code itself)
Developer ExperienceRequires explicitly mention of context7 in every prompt.Operates via defined rules/instructions, auto-selecting appropriate package name/version from lock file ("set and forget").
SupportLanguage/ecosystem independent.Currently language/ecosystem-specific; planned additional languages/ecosystems and language-independent fallback mechanism soon.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.