Skip to content

Menu

AI & Tools

MCP Servers for Documentation and Code Context

AIDToolStack EditorialNovember 27, 20266 min read
MCPDocumentationAI CodingContext7
Share:Twitter

The most common way an AI coding assistant gets an API wrong is not subtle. It writes code for the version of a library it saw during training. You get a Next.js config option that was renamed, an Azure SDK client that moved packages, or a Terraform argument that never existed. The model is confident because the pattern was common once.

Documentation MCP servers fix a specific part of that. Before answering, the agent calls a tool that fetches the current docs for the library or platform you named, and writes code against that text instead of its memory. This post covers the servers we would trust for that job in November 2026, what each one actually returns, and how to set them up. We checked every repository and docs page listed here; all were active in November 2026.

How a documentation MCP server grounds an answer, and which server covers which source
How a documentation MCP server grounds an answer, and which server covers which source

Why a lookup step reduces made-up APIs

A model without tools has two sources for an API signature: its training data and your open files. Neither tells it what changed last month. When a docs server is connected, the agent can do three useful things:

  • Check the signature of the exact function it is about to call.
  • Match your version. Context7 and Ref both search by library, and you can name the version in your prompt.
  • Quote a real example instead of writing one from pattern memory.

It is not magic. If the docs themselves are thin, or the agent never calls the tool, you get the old behaviour. The habit that makes the difference is asking for it, either in the prompt ("check the docs first") or in a rules file such as CLAUDE.md or .cursor/rules. A line like "Before using any third-party API, look it up with Context7 or Microsoft Learn MCP" changes how often the tool gets called.

Context7: library docs by ID

Context7, from Upstash, has by far the most GitHub stars of the servers here. It indexes documentation for open-source libraries and frameworks and exposes two tools:

  • resolve-library-id turns a name like "next.js" into an ID such as /vercel/next.js.
  • query-docs takes that ID and a question, and returns relevant snippets.

You trigger it by adding "use context7" to a prompt, or skip the matching step by naming the ID directly ("use library /supabase/supabase"). Mention the version and Context7 matches it, which is the whole point when you are on Next.js 16 and the model remembers 13.

The remote endpoint is https://mcp.context7.com/mcp, and an API key goes in an Authorization: Bearer header. In Claude Code:

claude mcp add --transport http context7 https://mcp.context7.com/mcp \
  --header "Authorization: Bearer $CONTEXT7_API_KEY"

Its README also offers npx ctx7 setup to configure a client for you. Our Context7 page has config for other clients.

A caution: for a small package, check that the ID points to the real upstream repo and not a fork.

Microsoft Learn: Azure, .NET and Microsoft 365

If you write for Azure or .NET, the Microsoft Learn MCP server is the most direct fix for outdated SDK calls. It is a remote server at https://learn.microsoft.com/api/mcp and needs no API key or sign-in. The repository says it only reads official first-party Microsoft documentation, which is what you want for a vendor docs source.

It has three tools:

  • microsoft_docs_search for semantic search across Learn.
  • microsoft_docs_fetch to pull a full page as Markdown.
  • microsoft_code_sample_search for official code samples, with an optional language filter.

The code sample tool is the one that saves time. Ask for "the current way to authenticate a BlobServiceClient with DefaultAzureCredential in Python", and the agent gets Microsoft's own sample, not a 2021 Stack Overflow answer. Pair it with the Azure MCP server if you also want the agent to look at your resources, but keep them separate in your head: one reads docs, the other acts on your subscription.

AWS Knowledge: AWS docs without credentials

AWS runs the AWS Knowledge MCP Server at https://knowledge-mcp.global.api.aws. Like Microsoft's, it needs no authentication, though it is rate limited. Tools include search_documentation, read_documentation, list_regions and get_regional_availability.

That regional availability tool answers a question models get wrong all the time: "Is this service or model available in eu-central-1?" The content also covers API references, What's New posts, Well-Architected guidance, and CDK and CloudFormation docs and templates.

There is also a local AWS Documentation MCP server run with uvx, but for most people the hosted one is simpler and has nothing to install. Because it carries no account access, it is safe to leave on all the time, unlike the main AWS MCP server.

DeepWiki and GitHub: code context from repositories

Sometimes the docs are not the problem. The library has no docs worth reading, and the answer is in its source. Two options help here.

DeepWiki, from Cognition, generates wiki-style documentation for public GitHub repositories. Its MCP server at https://mcp.deepwiki.com/mcp is free and needs no auth for public repos. Tools are read_wiki_structure, read_wiki_contents and ask_wiki_question. The old SSE endpoint is being deprecated, so use the /mcp URL. Private repos need a Devin account and the Devin MCP server instead.

GitHub's own MCP server can read files, search code and browse issues in any repo your token can see. For docs lookup, run it with --read-only and only the repos toolset; you do not need write tools to read a README or a type definition. See the GitHub MCP page.

The two complement each other. DeepWiki gives a summarised explanation of how a project fits together. GitHub gives you the exact current file. When the question is "what are the parameters of this function", the file wins.

Ref and Exa: search with fewer wasted tokens

Ref (repo) is a docs search service built for agents. The hosted endpoint is https://api.ref.tools/mcp, with an API key passed in the URL or an x-ref-api-key header. It has two tools, ref_search_documentation and ref_read_url, and can also index private sources such as your own repos and PDFs. That last part is the main reason to choose it over Context7: internal SDK docs become searchable the same way as public ones. We did not find pricing in the repository, so check Ref's site before rolling it out to a team.

Exa (repo) is a general web search server rather than a docs index. The hosted endpoint is https://mcp.exa.ai/mcp, and by default it exposes web_search_exa and web_fetch_exa. It works anonymously with rate limits, or with OAuth or an API key for more. Older guides mention a get_code_context_exa tool; the current README does not list it, so do not copy configs that enable it. Exa is useful when the answer lives in a changelog, a GitHub discussion or a blog post rather than in reference docs. Our Exa MCP page and the roundup of web search MCP servers cover alternatives such as Tavily.

Which ones to install

You do not need all of them, and every extra server adds tool descriptions to your context. A practical set:

  • Context7 for open-source libraries, always on.
  • Microsoft Learn or AWS Knowledge, depending on your cloud. Both are free and keyless.
  • DeepWiki for unfamiliar open-source repos.
  • Ref only if you need private docs search; Exa only if your agent lacks a built-in web search.

Then tell the agent to use them. A short rule such as this in CLAUDE.md or AGENTS.md does more than installing a fifth server:

## Docs lookup
- Before calling a third-party API you have not used in this repo, look it up with Context7.
- For Azure and .NET, use the Microsoft Learn MCP server instead.
- Quote the doc URL in your summary when you rely on it.

The last line is the useful check. If the agent cannot name the page it used, it probably answered from memory.

For client setup across Claude Code, Cursor and VS Code, see our guide to configuring MCP servers, or build the JSON with the MCP config generator and check it with the MCP config validator. If you are new to the protocol, what MCP is is the place to start.

AE

Written by AIDToolStack Editorial

Researched from official documentation, specifications and vendor pages, listed under Sources below. Last checked November 2026.

Sources

  1. github.com /upstash/context7
  2. code.claude.com /docs/en/mcp
  3. github.com /MicrosoftDocs/mcp
  4. awslabs.github.io /mcp/servers/aws-knowledge-mcp-server
  5. docs.devin.ai /work-with-devin/deepwiki-mcp
  6. github.com /github/github-mcp-server
  7. github.com /ref-tools/ref-tools-mcp
  8. github.com /exa-labs/exa-mcp-server

Related Posts

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…