Index Agentica

Give your coding agent up-to-date library docs over MCP (Context7, GitMCP, DeepWiki, Microsoft Learn)

Stop your coding agent from guessing at APIs that changed after its training cutoff. Connect free remote docs MCP servers (Context7, GitMCP, DeepWiki, Microsoft Learn) to Claude Code, Codex or Cursor, learn which tool to call for what, and keep a self-hosted fallback for private docs.

Type
Guide
Author
Agentica Author
Published
Last verified
Difficulty
beginner
Time
15 min

Prerequisites

Models learn libraries at training time. When a library ships a breaking change afterwards, a coding agent writes code for the old API, and it does so confidently. The fix is to let the agent read current documentation while it works. Several free remote MCP servers do exactly that, and connecting one takes a single command.

Pick the right server

ServerBest forEndpointTools (as returned on 2026-10-23)
Context7Popular libraries and frameworks: curated, versioned snippetshttps://mcp.context7.com/mcpresolve-library-id(libraryName, query), then query-docs(libraryId, query, language)
GitMCPAny public GitHub repo, including niche or brand-new oneshttps://gitmcp.io/{owner}/{repo} or https://gitmcp.io/docsPer repo: fetch_<repo>_documentation, search_<repo>_documentation(query), search_<repo>_code(query, page), fetch_generic_url_content(url). Generic /docs: the same with owner/repo arguments plus match_common_libs_owner_repo_mapping(library)
DeepWiki MCPUnderstanding how a repository works internallyhttps://mcp.deepwiki.com/mcpread_wiki_structure(repoName), read_wiki_contents(repoName), ask_wiki_question(repoName, question)
Microsoft Learn MCPAzure, .NET, Microsoft 365 and other Microsoft docshttps://learn.microsoft.com/api/mcpmicrosoft_docs_search(query), microsoft_code_sample_search(query, language), microsoft_docs_fetch(url)

They differ in where the text comes from:

Connect them

Claude Code (remote HTTP servers, user scope so they work in every project):

claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
claude mcp add --scope user --transport http deepwiki https://mcp.deepwiki.com/mcp
claude mcp add --scope user --transport http mslearn https://learn.microsoft.com/api/mcp
# one GitMCP server per repo you depend on, or the generic one:
claude mcp add --scope user --transport http gitmcp-pipecat https://gitmcp.io/pipecat-ai/pipecat
claude mcp list

Codex CLI:

codex mcp add context7 --url https://mcp.context7.com/mcp
codex mcp add deepwiki --url https://mcp.deepwiki.com/mcp
codex mcp add gitmcp --url https://gitmcp.io/docs

Cursor (~/.cursor/mcp.json or .cursor/mcp.json in the project):

{
  "mcpServers": {
    "context7": { "url": "https://mcp.context7.com/mcp" },
    "deepwiki": { "url": "https://mcp.deepwiki.com/mcp" },
    "gitmcp-pipecat": { "url": "https://gitmcp.io/pipecat-ai/pipecat" }
  }
}

Context7 works without a key. Its entry notes that an optional API key (sent as Authorization: Bearer ...) raises rate limits. Keep that key in an environment variable, not in a committed .mcp.json. For more on scopes, headers and OAuth, see Connect an agent to a remote MCP server and Add MCP servers to Claude Code.

Make the agent actually use them

Agents often skip tools they aren't told about. Add a short rule to the project's AGENTS.md (or CLAUDE.md):

## Library docs
Before writing or changing code that uses a third-party library, look up the current API:
- Popular libraries: Context7 (resolve-library-id, then query-docs).
- A specific GitHub repo or a very new library: the gitmcp-* server for that repo.
- How a repo works internally: DeepWiki ask_wiki_question, then confirm in the source.
Quote the version you looked up in the PR description.

Check that it works by asking something that changed recently. For example, ask how to add MCP tools to a Pipecat bot. The agent should call a docs tool before it writes code.

Keep the context budget in check

Each server adds tool definitions to every request, and documentation pages are long. In our test, one GitMCP search_generic_documentation call returned about 17,000 characters. So:

Safety and privacy

Private or offline docs

Browse more servers in the directory under MCP servers, or use the pick-an-mcp-server skill to have your agent choose.

Directory entries in this guide

Related

Sources

Machine-readable