Context7

● Active

io.github.upstash/context7

Up-to-date docs for AI agents

Connect this server

One click to install, or copy the config below. Suits: Claude Desktop · Cursor.

Add to Cursor Add to VS CodeClaude Desktop / Claude Code: paste the config below.

Or add it manually — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@4.7.3"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<your CONTEXT7_API_KEY>"
      }
    }
  }
}
Environment variables
  • CONTEXT7_API_KEYsecretAPI key for authentication

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Documents & Knowledge
Version
4.7.3
Registry
active
Published
11/17/2026

Live check

checked Nov 17, 2026, 22:07 UTC
● Working488 msprotocol 2025-06-18v4.7.3toolspromptsresources

The endpoint answered the MCP handshake as "Context7" and listed 2 tools. Answering since Nov 17, 2026.

Context cost ≈ 1.3k tokens of tool definitions a client loads per conversation (estimate: characters ÷ 4) across 2 tools.

Tools (2)

  • resolve-library-id2 params

    Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Each result includes: - Library ID: Context7-compatible identifier (format: /org/project) - Name: Library or package name - Description: Short summary - Code Snippets: Number of available code examples - Source Reputation: Authority indicator (High, Medium, Low, or Unknown) - Benchmark Score: Quality indicator (100 is the highest score) - Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version. For best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact matches prioritized) - Description relevance to the query's intent - Documentation coverage (prioritize libraries with higher Code Snippet counts) - Source reputation (consider libraries with High or Medium reputation more authoritative) - Benchmark Score: Quality indicator (100 is the highest score) Response Format: - Return the selected library ID in a clearly marked section - Provide a brief explanation for why this library was chosen - If multiple good matches exist, acknowledge this but proceed with the most relevant one - If no good matches exist, clearly state this and suggest query refinements For ambiguous queries, request clarification before proceeding with a best-guess match. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you

    Show parameters
    • querystringrequiredWhat to look up in the library's documentation. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to
    • libraryNamestringrequiredLibrary name to search for and retrieve a Context7-compatible library ID. Use the official library name with proper punctuation — e.g., 'Next.js' instead of 'ne
  • query-docs3 params

    Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Do not call this tool more than 3 times per question. If you know the programming language the user is working in, pass it as `language` so the results match their setup.

    Show parameters
    • querystringrequiredWhat to look up in the library's documentation, scoped to a single concept. Be specific and include relevant details, but keep each query to one topic — if the
    • languagestringProgramming language the user is writing code in, such as 'Python', 'TypeScript', 'Go', or 'C#'. Ranks code examples in that language first. Leave it out when t
    • libraryIdstringrequiredExact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v16.2.9') retrieved from 'resolve-library

Checked by Serverdex with a plain initialize + tools/list call to mcp.context7.com/mcp, no credentials, about once a day. A failed check is never a removal.

On GitHub

read Nov 17, 2026
Stars
65k
Forks
3.3k
Last push
Nov 17, 2026
License
MIT

TypeScriptllmmcpmcp-servervibe-coding

From the README

Context7 - Up-to-date Docs for AI Agents ❌ Without Context7 LLMs rely on outdated or generic information about the libraries you use. You get: • ❌ Code examples are outdated and based on year-old training data • ❌ Hallucinated APIs that don't even exist • ❌ Generic answers for old package versions ✅ With Context7 Context7 pulls up-to-date, version-specific documentation and code examples straight from the source — and gives them to your coding agent. Context7 fetches up-to-date code examples and documentation right into your coding agent's context. No tab-switching, no hallucinated APIs that don't exist, no outdated code generation. Works in two modes: • CLI + Skills — installs a skill that guides your agent to fetch docs using ctx7 CLI commands (no MCP required) • MCP — registers a Context7 MCP server so your agent can call documentation tools natively Installation [!NOTE] API Key Recommended: Get a free API key at context7.com/dashboard for higher rate limits. Set up Context7 for your coding agents with a single command. The ctx7 CLI requires Node.js 22.13 or newer. Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI + Skills or MCP mode. Use --cursor, --claude, or --opencode to target a specific agent. To remove the generated setup later, run npx ctx7 remove.…

Read the full README on GitHub →

Remotes

  • streamable-httphttps://mcp.context7.com/mcp
Browse all Documents & Knowledge →

Add the badge to your site

Show visitors that Context7 is listed here — it’s also the link we check for a free listing.

Context7 — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-upstash-context7?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="Context7 — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![Context7 — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-upstash-context7?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.