Context7 MCP Server

Up-to-date documentation and code examples from source to your AI prompts.

Data last scanned today · Reviewed yesterday

632 tools59,415TypeScriptMIT

Overview

Context7 serves as a bridge for LLMs, providing real-time, version-specific documentation and code examples. By fetching current data directly from source, it mitigates the risk of hallucinated APIs or outdated library syntax that often occurs when models rely on stale training data. Developers can integrate this into their workflows to generate accurate code for specific frameworks, such as Next.js or Cloudflare Workers. The server ensures that the context provided to your AI assistant reflects the latest package documentation available.

Our verdict

The Context7 MCP Server receives a high-risk security score of 38/100, primarily due to the lack of any authentication method, meaning anyone with the configuration can utilize the server. Additionally, the tool does not implement a read-only mode, which could pose access concerns for some users. Due to these significant security gaps, it is recommended only for users who fully understand the implications of an unauthenticated, open configuration environment.

  • Fetches real-time, version-specific documentation from source
  • Reduces hallucinated APIs and stale code examples
  • Supports multiple languages via internationalized documentation
  • Maintained with a low dependency count of two
  • No authentication mechanisms implemented
  • Lacks a read-only execution mode
  • Community-maintained rather than official vendor software

Setup

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

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
resolve-library-idResolves a general library name into a Context7-compatible library ID.low
query-docsRetrieves documentation for a library using a Context7-compatible library ID.low

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

What are the system requirements for the Context7 CLI?

The CLI requires Node.js 18 or newer to be installed on your system.

How can I increase my rate limits?

You can obtain a free API key at the Context7 dashboard to receive higher rate limits.

How do I configure the MCP server manually?

You can use the server URL https://mcp.context7.com/mcp with your MCP client and provide your API key via the CONTEXT7_API_KEY header.

How can I ensure the most accurate documentation results?

You can include the library's specific Context7 ID in your prompt using slash syntax, such as /supabase/supabase, to skip the library-matching step.

Does Context7 support fetching documentation for specific library versions?

Yes, you can simply mention the desired library version in your prompt, and Context7 will automatically match the appropriate documentation.

How do I remove the Context7 configuration?

You can remove the generated setup by running the npx ctx7 remove command.

Alternatives

Changelog

Badge

Context7 MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.