Direct answer
Context7 MCP gives a coding agent current, version-specific documentation and code examples for the libraries it uses. It runs over local stdio or the remote URL https://mcp.context7.com/mcp, needs an API key or OAuth, and exposes 2 tools.

What Context7 MCP does
Context7 MCP gives a coding agent current, version-specific documentation and code examples for the libraries it uses. The agent finds a library with one tool and queries its docs with the other, so it writes code against the version you installed.
Upstash maintains it. The latest release on npm is @upstash/context7-mcp 4.6.0, published November 9, 2026. It is licensed under MIT.
How a coding agent uses Context7 MCP
The agent asks, Context7 MCP acts, and the result comes back into the session.

- The agent asks: Use the current Tailwind docs for this component
- Context7 MCP acts: Resolves the library ID and queries its docs
- The result comes back: Version-specific docs and code examples
Install Context7 MCP in Claude Code
claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcpInstall Context7 MCP in Cursor
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Install Context7 MCP in VS Code
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Install Context7 MCP in Codex
codex mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEYThe 2 tools Context7 MCP gives your agent
Context7 MCP lists these names in its own documentation, read on November 12, 2026. Your agent sees each one as a tool it can call.
- resolve-library-id
- query-docs
Settings worth knowing in Context7 MCP
| Setting | What it changes | Server |
|---|---|---|
--api-key <key> | What it changes API key for stdio transport (or set CONTEXT7_API_KEY env var). Not allowed with --transport http | Server Context7 MCP |
--transport <stdio|http> | What it changes Transport to use. Default stdio. | Server Context7 MCP |
--port <number> | What it changes Port to listen on when using http transport. Default 3000. | Server Context7 MCP |
/mcp/oauth endpoint | What it changes Change the endpoint from /mcp to /mcp/oauth to use OAuth. | Server Context7 MCP |
use library /org/repo in the prompt | What it changes Add a Context7 library ID to the prompt to skip the library-matching step. | Server Context7 MCP |
Sign-in, limits and caveats for Context7 MCP
Sign-in: API key (free from context7.com/dashboard) sent as Authorization: Bearer header for remote or --api-key / CONTEXT7_API_KEY for local stdio; OAuth 2.0 on the remote /mcp/oauth endpoint only. The API works without a key at low rate limits.
Limits and price: Free: $0; 1,000 API calls per month (Search API + Context API); public repositories only. After the monthly limit Free users are blocked but get 20 bonus API calls per day until the month resets. Pro: $10 per seat per month; 2,000 API calls per seat per month, then $5 per 1,000 additional calls; private repositories; private repo parsing $5 per 1M tokens. Pro users are never blocked. Enterprise: Custom; adds SOC-2, SSO (SAML/OIDC), self-hosted option.
- OAuth is only available for remote HTTP connections; local stdio needs an API key.
- The ctx7 setup CLI requires Node.js 22.13 or newer (the MCP package itself declares node >=20.18.1 on npm).
- Library docs are community-contributed; Upstash does not guarantee their accuracy, completeness or security.
Use Context7 MCP for interface work
Before an agent writes UI code, it can call resolve-library-id and query-docs to pull current docs for the UI framework or component library it uses, such as Next.js or Tailwind, so the components match the installed version.
Steal this workflow
Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.
Read the guide "Context7 MCP: install, tools and limits" at https://better-design.com/blog/context7-mcp and help me apply it to my project.
Context7 MCP gives a coding agent current, version-specific documentation and code examples for the libraries it uses. It runs over local stdio or the remote URL https://mcp.context7.com/mcp, needs an API key or OAuth, and exposes 2 tools.
Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.
Questions
What does Context7 MCP do?
Context7 MCP gives a coding agent current, version-specific documentation and code examples for the libraries it uses. The agent finds a library with one tool and queries its docs with the other, so it writes code against the version you installed.
Does Context7 MCP need an API key or sign-in?
API key (free from context7.com/dashboard) sent as Authorization: Bearer header for remote or --api-key / CONTEXT7_API_KEY for local stdio; OAuth 2.0 on the remote /mcp/oauth endpoint only. The API works without a key at low rate limits.
Is Context7 MCP free?
Free: $0; 1,000 API calls per month (Search API + Context API); public repositories only. After the monthly limit Free users are blocked but get 20 bonus API calls per day until the month resets. Pro: $10 per seat per month; 2,000 API calls per seat per month, then $5 per 1,000 additional calls; private repositories; private repo parsing $5 per 1M tokens. Pro users are never blocked. Enterprise: Custom; adds SOC-2, SSO (SAML/OIDC), self-hosted option.
Which coding agents can use Context7 MCP?
Its documentation shows a setup for Claude Code, Cursor, VS Code, Codex. Any client that speaks MCP over local stdio or the remote URL https://mcp.context7.com/mcp can connect.
Where these Context7 MCP facts come from
Each fact on this page comes from Context7 MCP's own repository, documentation or package registry, read on November 12, 2026.
- Upstash (GitHub): github.com/upstash/context7/blob/master/README.md
- Context7 docs (Upstash): context7.com/docs/resources/all-clients
- Context7 docs (Upstash): context7.com/docs/resources/developer
- Context7 (Upstash): context7.com/plans
- Context7 docs (Upstash): context7.com/docs/api-guide
- npm: www.npmjs.com/package/@upstash/context7-mcp
Related
Add design rules next to it
Context7 MCP gives the agent its tools. It does not tell the agent what a good screen looks like. Better Design adds that part: a design system, interface principles and review rules that the agent calls while it builds.