Best MCP Servers for Up-to-Date Docs and Code Context
Coding assistants are trained on old data, so they confidently use deprecated APIs or invent functions that do not exist. A documentation MCP server fixes this by fetching current docs or source at the moment you ask.
A second family of tools tackles the opposite problem: too much context. They index your repository so the agent retrieves only the functions it needs, or compress tool output before it reaches the model.
AgentIndex · Updated 2026-10-14
Quick picks
- Context7 — up-to-date library documentation for your AI coding assistant; the most widely used option here.
- git-mcp — turns any GitHub repo or Pages site into a docs hub with a remote MCP URL and no install.
- docs-mcp-server — private, version-aware documentation index; pick it for internal docs or a specific library version.
- ref-tools-mcp — documentation search that returns only the relevant tokens, through a hosted Ref service that needs an API key.
- jcodemunch-mcp — indexes your code with tree-sitter so agents fetch exact symbols; free for non-commercial use only.
- codebase-memory-mcp — indexes a codebase into a persistent knowledge graph to cut the tokens agents spend exploring it.
Side-by-side comparison
| Tool | What it is | Stars | License | Last push | Install |
|---|---|---|---|---|---|
| Context7 | Up-to-date library docs for your AI coding assistant | 63.0k | MIT | 2026-10-13 | npx ctx7 setup |
| git-mcp | Free remote MCP server that turns any GitHub repo or Pages site into a docs hub for your AI assistant, with no install | 8.5k | Apache-2.0 | 2026-05-08 | npx mcp-remote https://gitmcp.io/{owner}/{repo} |
| docs-mcp-server | Private, version-aware documentation index for AI coding assistants | 1.8k | MIT | 2026-10-12 | npx @arabold/docs-mcp-server@latest |
| ref-tools-mcp | MIT MCP server for documentation search that returns only the relevant tokens, via a hosted Ref service with an API key | 1.2k | MIT | 2026-10-01 | npx ref-tools-mcp@latest |
| jcodemunch-mcp | MCP server that indexes code with tree-sitter so agents fetch exact symbols instead of whole files; free for non-commercial use only | 2.8k | Free for non-commercial use; paid commercial licence | 2026-10-13 | pip install jcodemunch-mcp |
| codebase-memory-mcp | Code knowledge graph that cuts agent token use on codebases | 46.5k | MIT | 2026-10-13 | curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/mai… |
| headroom | Compress tool output and logs before they reach the LLM | 75.2k | Apache-2.0 | 2026-10-13 | pip install "headroom-ai[all]" |
| pg-aiguide | PostgreSQL docs and best-practice skills for AI coding assistants | 1.9k | Apache-2.0 | 2026-10-07 | claude plugin marketplace add timescale/pg-aiguide |
Tools in this list with an in-depth AgentIndex review: 8/8
How to choose
- Decide whether you need public library docs (Context7, GitMCP), private or internal docs (a docs index), or your own code (code retrieval).
- Check where the work happens. Hosted services are convenient but send queries to a third party; local indexes keep code on your machine.
- Check licences: one code-retrieval tool here is free only for non-commercial use.
- Look at version awareness. Docs for the version you actually use beat docs for the latest release.
- Measure the token savings yourself; the percentages in READMEs are the projects' own figures.
FAQ
Why does my coding assistant use outdated APIs?
Models learn from data that stops at a cutoff date, so they may not know about newer versions of a library. A documentation MCP server fetches current docs when you ask, which reduces outdated or invented calls.
Context7 or GitMCP?
Context7 serves curated library documentation. GitMCP turns any public GitHub repository or Pages site into an MCP endpoint, preferring llms.txt and falling back to the README. If a library is not covered by one, the other may be.
Can I use these with private code or internal docs?
Use a local or self-hosted option for that: a documentation index you run yourself, or a local code index. Hosted services receive your queries, so check their privacy terms first.
How we compiled this list
Tools are chosen by hand from the projects in our index, favouring those we have reviewed in depth. Stars, licence, last-push date and install command come from each repository and are refreshed with the site data. We read each project's README and docs; we have not run every tool ourselves, so test before you depend on one.