# Context7 (MCP server)

> Context7 is an MCP server that adds search and knowledge tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Up-to-date code docs for any prompt. It has 62,752 GitHub stars, is released under the MIT license and runs locally with npx -y @upstash/context7-mcp.

LLMs rely on outdated or generic information about the libraries you use. You get: Context7 pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/upstash/context7 |
| GitHub stars | 62,752 |
| License | MIT |
| Language | TypeScript |
| Transport | stdio, streamable-http |
| Packages | npm: @upstash/context7-mcp |
| Remote URL | https://mcp.context7.com/mcp |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code, Claude.ai, ChatGPT |
| Category | AI & search |
| Latest release | ctx7@0.5.13 (Oct 5, 2026) |
| Last commit | Oct 6, 2026 |
| MCP registry name | io.github.upstash/context7 |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env CONTEXT7_API_KEY=your-value --transport stdio context7 -- npx -y @upstash/context7-mcp
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "context7_api_key",
      "description": "CONTEXT7_API_KEY",
      "password": true
    }
  ],
  "servers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "${input:context7_api_key}"
      }
    }
  }
}
```

### Claude Code (remote)

```sh
claude mcp add --transport http context7 "https://mcp.context7.com/mcp"
```

The same server is also hosted as a remote MCP endpoint, so nothing runs on your machine.

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `CONTEXT7_API_KEY` (secret): API key for authentication

## Tools

- `resolve-library-id`: Resolves a general library name into a Context7-compatible library ID.
- `query`: The user's question or task (used to rank results by relevance)
- `query-docs`: Retrieves documentation for a library using a Context7-compatible library ID.

## Similar MCP servers

- [FunASR](https://appsgit.com/mcp-servers/funasr): Transcribe local audio with FunASR and SenseVoice using private, on-device inference. (20,596 stars, MIT)
- [Bifrost](https://appsgit.com/mcp-servers/bifrost): Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000+ models support & <100 µs overhead at 5k RPS. (8,591 stars, Apache-2.0)
- [Honcho](https://appsgit.com/mcp-servers/honcho): Memory that reasons: continual learning for stateful agents. (7,494 stars, AGPL-3.0, needs API key)
- [Semble](https://appsgit.com/mcp-servers/semble): Fast and Accurate Code Search for Agents. (6,185 stars, MIT)
- [Exa](https://appsgit.com/mcp-servers/exa): Connect AI agents to Exa for web search, content fetching, and multi-step research. (5,088 stars, MIT, official)
- [Hyperresearch](https://appsgit.com/mcp-servers/hyperresearch): Convert Claude Code or Codex into the most intelligent Deep Research Agent. (3,794 stars, MIT)

---

Canonical page: https://appsgit.com/mcp-servers/context7
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
