Context7: Documentation
Updated:
Connection
- Remote:
https://mcp.context7.com/mcp(Streamable HTTP), optionalCONTEXT7_API_KEYheader. - Local:
npx -y @upstash/context7-mcp. - Quick client setup:
npx ctx7 setup.
Tools
resolve-library-id— find a library by name (e.g. "next.js") and get its Context7 ID with relevance ranking.query-docs— fetch version-specific docs and code examples for a specific question about the resolved library.
Agent flow
Before writing code against an external library: resolve-library-id → query-docs → code from fresh docs, not from memory.
Limits and pricing
- Free — $0, 1,000 calls/month (+20 bonus calls a day once the limit is hit), public libraries only.
- Pro — $10/seat/month, 5,000 calls included, private repos and team collaboration, extra calls at $10 per 1,000.
- Enterprise — $2.5 to $30 per user/month depending on team size, SSO/SAML, self-hosted option.
- Works without an API key too, at a lower rate limit; a free key is available at context7.com/dashboard.