RTFD (Read The F*****g Docs) MCP Server


The RTFD (Read The F*****g Docs) MCP Server acts as a bridge between Large Language Models (LLMs) and real-time documentation. It allows coding agents to query package repositories like PyPI, npm, crates.io, GoDocs, DockerHub, GitHub, and Google Cloud Platform (GCP) to retrieve the most up-to-date documentation and context.
This server solves a common problem where LLMs hallucinate APIs or provide outdated code examples because their training data is months or years old. By giving agents access to the actual documentation, RTFD ensures that generated code is accurate and follows current best practices.
⚠️ Security Warning
Security Warning: This MCP server grants agents access to unverified code and content from external sources (GitHub, PyPI, etc.). This introduces significant risks, including indirect prompt injection and the potential for malicious code execution, particularly when operating in autonomous or "YOLO" modes. Use at your own risk. The maintainers assume no responsibility for any damage or security compromises resulting from the use of this tool.
You can mitigate these risks by configuring specific environment variables to restrict functionality. For example, setting RTFD_FETCH=false disables all content fetching tools (allowing only metadata lookups), and VERIFIED_BY_PYPI=true restricts Python package documentation to only PyPI-verified sources. See the Configuration section for more details.
Why use RTFD?
- Accuracy: Agents can access the latest documentation for libraries, ensuring they use the correct version-specific APIs and avoid deprecated methods.
- Context Awareness: Instead of just getting a raw text dump, the server extracts key sections like installation instructions, quickstart guides, and API references, giving the agent exactly what it needs.
- Privacy: Unlike cloud-based documentation services, RTFD runs entirely on your local machine. Your queries are sent DIRECTLY to the source (no servers in the middle, no API keys needed, etc) and the documentation you access never leave your system, ensuring complete privacy and no data collection.
- Supported Sources: PyPI (Python), npm (JavaScript/TypeScript), crates.io (Rust), GoDocs (Go), Zig docs, DockerHub, GitHub Container Registry (GHCR), GitHub repositories, and Google Cloud Platform (GCP).
Use Cases
RTFD helps in scenarios like:
-
Refactoring old code: Fetch current pandas docs to find deprecated methods and their replacements. Instead of guessing what changed, the LLM reads the actual upgrade guide.
-
Unfamiliar libraries: Integrating a Rust crate you've never seen? Look up the exact version, feature flags, and examples directly from the docs instead of guessing the API from general patterns.
-
Libraries after training cutoff: Using a library released after the LLM's training data ends? Fetch the actual README and code examples from GitHub so the LLM can write correct usage instead of hallucinating APIs.
-
Docker optimization: When optimizing a Dockerfile, inspect the official python:3.11-slim image to see exactly what packages and OS layers are included, rather than making assumptions.
-
Dependency audits: Check PyPI, npm, and crates.io for available updates across all your dependencies. The LLM sees the latest versions and can generate an audit report without manually visiting each registry.

Features