Context7 gives your AI agent up-to-date documentation for the libraries you use. Models learn APIs at training time and then guess, which is how you get code calling functions that were renamed two versions ago. With Context7, the agent looks the library up first and writes code from the current docs and examples, for the version you name. It has two tools, both read-only, and needs no account.
Prompts to try
- "How do I protect a group of routes in Next.js 16? use context7"
- "Write a Drizzle migration that adds a unique index. Check the Drizzle docs first."
- "Implement email login with Supabase. use library /supabase/supabase"
- "What changed in the React Router data APIs in the latest major version?"
Gotchas
- Your question leaves your machine. Each lookup sends the library name and a short query your agent writes to Context7's API. The tool's own description tells the agent to keep secrets and proprietary code out of it. Keep an eye on what it sends when you work on private code.
- Only the MCP server is open source. The repository holds the server; the API backend, parsing and crawling engines behind it are private.
- Rate limits without a key. Anonymous use works but is limited. If lookups start failing, get a free key.
- It can crowd out other tools. Its instructions ask the agent to use it for any library question, "even when you think you know the answer". That is the point, but it costs a call or two per question.
When not to use it
For a library your agent already knows well and that has not changed in years, it adds calls for nothing. For Cloudflare's own products, the Cloudflare Docs MCP server searches the source directly.