Context7

  • MCP server
  • Official

Context7 feeds Claude current, version-specific library docs and code examples, so it stops writing code against APIs that no longer exist.

On this page8 sections

Best for

  • Getting code that matches the library version you actually use
  • Setting up a framework you have never used before
  • Cutting down on made-up functions in generated code

Quick install

Remote server at https://mcp.context7.com/mcp, or local stdio server via npx

Before you start

  1. Get a free API key at context7.com/dashboard (opens in a new tab) (recommended for higher rate limits).

  1. Get a free API key at context7.com/dashboard (opens in a new tab) (recommended for higher rate limits).

  2. Claude Code (remote):

    claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
  3. Claude Code (local):

    claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
  4. Claude Desktop or claude.ai: Settings > Connectors > Add custom connector, name Context7, URL https://mcp.context7.com/mcp.

  5. Or run

    npx ctx7 setup --claude

    to have Context7's CLI configure Claude Code for you (needs Node.js 22.13+).

At a glance

Type
MCP server
Made by
Upstash (official)
Tested by us
Not yet
Works with
  • Claude.ai
  • Claude Desktop
  • Claude Code
Sign-in needed
NoWorks without a key at low limits; a free API key from context7.com/dashboard raises them. In our sandbox test the keyless call hit the monthly quota.
Cost
Free API key available. Context7's README does not publish paid tiers; check context7.com for current plans.
License
MIT
Registry name
io.github.upstash/context7
Facts checked

What it does (plain English)

Claude learned about programming libraries from training data that has a cut-off date. When a library changes after that, Claude can confidently suggest functions that were renamed or removed. Context7 fixes this by fetching the current documentation and code examples for the library you name and putting them straight into Claude’s context.

It is an MCP server (a plug-in that gives Claude a new ability) with exactly two tools:

ToolWhat it does
resolve-library-idTurns a name like “next.js” into a Context7 library ID such as /vercel/next.js
query-docsPulls the relevant docs and examples for that ID and your question

Context7 is run by Upstash. The MCP server code is open source (MIT), but the README notes the API backend, parsing and crawling engines are private.

Is it for you?

Pick it if you build with fast-moving tools (Next.js, Astro, Supabase, Tailwind, Cloudflare Workers) and you have ever pasted an error back into Claude only to learn the method it suggested does not exist. It is one of the easiest servers to start with: two tools, no account required to try it.

You do not need it for general writing or non-code work. And remember the docs come from a community-contributed index; Context7’s own disclaimer says it cannot guarantee accuracy or security of every library page.

What you can do with it

  • Add “use context7” to a prompt: the README’s own example is “Create a Next.js proxy that checks for a valid JWT in cookies and redirects unauthenticated users to /login. use context7”.
  • Skip the lookup step: if you know the ID, say it. “Implement basic authentication with Supabase. use library /supabase/supabase for API and docs.”
  • Ask for a specific version: “How do I set up a Next.js 16 proxy? use context7” and it matches the version.
  • Make it automatic: add a line to your project’s CLAUDE.md such as “Always use Context7 when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask.”

How to set it up

  1. Get a key (recommended). Sign in at https://context7.com/dashboard and create a free API key. The README recommends this for higher rate limits.

  2. Claude Code, remote server:

    claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp

    Or local server:

    claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
  3. Claude Desktop or claude.ai: go to Settings > Connectors > Add custom connector. Name it Context7 and use the URL https://mcp.context7.com/mcp. Context7’s client page does not show a way to pass an API key in this flow, so we can’t confirm which rate limits apply there. For Desktop with a key, use the config file instead:

    {
      "mcpServers": {
        "context7": {
          "command": "npx",
          "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
        }
      }
    }

    Anthropic’s help centre lists custom connectors for Pro, Max, Team and Enterprise plans; on Team and Enterprise only an Owner can add one.

  4. One-command option: npx ctx7 setup --claude signs you in, creates a key and configures Claude Code. It needs Node.js 22.13 or newer. Undo it with npx ctx7 remove.

What we checked (2026-10-18): we ran npx -y @upstash/context7-mcp (version 4.4.2) without a key, completed the MCP handshake and listed both tools. A follow-up resolve-library-id call for “astro” returned “Monthly quota exceeded. Create a free API key at https://context7.com/dashboard for more requests.” Our sandbox shares its network address with other traffic, so your keyless experience may differ, but it shows why the free key is worth the minute it takes.

Watch out for

  • Keyless limits are real. See our test above. Set up the key before you rely on it.
  • Docs are community-indexed. Context7 says projects are maintained by their owners, not Context7, and provides a Report button for suspicious content. Treat fetched docs as helpful input, not gospel.
  • Keep your key out of shared files. If you add it with --scope project, it lands in .mcp.json, which teams often commit to Git.
  • It answers library questions only. It will not help with your business logic or your own private code.

Alternatives

  • Cloudflare’s documentation server (https://docs.mcp.cloudflare.com/mcp) if you only need Cloudflare docs.
  • Vercel MCP and Supabase MCP both include docs-search tools for their own platforms.
  • Exa MCP for broader web search when the answer is in a blog post or GitHub issue rather than official docs.

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. github.com/upstash/context7 (opens in a new tab)
  2. raw.githubusercontent.com/upstash/context7/master/README.md (opens in a new tab)
  3. context7.com/docs/resources/all-clients (opens in a new tab)
  4. registry.modelcontextprotocol.io/v0.1/servers?search=context7 (opens in a new tab)
  5. npmjs.com/package/@upstash/context7-mcp (opens in a new tab)
  6. support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp (opens in a new tab)
  • Filesystem MCP server

    by Model Context Protocol project

    • MCP server
    • Official
    • Tested by us

    The MCP project's reference server that lets Claude read, write, move and search files, but only inside folders you name.

    Works with
    • Claude Desktop
    • Claude Code
  • Google Drive connector

    by Google

    • Connector
    • Official

    Google's connector for Claude: search your Drive, read Docs, Sheets, Slides, PDFs and Office files, and add Drive files to chats and projects.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
  • PDF skill

    by Anthropic

    • Skill
    • Official

    Anthropic's skill for PDF work: extract text and tables, merge, split, watermark, OCR scans, create new PDFs and fill in forms.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
  • PowerPoint (pptx) skill

    by Anthropic

    • Skill
    • Official

    Anthropic's skill for building, editing and reading PowerPoint decks, with template support, slide thumbnails and a required visual check.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code