MCP Catalogs
Home

context7

by upstash·55,436·Score 65

Context7 provides up-to-date code documentation and API references through MCP.

developer-toolsai-llmproductivity
2,632
Forks
149
Open issues
this month
Last commit
2d ago
Indexed

Overview

Context7 is an MCP server that delivers real-time, version-specific code documentation and examples directly to LLM contexts. It eliminates outdated information and API hallucinations by pulling documentation directly from source repositories. The server supports both CLI + Skills and MCP modes, making it compatible with various AI coding assistants.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Generate accurate code examples using up-to-date library documentation
you:Retrieve version-specific API references without leaving your coding environment
you:Automate documentation lookup for libraries during AI-assisted development
you:What libraries does Context7 support?
you:How do I get documentation for a specific library version?

When to choose this

Choose Context7 when working with LLM code assistants that need access to up-to-date library documentation, especially when you frequently encounter outdated information or hallucinated API calls.

When NOT to choose this

Avoid Context7 if you need offline access to documentation, as it requires an internet connection to fetch real-time documentation from its service.

Tools this server exposes

2 tools extracted from the README
  • resolve-library-idresolve-library-id(query: string, libraryName: string)

    Resolves a general library name into a Context7-compatible library ID

  • query-docsquery-docs(libraryId: string, query: string)

    Retrieves documentation for a library using a Context7-compatible library ID

Comparable tools

docs-mcpsourcegraph-mcpai-dev-assistant

Installation

Install Context7 with a single command:

npx ctx7 setup

For manual MCP installation, use the server URL https://mcp.context7.com/mcp with your MCP client and pass your API key via the CONTEXT7_API_KEY header. For Claude Desktop, add this to your claude_desktop_config.json:

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

FAQ

What libraries does Context7 support?
Context7 supports thousands of popular libraries across various programming languages. You can find supported libraries through the CLI command `ctx7 library <name> <query>`.
How do I get documentation for a specific library version?
Simply mention the version in your prompt (e.g., "How do I set up Next.js 14 middleware? use context7"). Context7 will automatically match the appropriate version.

On Hacker News

Recent discussion from the developer community.

Compare context7 with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.