Context7
Give Claude Code Up-to-Date Library Docs With Context7
Connect Context7 to Claude Code so the agent reads current, version-specific library documentation instead of guessing from old training data, then verify it works by asking about a library.
- Beginner
- 5 steps
- Free
By JinUpdated 21 Nov 2026
Every step checked against Upstash's own docs on 21 Nov 2026

Overview
You ask Claude Code to build an app, and it writes code using a library version that does not match what you have installed. The import fails, Claude investigates, rewrites, and tries again - costing time and tokens. Context7 is an open-source MCP server from Upstash that feeds Claude Code current, version-specific documentation and code examples straight from the source. In this guide you will connect Context7 to Claude Code, then verify it works by asking about Next.js routing. You need a computer with Node.js 22.13 or later and a free Context7 account. As of November 2026, Context7 is free to start with 1,000 API calls per month, and no API key is required for the OAuth sign-in flow.
Before you start
- A computer with Node.js 22.13 or later installed
- Claude Code installed and accessible from your terminal
- A free Context7 account (sign up at context7.com)
- A web browser for the OAuth sign-in flow
Step by step
0 of 5 done
Your ticks stay in this browser.
Step 1 of 5
Install Context7 for Claude Code
Run the setup command that configures Context7 as an MCP server for Claude Code. This authenticates via OAuth, generates an API key, and installs the appropriate skill.
Do this
0 of 3 done
What you should see
The command finishes without error and reports that Context7 is installed for Claude Code.
If it didn't work
If the command fails, confirm you have Node.js 22.13 or later by running node --version. If you are on a headless, SSH, or CI host, use the API key method instead - see the Context7 dashboard to create or manage API keys.
Checked againstcontext7.com context7.com
Frequently asked questions
How much does Context7 cost?
Context7 is free to start. The Free plan includes 1,000 API calls per month, every public library, library owner tools, Context7 Ask for up to three sites, and Docs7 Free for up to three hosted documentation sites. When you use all 1,000 calls, requests stop until the next month, with 20 bonus calls each day. Pro costs $10 per seat per month with 2,000 calls per seat per month. As of November 2026, see context7.com/docs/plans-pricing for current prices.
Do I need an API key?
No. The OAuth sign-in flow does not require an API key. You only need an API key if you are on a headless, SSH, or CI host, or if you want to manage keys in the Context7 dashboard.
Who can see my code and queries?
Context7 runs on SOC 2 Type II infrastructure. Your queries and the documentation retrieved are part of your Claude Code session. Check Context7's privacy policy and terms for details on data handling.
What if I use more than 1,000 API calls per month?
On the Free plan, requests stop until the next month when you hit the limit, with 20 bonus calls each day. Upgrade to Pro for $10 per seat per month to get 2,000 calls per seat per month, or buy additional calls at $5 per 1,000.
Can I use Context7 with other coding agents?
Yes. Context7 supports Claude Code, Codex, Cursor, VS Code, OpenCode, Devin, GitHub Copilot CLI, and other MCP clients. See context7.com/docs/resources/all-clients for setup steps per client.



