Context7 MCP alternatives, and where each one gets its docs

Context7 and Ref ask a hosted index; docs-mcp-server keeps one on your disk.

Context7 MCP and Ref MCP send every lookup to a hosted index on their own servers, while docs-mcp-server keeps the index on your disk and GitMCP answers about one GitHub repository. Use Context7 when you want library docs with no account. Switch to Ref when you also need your private repos and PDFs, or every token of context counts.

Measured by agentmods, live: context7, ref-tools-mcp
ModTypeStarsLast pushLicenceScanTokensWorks with
context7upstash/context7MCP server64kyesterdayMITA—Claude Code, Codex, Cursor, Gemini CLI, OpenCode
ref-tools-mcpref-tools/ref-tools-mcpMCP server1.2k13d agoMITA—Claude Code, Codex, Cursor, Gemini CLI, OpenCode

Install

context7
npx agentmods add mcp/upstash/context7/context7
npx agentmods add mcp/ref-tools/ref-tools-mcp/ref-tools-mcp

Each name opens the mod's page: the scan, the token cost and every other way to install it.

Context7 MCP and Ref are thin clients for hosted indexes

The Context7 server you install from npm forwards each lookup to context7.com/api, and its README says the API backend, parsing engine and crawling engine are private. Ref’s stdio server does the same with api.ref.tools, for searches and for every URL it reads. The code in these repositories tells you little about answer quality, since ranking, freshness and coverage are decided on servers whose code is not in them.

Projects in Context7’s index are community-contributed, and its disclaimer says it cannot guarantee the accuracy, completeness or security of that documentation. Each search result carries a source reputation (High, Medium, Low or Unknown) and a benchmark score out of 100. Your query goes to the Context7 API too, and the tool description tells the agent not to include API keys, credentials or proprietary code.

Ref’s 5k-token reads against Context7’s three-call cap

On context size, Context7 vs Ref comes down to two different mechanisms. Within one MCP session Ref never returns a search result twice, so the agent can rephrase and page at once. When it reads a page, it uses the session’s search history to drop less relevant sections and returns the most relevant 5k tokens. Your private repos and PDFs uploaded to Ref are searched only when the query includes ref_src=private.

Instructions are how Context7 controls cost. The agent must call resolve-library-id before query-docs, unless you put an ID like /supabase/supabase in the prompt, and both tool descriptions say not to call them more than 3 times per question. A third tool, for docs feedback, appears only in research preview. Our scans don’t count tokens for MCP servers yet, so the table can’t settle which costs less. Context7 also works without MCP. The ctx7 CLI installs a skill such as find-docs, and the agent fetches docs through shell commands.

Keys and Node versions

No account is needed for Context7. In Claude Code run claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp, or use https://mcp.context7.com/mcp with a Bearer header. The optional key buys higher rate limits and private repositories. The MCP server (4.5.1 at this commit) wants Node 20.18.1 or newer, the ctx7 CLI 22.13.

Ref wants a key in both setups. Its README recommends the hosted HTTP endpoint, calls this repository (3.0.3) the legacy stdio server and lists no prices. With an OpenAI client, such as deep research, the same two tools appear as search and fetch.

Which server is the real DeepWiki MCP?

Today the name means the official hosted server at mcp.deepwiki.com, documented on docs.devin.ai. We found no public repository for it, so we could not read its code. A config file in GitHub’s gh-aw project describes it as a remote server for GitHub repository docs, with no authentication and three tools: read_wiki_structure, read_wiki_contents and ask_question, the last one AI-powered Q&A about a repo. That is a third party’s note, not a spec. It also means Context7 vs DeepWiki is not a like-for-like choice, since Context7 resolves a library and queries its docs while DeepWiki answers about one repository.

The open-source regenrek/deepwiki-mcp scraped deepwiki.com. Its README now says it no longer works because DeepWiki cut off scraping, and points to the official server. sopaco/deepwiki-rs is something else again. It is Litho, a Rust tool that generates DeepWiki-like docs for your own codebase, since evolved into Terrain. Our catalogue lists its entries as skills, and none fetch library docs.

GitMCP, the per-repo server you can read

GitMCP does the DeepWiki job with open, Apache-2.0 code you can host yourself. Every public GitHub project gets an address, gitmcp.io/{owner}/{repo}, and using that URL instead of the generic gitmcp.io/docs keeps the agent away from unintended repositories. It reads llms.txt first, then an AI-optimized version of the docs, then the README. Search runs through an AutoRAG pipeline with a simpler fallback, and a separate tool uses GitHub’s code search. The README says the service is free, stores no queries and needs no authentication.

docs-mcp-server keeps the index on your disk

docs-mcp-server starts empty. You add a library in its web UI (or the agent calls scrape_docs) from websites, GitHub, npm, PyPI or local folders, and each version is stored separately in SQLite, so a search targets the version your project uses. Refreshing is your job too, through refresh_version or the CLI.

Document text goes only to the embedding provider you configure, so a local one such as Ollama keeps it on your machine. Configure embeddings before indexing. Without a model it searches full text only, and earlier pages get no vectors until you scrape them again with --replace. It has 12 tools, six in --read-only mode, and needs Node 22 or Docker (version 3.4.1 here). Usage telemetry goes to PostHog by default until you pass --no-telemetry or set DOCS_MCP_TELEMETRY=false.

Sources

upstash/context7 at 078c0c7
README.md · packages/mcp/README.md · packages/mcp/src/index.ts · packages/mcp/src/lib/constants.ts · packages/mcp/src/lib/api.ts · packages/mcp/src/lib/research-preview-tools.ts · packages/mcp/package.json

ref-tools/ref-tools-mcp at ae59ed1
README.md · index.ts · package.json

idosal/git-mcp at c487a29
README.md · src/api/tools/commonTools.ts · LICENSE

arabold/docs-mcp-server at aa8b5b7
README.md · docs/guides/mcp-clients.md · docs/infrastructure/telemetry.md · package.json

regenrek/deepwiki-mcp at d62d749
README.md

github/gh-aw at 8f32243
.github/workflows/shared/mcp/deepwiki.md

sopaco/deepwiki-rs at 19e71a1
README.md