Context7 MCP Server

This is a self-hosted Context7 Model Context Protocol (MCP) server that provides up-to-date library documentation and code examples directly to LLMs. Server is running and healthy.

Architecture

Claude Code
MCP Server
(this server)
Upstash API
(with API key)
Upstash DB

Integration

Install Context7 for your project using either method:

Option 1: Command Line (Project-Specific)

Run this command from your project directory:

claude mcp add --transport http context7 https://context7.periscoped.io/mcp

This adds Context7 to ~/.claude.json under your project's path. Only works for that specific project directory.

Option 2: Manual Configuration (Project-Specific)

Create .mcp.json in your project root:

{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://context7.periscoped.io/mcp"
    }
  }
}

This configures Context7 for this project only.

Add to Your Project Rules

To get the most out of Context7, add this rule to your CLAUDE.md or .claud/settings.json:

Always use context7 when I need code generation, setup or configuration steps, or
library/API documentation. This means you should automatically use the Context7 MCP
tools to resolve library id and get library docs without me having to explicitly ask.

Documentation

For more information, see the Context7 GitHub repository.


This server is configured with a backend API key to an Upstash account.