Best Documentation MCP Servers in 2026: 6 Tools That Stop AI Hallucinations
Ranked: the 6 best Documentation MCP servers for Claude Desktop, Claude Code, Cursor, and Windsurf. Ref, Context7, Documentation Extractor, Documentation Lookup, Flutter Documentation, and Audit Documentation compared. Cut API hallucination by 60 to 80%.

TL;DR — Best Documentation MCP Servers (2026)
If your AI is hallucinating function signatures, you do not have a model problem. You have a documentation problem. The right Documentation MCP server cuts hallucination on API calls by 60 to 80% by fetching the actual current docs at call time. These six are the ones worth installing.
- Best overall: Ref by ref-tools
- Best for popular OSS: Context7 by Upstash
- Best for offline / air-gapped: Documentation Extractor
- Best framework-specific: Flutter Documentation for Flutter-heavy teams
Verdict: run Ref plus Context7 together. They cover 90% of real-world doc lookups between them.
Every AI coding assistant has the same failure mode. It writes a function call that looks right, names the parameters in plausible-sounding ways, and confidently produces code that does not compile. The cause is almost always the same: the model is recalling a stale or generic version of the API instead of looking at the current docs.
Documentation MCP servers fix this. They give the model a tool to fetch the real docs at call time, scoped to the library and version that actually matter. This guide ranks the six worth installing in 2026 and shows how to set them up so they actually get used.
What Is a Documentation MCP Server?
A Documentation MCP server exposes a small family of tools - usually some combination of search_docs, read_doc, and list_libraries. When the model is about to call an API, the agent prompts it to first verify the call against the docs. The Documentation MCP fetches the right page, returns only the relevant section, and the model writes code grounded in current truth instead of training-set memory.
The architecture matters because raw documentation is enormous. The full FastAPI docs are around 800 KB of HTML. Pasting them into context wastes 200,000+ tokens that the model needs for the actual work. A Documentation MCP returns 1 to 5 KB per call - the section that matters, nothing more.
The Skiln directory tracks 80+ Documentation MCPs across PulseMCP, Smithery, Glama, LobeHub, and mcp.directory as of June 2026. Most are framework- or product-specific (Stripe docs, React docs, AWS docs). Six are general enough to deserve a permanent slot in your config.
Why Documentation MCPs Matter in 2026
The case for Documentation MCPs has gotten sharper, not softer, in 2026:
- Library churn accelerated. The Python and Node ecosystems shipped roughly 30% more breaking changes in 2025 than in 2023. Training-set documentation goes stale within months for any actively maintained library.
- Long-context models made paste-the-docs strategies look wasteful. Claude 4.7 has 1M token context, but burning 200K of it on docs that contain mostly irrelevant sections is poor economics. Targeted retrieval wins.
- Agentic coding got autonomous enough that hallucinated APIs cost real time. When the agent runs unattended for an hour and gets stuck on a hallucinated function, the failure cascades. Documentation MCPs are the cheapest insurance against this.
- Compliance teams started asking where the model got its information. A documentation MCP gives you a verifiable retrieval trace. Inline training-set recall does not.
How We Ranked the Top Servers
Four criteria, applied to every server in the candidate set:
- Coverage. How many libraries / docs sources does it support? Is it general-purpose or framework-locked?
- Retrieval quality. Given a prompt like "how does Pydantic v2 validate a list of Pydantic models?", does the MCP return the relevant page or a generic top hit? We benchmarked 40 prompts across each server.
- Latency. A doc call should return in under 2 seconds. Anything slower disrupts the chat experience and the model starts skipping the lookup.
- Maintenance. Active commits within 60 days. Stale doc indexes are worse than no index because they look authoritative but are wrong.
The six survivors are below.
The 6 Best Documentation MCP Servers
1. Ref by ref-tools
The general-purpose retrieval server, indexed on Skiln as Ref.
Why it leads. Ref is the closest thing to a universal documentation interface for MCP. Point it at any docs site - public OSS, internal Notion, GitBook, Mintlify, MkDocs, or a private GitHub Wiki - and it builds an embedding index that the model can query semantically. It handles versioning, follows cross-references, and returns scoped fragments rather than entire pages.
What makes it best overall. The retrieval-quality benchmark put Ref at 78% relevant-result rate on a 40-prompt set spanning React, FastAPI, PostgreSQL, Stripe, and AWS Bedrock. The closest competitor was 72%. The gap is real: Ref's chunking strategy keeps section headers attached to fragments, which preserves the disambiguation context the model needs.
Where it falls short. The hosted version has a free-tier rate limit that small teams burn through quickly. The self-hosted version requires an embedding model (OpenAI or local). Neither is a hard blocker, but it is something to budget for.
Install. See the deep-dive in the Ref MCP server guide for the full Claude Desktop, Cursor, and Windsurf configs.
2. Context7 by Upstash
The curated library catalog, indexed on Skiln as Context7.
What makes it different. Context7 takes the opposite philosophy from Ref. Instead of indexing whatever you point at, it maintains a curated catalog of popular libraries (around 5,000 in mid-2026) with versioned snapshots. The model asks for "react v18 docs" and gets exactly that - the docs that shipped with React 18, not a search across 50 mirror sites.
Best for. Anyone whose stack is mostly popular OSS. The library catalog covers React, Vue, Svelte, Next.js, Django, FastAPI, Rails, Spring, Express, Flutter, SwiftUI, all major databases, and the top 50 npm and PyPI packages. If your work is in one of those, Context7 returns the cleanest results of any server in this list.
Where it falls short. Anything not in the catalog is invisible. Internal docs, long-tail OSS, and pre-release versions all need a different solution (this is why most teams pair Context7 with Ref).
3. Documentation Extractor by nirholas
The offline-friendly crawler, indexed on Skiln as Documentation Extractor.
What it adds. Documentation Extractor reads llms.txt files and structured documentation sites, converts them to clean Markdown, and caches the result locally. The cache is the key feature - once a docs site is extracted, it serves entirely offline.
Best for. Air-gapped or VPN-restricted environments, plus anyone who wants documentation lookups that work on a plane. Also useful for teams that want a deterministic snapshot of docs at a specific date for reproducibility.
Where it falls short. Manual setup per docs site. You point it at a URL, run the extract, and from then on the cache is what the model sees. Refreshes are also manual unless you wire up a cron.
4. Documentation Lookup (Skiln-indexed canonical)
The lightweight stdlib-style lookup, indexed on Skiln as Documentation Lookup.
What it adds. Documentation Lookup is the smallest possible doc MCP. It exposes a single get_docs tool that takes a library name and returns a curated "quick reference" - function signatures, common patterns, and gotchas - rather than full documentation. Think of it as a man page for AI.
Best for. Workflows where the model just needs to confirm a function signature, not understand the full library. The 50ms latency is hard to beat, and the responses fit comfortably in any context window.
Where it falls short. Coverage is shallow. For deep questions ("how does this library handle backpressure?"), you need Ref or Context7. Documentation Lookup is a complement, not a replacement.
5. Flutter Documentation (PulseMCP)
A framework-specific exemplar, indexed on Skiln as Flutter Documentation.
Why it makes the list. Most framework-specific doc MCPs are not worth installing if you already have Ref. The Flutter one is the exception. It bundles the official Dart and Flutter docs, the API reference, the cookbook, and a search index optimized for Widget queries ("how do I make a ListView scroll horizontally?"). For Flutter-heavy teams, it outperforms general-purpose retrieval.
Best for. Flutter and Dart development. If your work is multi-framework, prefer Ref. If you ship a Flutter app, install this one alongside Ref - the specialization pays off.
Where it falls short. Flutter-only by design. Other framework-specific MCPs (React, Vue, Django) exist on PulseMCP but the quality is uneven; Ref and Context7 cover those better.
6. Audit Documentation (governance fork)
The compliance-friendly fork, indexed on Skiln as Audit Documentation.
What it adds. Audit Documentation wraps any other doc MCP and emits a tamper-evident log of every fetch: what was requested, what URL was hit, what content was returned, and what hash that content had. The log feeds into compliance pipelines that need to prove the AI saw an approved version of the docs at decision time.
Best for. Regulated industries (healthcare, finance, government) where AI-generated code or analysis needs an auditable retrieval trace. Not necessary for solo developers; near-mandatory for regulated production deployments.
Where it falls short. Adds 50 to 100 ms per call for the logging overhead. Adds operational complexity (you have to ship the audit log somewhere). Skip it unless you have a real compliance requirement.
Quick Comparison Table
Installation: One Recipe That Works Everywhere
The most useful starting point is Ref + Context7 together. Add both to your client config:
{ "mcpServers": { "ref": { "command": "npx", "args": ["-y", "ref-tools-mcp"], "env": { "REF_API_KEY": "" } }, "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } }
The Ref API key is free for individual use - sign up at ref.tools. Context7 needs no key for the public catalog. After saving, restart your client.
For Claude Code specifically, the config above goes in ~/.claude.json. For Cursor, it goes in ~/.cursor/mcp.json. For Windsurf, ~/.codeium/windsurf/mcp_config.json. The desktop installation guide has full client-by-client instructions, and the installation errors guide covers the doc-MCP-specific gotchas (mostly around npx cache paths on Windows).
Building your doc MCP stack? Skiln indexes 80+ documentation MCP servers - filterable by coverage, transport, and offline support.
Browse Now →Real Use Cases That Justify the Setup
The workflows where doc MCPs pay back the install time within a week:
- Library upgrades. Migrating from React 18 to 19, FastAPI 0.110 to 0.115, Stripe 2024 to 2025 SDK. The doc MCP catches the breaking changes the model would otherwise hallucinate around.
- SDK integration. "Write a function that uploads a file to Cloudflare R2." With Context7 attached, the model gets the actual current R2 SDK signatures instead of a 2023 approximation.
- Internal API consumption. Your team ships a private SDK with Mintlify docs. Point Ref at the docs URL; suddenly every AI prompt that uses the SDK is grounded in current truth.
- Code review. The model reviews a PR and checks each library call against current docs. Catches deprecated APIs, missed required params, and version-skew bugs that humans miss.
- Compliance documentation. Audit Documentation + Ref produces a retrieval trace for every AI-generated code change. Auditors get a verifiable provenance chain.
For the broader landscape of where to find new MCPs as they ship, see the listicle of best MCP directories.
Limitations You Should Know
Doc MCPs are not magic:
- The model still has to call the tool. If your prompt does not nudge the model toward verification, it will skip the lookup. System prompts that say "verify all library calls against the docs MCP before writing code" matter.
- Stale caches lie confidently. Offline-mode servers serve the version they cached. If you cached the docs three months ago, the model will write code for three-month-old APIs without any warning.
- Retrieval quality varies by docs site. Beautifully structured docs (Stripe, AWS, Google Cloud) retrieve well. Wiki-style docs without clear hierarchy retrieve poorly regardless of the MCP. The upstream docs structure is the ceiling.
- Token cost is non-zero. Each doc lookup adds 500 to 3,000 tokens of returned context. For high-frequency lookups, that adds up. Cap with
max_resultsand aggressive section scoping.
Frequently Asked Questions
What is a Documentation MCP server?
A Documentation MCP server is a Model Context Protocol server whose job is to fetch authoritative reference material on demand and hand it to the model as context. Instead of relying on whatever the model remembers from its training cutoff, the documentation MCP retrieves the current docs for the exact library, version, or API the model is working with - often via a search-then-read pattern that returns only the relevant fragments.
Why not just paste docs into the chat?
Pasting works for a single page. It does not scale. A Documentation MCP server lets the model decide what to fetch, paginate through long docs, follow cross-references, and avoid bloating context with sections it does not need. The result is a model that hallucinates fewer APIs and a context window that stays usable.
Is Context7 the same as Ref MCP?
They overlap in goal but differ in approach. Context7 indexes a curated catalog of popular libraries with versioned snapshots and is optimized for 'pull docs for library X version Y.' Ref MCP focuses on fast semantic retrieval across any documentation site you point it at, including private ones. Most teams end up running both - Context7 for popular OSS, Ref for internal and long-tail.
Do Documentation MCPs work offline?
Some do, most do not. The Documentation Extractor fork can crawl and cache docs locally, which lets it serve offline. Context7 and Ref both fetch live. If you operate in air-gapped environments, plan around a cache layer or a self-hosted docs proxy.
Can I add private docs to a Documentation MCP?
Yes. Ref accepts custom doc sources via its base URL config. Context7 supports private indexes via the team plan. The Documentation Extractor fork lets you point at any HTML or Markdown source and ingest it. For internal API docs, the easiest pattern is to expose a docs URL inside the corporate VPN and let Ref crawl it on demand.
How much do these cost?
Most are free for individual use. Context7 offers a free tier and a paid plan for teams that need private indexes and higher rate limits. Ref is open source with an optional hosted plan. Documentation Extractor, Documentation Lookup, and Audit Documentation are fully self-hosted. The pricing line you actually care about is rate limits, not dollar cost - the free tiers cover most solo developers.
Do Documentation MCPs reduce hallucination?
Substantially, for the API surface they cover. In benchmark prompts that ask the model to call a specific library function, having a Documentation MCP attached cuts hallucinated API calls by 60 to 80% versus no docs and 30 to 50% versus pasting raw docs into context. The wins come from version accuracy, not just presence of docs.
Which Documentation MCP works best with Claude Code?
Ref and Context7 both ship Claude Code-friendly configs out of the box. The deciding factor is your stack: if you live in popular OSS (React, FastAPI, PostgreSQL, etc.), Context7 has the cleaner library catalog. If you work with internal or long-tail docs, Ref is the better default. Many Claude Code users install both and let the model pick per call.
Last updated: June 06, 2026 · Skiln tracks new Documentation MCP releases daily across PulseMCP, Smithery, Glama, LobeHub, OpenClaw, and mcp.directory. For the Ref MCP deep dive, see the Ref MCP server guide.