On this page
- Context7 alternatives at a glance
- What Context7 does well
- Library docs and your own code are different questions
- Context7 alternatives for library docs
- How to give agents your own docs
- If you already publish a docs site
- If your code has no docs worth serving
- If the agent needs the code's structure
- How to connect Mintlify docs to Claude Code or Cursor
- What I would set up
- How we checked
- FAQ
Context7 is the usual answer when an agent guesses library APIs; the main alternatives are Ref, GitMCP and the free DeepWiki MCP server. None of them answer questions about your own code, which needs a repo-level wiki, dependency graph and history served over MCP, from tools like repowise, DeepWiki (public repos) or Mintlify (docs sites). Facts below are as of October 2026, from each vendor's own site, docs or repository.
Context7 alternatives at a glance
| Tool | What it serves the agent | Your private code or docs | Self-host | Price (checked 2026-10-12 for Context7, 2026-10-06 for others) |
|---|---|---|---|---|
| Context7 | Version-specific library docs and code examples | Yes on Pro: GitHub, GitLab, Bitbucket, other Git, Confluence, OpenAPI | On-prem on Enterprise | Free: 1,000 API calls a month, public only. Pro: $10 per seat a month, private parsing $5 per 1M tokens |
| Ref | Search and read tools over docs, tuned to return few tokens | Yes, private repos and PDFs | No | API key required; plans on ref.tools |
| GitMCP | A remote MCP server per public GitHub repo, reading llms.txt, README and docs | No, public repos only | Open source, Apache-2.0 | Free |
| DeepWiki MCP | Generated wiki pages and answers about a repo | Not on the free server; private repos go through a Devin account | No | Free for public repos |
| Mintlify MCP | Search and page reads over a docs site hosted on Mintlify | Yes, including authenticated content | No | Part of a Mintlify docs site |
| repowise | Wiki, dependency graph, git history, ownership and health for your code, through ten MCP tools | Yes, private repos on Pro ($15 a month) or self-hosted | Yes, open source, AGPL-3.0 | Free for public repos and self-hosting |
Scroll the table sideways to see every column.
What Context7 does well
We have all watched an agent write a confident import for a function the library renamed, or never had, because models learn libraries from training data that goes stale. Context7, built by Upstash, solves that narrow problem very well: it fetches current docs from the library's source, keeps them per version, and puts the relevant snippets into the prompt when you add "use context7" or the agent calls its tools.
The MCP server exposes two tools, resolve-library-id and query-docs. The server code is open source under MIT, with about 62,900 GitHub stars, while the API backend, parsing engine and crawler are private. Setup is npx ctx7 setup, which can run as a CLI with skills or as an MCP server. An API key is optional, but it raises your rate limits.
The Free plan covers public libraries with 1,000 API calls a month. Pro is $10 per seat a month with 2,000 calls per seat, extra calls at $5 per 1,000, and private sources parsed at $5 per 1M tokens. Enterprise adds SSO, SOC 2 and self-hosted deployment.
Context7 also does more than people assume. On Pro you can add private sources from GitHub, GitLab, Bitbucket, any Git host, Confluence or an OpenAPI spec, and tick "Generate docs" to have it write documentation for repos that have little. So the useful test is whether your question is shaped like a library lookup.
Library docs and your own code are different questions
The difference is easiest to see with two questions side by side. A library question looks like this: how do I write Next.js middleware that checks a JWT cookie? The answer lives in someone else's docs, it is the same for everyone on that version, and a ranked list of snippets is the right shape for it.
A question about your own code looks like this: if I change how we validate sessions, what breaks? No doc has that answer, because it lives in the structure of your repository: which files import the session module, which services call it, which files always change together with it, who owns it, and whether it already has a bug history. Snippets of prose, even good prose, do not carry that.
The gap comes from how retrieval works. Docs retrieval returns text that matches the query, and codebase questions need relations: callers, dependents, co-change partners, owners. A tool that only indexes text can describe your session module, but it cannot tell the agent how many other files depend on it.
Context7 alternatives for library docs
If you want what Context7 does from a different vendor, or with different trade-offs, these are the options I would look at. All facts are from each project's own page or repository.
Ref is an MCP server with two tools, ref_search_documentation and ref_read_url, designed around token efficiency. It tracks what the agent already searched in the session so it never returns the same result twice, and when it reads a long docs page it returns the most relevant 5k tokens instead of the whole page. It searches public docs and private resources such as repos and PDFs, and the MCP server is MIT licensed and needs an API key.
GitMCP needs no setup: replace github.com with gitmcp.io in any public repo URL and you have a remote MCP server for that project. It reads the repo's llms.txt, llms-full.txt, README and docs. It is free and open source (Apache-2.0, about 8,500 stars), but it only works with public GitHub repos and only knows what the project wrote down.
DeepWiki MCP is Cognition's free server at mcp.deepwiki.com/mcp. It needs no auth and exposes read_wiki_structure, read_wiki_contents and ask_question over the wikis DeepWiki generates for public repos. That helps when a library's own docs are thin, because the wiki is written from the code. Private repos need a Devin account and the Devin MCP server.
One note for anyone comparing older lists: the docfork/docfork repository is archived on GitHub, so check its status before you build on it.
How to give agents your own docs
Most "Context7 alternatives" lists skip your own code, which is a little odd, since that is the code the agent spends its day editing. Which tool fits depends on what you already have.
If you already publish a docs site
If you already have a docs site, serve it to agents directly. A site on Mintlify already has an MCP server at its /mcp path (or /authed/mcp for authenticated content), with tools to search, browse the docs as a filesystem, and send feedback. Context7 Pro can also ingest a private docs repo or Confluence space, and failing both, you can publish an llms.txt and let GitMCP or a plain fetch tool read it.
If your code has no docs worth serving
We have all opened an internal repo whose README is mostly a TODO, and most internal repos are in some version of that state. So you need something that writes the docs from the code. DeepWiki does this for public repos, and Context7's "Generate docs" option does it for private sources on Pro. repowise does it from a full index of the repo, and that is where I would point the agent for your own code, because the docs are only one of the things the agent can ask it for.
If the agent needs the code's structure
Real changes to real code need more than a description. Before an agent edits something, it needs to ask for an architecture overview, the callers of a function, the files that change together, the risk of a change, and why the code is shaped the way it is, and repowise builds those from the repository itself and serves them through ten MCP tools such as get_overview, get_context, get_risk and get_why, and any file's blast radius shows what depends on it. It runs self-hosted from pip install repowise, or hosted, where public repos are free and private repos need Pro.

repowise covers your own code, and Context7 covers the libraries you import. That is why the sensible setup is two servers, one for each kind of question.
How to connect Mintlify docs to Claude Code or Cursor
Mintlify's docs give the commands, and for Claude Code it is one line:
claude mcp add --transport http your-docs https://docs.example.com/mcp
For Cursor, open the command palette, search for "Open MCP settings", and add the same URL to mcp.json. The same pattern works for any remote MCP server. Context7's server is https://mcp.context7.com/mcp with your API key as a Bearer header, and a hosted repowise repo is https://api.repowise.dev/mcp/OWNER/REPO, with the setup steps in the connection guide.
What I would set up
For library docs, I would pick Context7 or Ref. Pick Context7 if you want the most widely used option and a simple "use context7" habit, and pick Ref if token cost per call matters most to you. Add GitMCP or DeepWiki MCP for the odd public repo whose docs neither covers.
For your own code, I would add one repo-level server that knows structure and history as well as text. If your agents edit code as well as answer questions about it, that is the server that saves you from the "it compiled but broke three callers" class of bug.
After that, I would stop adding servers. Every MCP server you add puts its tool descriptions in the agent's context, and every extra tool is one more the agent can pick by mistake. We wrote about that failure mode in your MCP server is probably not being called, and for a wider view of documentation tools for agents, see best codebase documentation tools for AI coding agents.
Two servers, one for the libraries you borrow and one for the code you own, is usually enough for the agent to stop importing functions that do not exist.
How we checked
We read every feature, price and licence from the vendor's own site, docs or GitHub repository. Context7 pricing and stars were re-checked on 2026-10-12; the other rows on 2026-10-06. We did not run a retrieval benchmark between these tools, so nothing here ranks answer quality. Prices change often, so check the linked pages before you buy. Our repowise row is from release 0.56 and the repowise MCP tools reference. We build repowise.
FAQ
- Is Context7 free?
- Context7 has a free plan for individuals with 1,000 API calls a month on public libraries. Pro costs $10 per seat a month, includes 2,000 calls per seat with extra calls at $5 per 1,000, and adds private sources parsed at $5 per 1M tokens. Enterprise pricing is custom.
- Does Context7 work with private repositories?
- Yes, on Pro and Enterprise. You can add private sources from GitHub, GitLab, Bitbucket, other Git hosts, Confluence and OpenAPI specs, and optionally have Context7 generate docs for repos with little written documentation. What it serves back is documentation and code snippets, not the dependency graph or git history of the repo.
- What is the difference between Context7 and DeepWiki?
- Context7 indexes library documentation and serves version-specific snippets for API questions. DeepWiki generates a wiki from a repository's code and lets an agent read it or ask questions about it. Context7 is the better fit for "how do I use this library", and DeepWiki is the better fit for "how does this repo work", on public repos for free.
- What are the best documentation platforms for AI agents?
- It depends on the source. For third-party libraries, Context7 and Ref are built for it. For your own published docs, a docs host with an MCP server such as Mintlify, or an
llms.txtfile, works. For your own code with little documentation, use a tool that generates docs from the code and serves them over MCP, such as DeepWiki for public repos or repowise for public and private ones. - Can I use Context7 and repowise together?
- Yes, and that is the setup I would recommend for most teams. Context7 answers questions about the libraries you depend on; repowise answers questions about your own code, such as what depends on a file and who owns it. They do not overlap much, so the agent rarely has to choose between them.



