← Back to directory
C

Context7

Official
Upstash's official server providing up-to-date third-party library docs for AI coding assistants
Category
Dev Tools #1 of 438
Stars
★ 63.3k Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Node.js 18+ · Hosted (no local runtime)
Credentials
Optional API key
License
MIT
Last commit
Tools
2
80FMRS · B

Officially maintained by Upstash; the tool design is minimal (just two read-only tools) and addresses a specific, common pain point — an AI assistant coding against stale API knowledge. Low install barrier, usable without an API key. This review is a static check of source and docs, not an actual call test.

Strongest · Setup experience 18/20 Weakest · Reliability 14/20

Reliability
14/20
Security and permissions
16/20
Maintenance
17/20
Documentation
15/20
Setup experience
18/20

Test out of dateListed 2026-07-24

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Developers using fast-moving frameworks/libraries worried about the AI suggesting stale code
  • Scenarios wanting zero-config documentation lookup

Not for

  • Looking up internal/private codebase documentation (Context7 targets publicly published open-source libraries)
  • Cases needing very high coverage of obscure, niche libraries (coverage depends on what Context7's platform has indexed)

Required permissions

  • Usable without an API key (subject to a free-tier rate limit); CONTEXT7_API_KEY is an optional credential for higher quota
  • Read-only documentation lookup — no code execution or local filesystem access involved

Risks and side effects

  • The free tier has limited quota — high-frequency use may hit rate limits
  • Documentation content comes from Context7's platform index, so its accuracy and freshness depend on that platform's crawl cadence

Setup

Before you start

Runtime:Node.js 18+ · Hosted (no local runtime)

CONTEXT7_API_KEY optionalsecret Optional Context7 API key used for authentication and higher rate limits; get a free one at context7.com/dashboard.

Start via npx -y @upstash/context7-mcp and use it immediately without an API key (subject to rate limits); apply for a CONTEXT7_API_KEY at context7.com for higher quota and set it as an env var. An MCPB one-click install bundle and a remote Streamable HTTP endpoint (https://mcp.context7.com/mcp) are also available as alternatives.

.mcp.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "env": {
        "CONTEXT7_API_KEY": "<OPTIONAL_API_KEY>"
      }
    }
  }
}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<OPTIONAL_API_KEY>"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add context7 -e 'CONTEXT7_API_KEY=<OPTIONAL_API_KEY>' -- npx -y @upstash/context7-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Check that the resolve-library-id and query-docs tools appear in your client's MCP tool list; then ask a library documentation question with "use context7" — receiving Context7-sourced docs confirms the connection works.

Troubleshooting

  1. Empty search results: verify the library name resolves correctly with resolve-library-id first
  2. Hitting rate limits: apply for a CONTEXT7_API_KEY for higher quota
  3. Remote endpoint connection fails: check network access to mcp.context7.com

Things to try

Once connected, you can ask your AI assistant things like:

  • Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to /login. use context7
  • Show me the Supabase auth API for email/password sign-up.
  • Configure a Cloudflare Worker script to cache JSON API responses for five minutes. use context7
  • How do I set up Next.js 14 middleware? use context7

Tools 2

resolve-library-id read-only
Resolve a general library name into a Context7-compatible library ID
query-docs read-only
Retrieve up-to-date documentation for a library using its Context7 library ID

Use cases

Have the AI assistant look up a library's current, correct usage while coding, avoiding deprecated APIs
Quickly get official documentation highlights for an unfamiliar third-party library
Verify during code review that an API call matches the library's latest recommended usage

Supported clients

Claude Code
VS Code
Cursor
Cline
Amp

Listed from the project's documentation, not tested by this site.

Overview

Officially maintained by Upstash, this MCP server addresses a common problem: an AI coding assistant's training data going stale, leading it to suggest outdated API usage. Two tools first resolve a library name into a Context7 library ID, then retrieve documentation for that library's current version — so the assistant references today's real API instead of what it memorized during training.

Similar servers

Source revision 6b636d3c35e0 Data synced 2026-10-19 Read the FMRS scoring method