Context7

v1.0.31Developer Toolsstable

A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.

llmmcpmcp-servervibe-codingmodelcontextprotocol
Share:
55,834
Stars
0
Downloads
0
Weekly
0/5

What is Context7?

Context7 is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into llm prompts, helping developers get accurate answers without outdat...

A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol server that fetches up-to-date, ver

Use Cases

Version-specific documentation
Code examples retrieval
Accurate API reference
upstash

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.31
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @upstash/context7-mcp

Manual Installation

npx -y @upstash/context7-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Context7

Context7 is an MCP server that injects live, version-specific library documentation directly into your AI coding assistant's context window, solving the fundamental problem of LLMs giving outdated or hallucinated API answers. Instead of relying on training data that may be months or years old, Context7 fetches current documentation for the exact library version you are using. It exposes two focused tools — one to resolve library IDs and one to retrieve targeted documentation — making it useful for any developer working with rapidly evolving frameworks like Next.js, Supabase, Tailwind, or Prisma.

Prerequisites

  • Node.js 18+ and npx available on your system
  • An MCP client such as Claude Desktop, Cursor, or Windsurf
  • A free Context7 API key (obtain at context7.com/dashboard) for higher rate limits
  • Internet access so the server can fetch documentation from context7.com
1

Authenticate and set up Context7 automatically

The quickest setup uses the ctx7 CLI, which handles OAuth authentication, API key generation, and MCP client registration in one command.

npx ctx7 setup
2

Obtain your API key for manual setup

If you prefer manual configuration, visit context7.com/dashboard to create a free account and generate a CONTEXT7_API_KEY. This key enables higher request rate limits.

3

Add Context7 to your MCP client configuration

For Claude Desktop, edit claude_desktop_config.json. The server runs via npx with no local install needed; pass your API key as an environment variable.

4

Restart your MCP client

After saving the configuration file, fully quit and reopen Claude Desktop (or your chosen client) so it picks up the new MCP server. You should see Context7 appear in the available tools list.

5

Use 'use context7' in your prompts

Append 'use context7' to any coding question to trigger documentation lookup, or reference a specific library ID directly. The server will call resolve-library-id then query-docs automatically.

npx ctx7 library react "how does useEffect work"
npx ctx7 docs /vercel/next.js "app router middleware"

Context7 Examples

Client configuration

Add Context7 to claude_desktop_config.json. Set CONTEXT7_API_KEY for higher rate limits; the key is optional but recommended for production use.

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

Prompts to try

Add 'use context7' to any library question to pull in up-to-date docs. You can also reference specific library IDs for precision.

- "How do I configure middleware in Next.js 14? use context7"
- "Show me how to use Supabase Row Level Security with the JS client. use library /supabase/supabase"
- "What are the available options for Prisma's findMany? use context7"
- "How do I set up authentication in Clerk with Next.js App Router? use context7"
- "Explain Tailwind CSS v4 configuration changes compared to v3. use context7"

Troubleshooting Context7

Context7 tools do not appear in Claude Desktop after configuration

Ensure you fully quit and restart Claude Desktop — not just close the window. Verify the JSON in claude_desktop_config.json is valid with no trailing commas. Run 'npx -y @upstash/context7-mcp' in a terminal to confirm the package downloads without errors.

Rate limit errors when fetching documentation

Without a CONTEXT7_API_KEY the server uses anonymous rate limits which are lower. Generate a free key at context7.com/dashboard and add it to the env section of your config.

resolve-library-id returns no results for a library

Try alternate names or the npm package name (e.g. '@tanstack/react-query' instead of 'React Query'). You can also browse available libraries at context7.com to find the exact Context7 library ID.

Frequently Asked Questions about Context7

What is Context7?

Context7 is a Model Context Protocol (MCP) server that model context protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into llm prompts, helping developers get accurate answers without outdated or hallucinated information. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Context7?

Install via npm with the command: npx -y @upstash/context7-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Context7?

Context7 works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Context7 free to use?

Yes, Context7 is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Context7?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides