[Home](/index.md) › [MCP servers](/mcp.md) › Context7

# Context7

MCP server

- 2 callable tools
- Read only
- 4 capabilities

[Installation guide](https://registry.modelcontextprotocol.io/v0/servers/io.github.upstash%2Fcontext7/versions/latest)

## Overview

Upstash's MCP server that gives AI agents access to up-to-date, version-specific documentation and code examples for programming libraries and frameworks.

### Capabilities

- Resolve a library name to a Context7-compatible library ID
- Retrieve up-to-date documentation for a library
- Get code examples for programming libraries and frameworks
- Rank code examples by the programming language being used

## Works with

The products your agent can work with through this server.

- [Upstash](/tools/upstash.md): Serverless data platform

## Tools

The callable functions your agent uses to work with this server.

### `resolve-library-id`

Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.

### `query-docs`

Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.

## Installation

Follow the installation guide for supported clients, authentication and required permissions.

### Add Context7 to Claude Code

Run this in your terminal:

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

If the server asks you to sign in, run `/mcp` in Claude Code and follow the browser prompt.

### Add Context7 to Cursor

Add it with the Add to Cursor button below, or add it to `.cursor/mcp.json` in your project (`~/.cursor/mcp.json` for every project):

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=context7-2&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D)

```json
{
  "mcpServers": {
    "context7-2": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
```

### Add Context7 to VS Code

Add it to `.vscode/mcp.json` in your workspace. VS Code uses `servers` rather than `mcpServers`. Or run MCP: Add Server from the Command Palette and choose HTTP.

```json
{
  "servers": {
    "context7-2": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
```

### Add Context7 to Codex

Run this in your terminal:

```sh
codex mcp add context7-2 --url https://mcp.context7.com/mcp
```

Or add it to `~/.codex/config.toml`:

```toml
[mcp_servers.context7-2]
url = "https://mcp.context7.com/mcp"
```

If the server uses OAuth, sign in with `codex mcp login context7-2`.

### Add Context7 to Claude

Add it as a custom connector with this URL:

```
https://mcp.context7.com/mcp
```

1. Open Customize, then Connectors.
2. Click + Add, then Add custom connector.
3. Name it, paste the URL and click Continue.
4. Choose how to sign in, then click Add.

On Team and Enterprise plans, an Owner adds it in Organization settings first, then members connect it.

### Add Context7 to other clients

For any other client that connects to remote MCP servers over HTTP, use this URL:

```
https://mcp.context7.com/mcp
```

[Read the installation guide](https://registry.modelcontextprotocol.io/v0/servers/io.github.upstash%2Fcontext7/versions/latest)

## Related MCP servers

Other servers for the same products, or from the same vendor.

- [Upstash MCP server](/mcp/upstash-2.md)

## Sources

Documentation and source code reviewed on 19 November 2026.

- [context7.com](https://context7.com/)
- [registry.modelcontextprotocol.io/v0/servers/io.github.upstash%2Fcontext7/versions/latest](https://registry.modelcontextprotocol.io/v0/servers/io.github.upstash%2Fcontext7/versions/latest)
- [github.com/upstash/context7](https://github.com/upstash/context7)
