MCP server · an Upstash project · MIT licensed

Stop shipping
hallucinated APIs.

Context7 pulls up-to-date, version-specific documentation straight from the source and injects it into your AI's prompt — so Claude, Cursor and Codex answer with the API that exists today, not the one from a training crawl.

Try the index live demo
      your-agent · prompt context

      // waiting for a query…

      resolve-library-id → query-docs → inject

      0libraries indexed
      0tokens indexed in this 290-library sample
      0GitHub stars
      0MCP clients supported

      01 · the problem

      Your AI's training data expired.

      Models answer from a months-old snapshot of the internet. Libraries don't wait — they ship breaking changes weekly. The result: confident answers about APIs that no longer exist.

      training cutoff · stale
      Add rate limiting to my Express API with Upstash Redis.
      ✕ hallucinated — no package named express-rate-limit-redis exists on npm; the model blended express-rate-limit with a store API it invented, and the RedisStore constructor shown has never existed in any published version.
      docs fetched 6 hours ago · v2.0.x
      Add rate limiting to my Express API with Upstash Redis. use context7
      ✓ grounded — every symbol above was resolved from the current @upstash/ratelimit docs, fetched by Context7 at prompt time.

      02 · how it works

      One phrase. Fresh docs in the prompt.

      Say use context7 (or set a rule once). Before your agent writes a line, Context7 resolves the exact library, pulls the current version's docs, and injects them into the context window.

      your prompt “…use context7” resolve-library-id /vercel/next.js query-docs 2,410 snippets · v15 injected context grounded answer
      1. 1
        Resolve. Your question is matched against 126,000+ indexed projects — fuzzy names, aliases and versions all land on an exact Context7 ID.
      2. 2
        Fetch. query-docs pulls the current, version-matched snippets — parsed, scored and ranked for your specific question.
      3. 3
        Inject. The docs enter the prompt before generation starts. The model reads the real API, then writes code that compiles.

      03 · coverage

      A constellation of everything you build with.

      Every star below is a real project in the Context7 index — brightness is trust, size is community, drift is the index re-crawling. Search it, tap a star, steal its Context7 ID.

      290 of 126,000+ shown · snapshot of the public Context7 search API, captured 2026-08-31

        04 · freshness proof

        Recency is a score, not a promise.

        Every indexed project carries a trust score, a benchmark grade and a last-crawl timestamp. Here are the numbers the index reports right now — from the same snapshot powering the constellation above.

        Benchmark = answer quality on real queries · Trust = source authority + crawl health · “updated” = last successful re-index.

        05 · clients

        Already wired into your editor.

        Any MCP-capable client can reach the hosted server at https://mcp.context7.com/mcp. One CLI command configures the popular ones for you.

        ClientOne-command setupRemote MCPLocal server

        06 · install

        Thirty seconds to current docs.

        # requires Node.js 18+ — authenticates, generates an API key,
        # and installs the right skill or MCP entry for your agent
        $ npx ctx7 setup
        
        # target a specific agent
        $ npx ctx7 setup --claude
        $ npx ctx7 setup --cursor
        {
          "mcpServers": {
            "context7": {
              "type": "http",
              "url": "https://mcp.context7.com/mcp",
              "headers": { "Authorization": "Bearer YOUR_API_KEY" }
            }
          }
        }
        # no install at all — end any prompt with two words
        
        Create a Next.js middleware that checks for a valid JWT
        in cookies and redirects to /login. use context7
        
        # or pin an exact library and skip resolution
        
        Implement auth with Supabase. use library /supabase/supabase

        07 · open source

        Built in the open, crawled for everyone.

        The next API your AI cites
        should be the one that exists.

        Get $10 off Kimi K3