---
title: "Context7 MCP Server Setup Guide and Schema"
slug: "context7"
category: "ai-core"
package: "@upstash/context7-mcp"
transport: "stdio"
canonical: "https://mcp-codex.com/servers/context7"
source: "MCP Codex (https://mcp-codex.com)"
dateModified: "2026-09-28"
---

# Context7 MCP Server

> Inject current library and framework documentation into AI context.

## Overview
Provides AI agents with up-to-date documentation for libraries and frameworks. Instead of relying on training data, Context7 fetches current documentation in real-time, preventing hallucinated APIs and outdated patterns.

## Quick Install
```bash
npx -y @upstash/context7-mcp
```

## Client Configurations

### Claude Desktop (`claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}
```

### Cursor (`mcp.json`)
```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ]
    }
  }
}
```

### OpenAI Codex CLI (`~/.codex/config.toml`)
```toml
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
```

## Available Tools (2)

- `resolve-library-id`
- `get-library-docs`

## Documentation & Links
- Canonical Web Page: https://mcp-codex.com/servers/context7
- Weekly Protocol Changelog: https://mcp-codex.com#newsletter
- GitHub Repository: https://github.com/upstash/context7

