Skip to content

Context7

Upstash's two-tool server that feeds coding agents current, version-specific library docs, from a hosted index you cannot see inside.

Reviewed by Sheela · Updated

Our rating

4.5/5

Cheap insurance against invented APIs, provided you remember that every answer comes from a closed, community-fed index your agent will trust without question.

What it is

Context7, from Upstash, gives coding agents up-to-date documentation for libraries and frameworks. Instead of relying on training data, the agent asks Context7 for the docs of the exact library and version you use, and gets back relevant excerpts and code examples.

The MCP server exposes two tools: resolve-library-id, which turns a name such as next.js into a Context7 ID, and query-docs, which fetches documentation for that ID. You can connect to the hosted server at https://mcp.context7.com/mcp with an API key, run the @upstash/context7-mcp package locally, or run npx ctx7 setup, which signs you in with OAuth and can install a CLI-plus-skill mode that skips MCP entirely.

The repository has about 63,500 GitHub stars and is MIT licensed, but it holds only the MCP server and CLI. The API backend, parser and crawler that build the index are private.

Install

https://mcp.context7.com/mcp

Our review

Context7 fixes a real and expensive problem for very little context: two tool definitions, and a rule in CLAUDE.md or Cursor rules to make the agent call them. Stale knowledge of fast-moving libraries such as Next.js or Supabase is one of the commonest reasons AI-written code fails, and a docs lookup is a cheaper fix than a failed build.

The pricing is simple, with one catch for teams. Free stops at 1,000 calls a month and then allows 20 bonus calls a day. Pro is $10 a seat with 2,000 calls each and $5 per 1,000 beyond that, but the plans page is explicit that allowances are per seat and not pooled, so one heavy user pays overage while a colleague's calls go unused. A typical lookup costs two calls, one to resolve the library and one to query it, unless the prompt already names the library ID.

The trust question deserves more weight than it usually gets. Library entries are community-contributed, and Upstash's own disclaimer says it cannot guarantee their accuracy or security. In May 2026 users reported query-docs responses carrying a block addressed to the assistant, asking it to offer to run npx ctx7 setup with an auto-approve flag. Upstash said it was its own test of prompting anonymous users to sign in and switched it off after pushback, but it showed how easily the docs channel can carry instructions.

The value is the index, not the protocol. Upstash now promotes a CLI-plus-skills mode alongside MCP, and Enterprise adds SSO, SOC 2 and a self-hosted option for teams that cannot send queries to a third party. Compared with a generic fetch server, Context7 returns trimmed, version-matched excerpts instead of whole pages, which is where the token saving comes from.

Where it earns its place

  • A full-stack developer upgrading a Next.js app to a new major version

    Stop the agent writing code against APIs that were removed

    Add a rule telling the agent to use Context7 for library questions, and name the version in the prompt. Around 30 lookups a working day at two calls each fits inside Pro's 2,000 calls for $10 a month.

  • An engineering manager with 25 developers using Cursor and Claude Code

    Budget for docs lookups across the team

    Pro is $250 a month for 25 seats and 50,000 calls, but allowances are per seat, so heavy users pay $5 per 1,000 extra. Enterprise starts at $30 a user for small teamspaces and adds SSO.

  • A platform team at a company with an internal SDK

    Give agents accurate docs for private repositories

    Pro and Enterprise index private repos at $5 per million tokens parsed, charged on each add or refresh. Teams that cannot send queries outside need the Enterprise self-hosted option, priced through sales.

Before you commit

Setup
npx ctx7 setup (Node.js 22.13 or newer) signs in with OAuth, creates a key and configures Cursor, Claude Code or OpenCode in a few minutes; otherwise point a client at https://mcp.context7.com/mcp with an Authorization Bearer key. Manual guides cover more than 30 clients.
Integrations
Two tools, both read-only: resolve-library-id and query-docs (with an optional language to rank examples). Also a ctx7 CLI, a TypeScript SDK, Vercel AI SDK tools and a REST API.
Data and privacy
Upstash says only the lookup query and library name are sent. Returned docs are third-party, community-submitted content, so they are a prompt-injection channel; in May 2026 users flagged agent-directed sign-in instructions in query-docs output (issues 2663 and 2673), which Upstash withdrew. Free and Pro list GDPR compliance; SOC 2, SSO and RBAC are Enterprise.
Cost at scale
A 10-developer team on Pro pays $100 a month for 20,000 calls; at two calls per lookup that is about 1,000 lookups a developer a month before $5 per 1,000 overage. Private repo parsing adds $5 per million tokens.
Limits
Free accounts are blocked at 1,000 calls until the month resets, apart from 20 bonus calls a day. No per-minute rate limits are published, and coverage depends on whether a library has been submitted and parsed.

What's good

  • Two tools, so almost no context overhead
  • Version-matched excerpts rather than whole doc pages
  • Hosted endpoint, local npm package or a CLI-and-skill mode
  • Only the query and library name are sent, not your code, per Upstash

What's not

  • Index backend is closed; you depend on Upstash's service
  • Community-submitted docs can be wrong, and have carried agent-directed text
  • Pro call allowances are per seat and cannot be pooled
  • SSO, SOC 2 and self-hosting are Enterprise only

Best for

Developers using AI coding agents with fast-moving libraries such as Next.js, Supabase or Tailwind.

Alternatives

Context7: common questions

Is Context7 worth it?
Cheap insurance against invented APIs, provided you remember that every answer comes from a closed, community-fed index your agent will trust without question. We rate it 4.5 out of 5.
How much does Context7 cost?
Free: 1,000 calls a month, then 20 bonus calls a day. Pro: $10/seat/month with 2,000 calls per seat, then $5 per 1,000. Enterprise custom (small teams $30/user/month).
What are the downsides of Context7?
Index backend is closed; you depend on Upstash's service; community-submitted docs can be wrong, and have carried agent-directed text; pro call allowances are per seat and cannot be pooled; sSO, SOC 2 and self-hosting are Enterprise only.
Who is Context7 best for?
Developers using AI coding agents with fast-moving libraries such as Next.js, Supabase or Tailwind.
How much does Context7 cost for a team or in production?
A 10-developer team on Pro pays $100 a month for 20,000 calls; at two calls per lookup that is about 1,000 lookups a developer a month before $5 per 1,000 overage. Private repo parsing adds $5 per million tokens.
Is Context7 safe for company data?
Upstash says only the lookup query and library name are sent. Returned docs are third-party, community-submitted content, so they are a prompt-injection channel; in May 2026 users flagged agent-directed sign-in instructions in query-docs output (issues 2663 and 2673), which Upstash withdrew. Free and Pro list GDPR compliance; SOC 2, SSO and RBAC are Enterprise.
What are the best Context7 alternatives?
The closest alternatives we have reviewed are Fetch (reference server) and Firecrawl MCP.

Answers checked Oct 22, 2026.

Make Context7? Show this rating on your siteContext7 rated 4.5 out of 5 on ReviewRamble