Context7 MCP Server

Developmentstdiohttp-streamingv1.1.1
Repository

Provides up-to-date, version-specific documentation and code examples for libraries, frameworks, and SDKs directly into your AI prompts. Instead of relying on potentially outdated training data, Context7 fetches current documentation from the source. Supports thousands of libraries including React, Next.js, Node.js, Python packages, and more.

Connect

Add this configuration to .claude/mcp.json

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

Tools (2)

resolve-library-id

Resolve a library name to a Context7 library ID for documentation lookup.

{
  "type": "object",
  "required": [
    "libraryName"
  ],
  "properties": {
    "libraryName": {
      "type": "string",
      "description": "Library name to search for (e.g. \"react\", \"nextjs\", \"express\")"
    }
  }
}

get-library-docs

Fetch up-to-date documentation for a library using its Context7 ID.

{
  "type": "object",
  "required": [
    "context7CompatibleLibraryID"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "description": "Optional topic to focus the documentation on"
    },
    "tokens": {
      "type": "integer",
      "description": "Maximum number of tokens to return (default 5000)"
    },
    "context7CompatibleLibraryID": {
      "type": "string",
      "description": "The Context7 library ID resolved from resolve-library-id"
    }
  }
}

Resources

This server does not expose any resources.

Prompts

This server does not expose any prompts.

Server Information

Author
Upstash (@upstash)
Repository
https://github.com/upstash/context7
License
Apache-2.0
Version
1.1.1
Stars
56,048
Last Updated
May 25, 2026