# Context7 MCP server

> Fetch up-to-date, version-specific library documentation and code examples straight into your assistant's context.

- Listing: https://mcp.tc/i/context7
- Connect: use the server's own URL `https://mcp.context7.com/mcp` (sign-in optional); clients connect to it directly. The listing link is a page, not an MCP endpoint.
- Type: remote (Streamable HTTP)
- Auth: optional (works without sign-in)
- Category: [Docs & Knowledge](https://mcp.tc/c/docs-knowledge)
- Vendor: Upstash
- Verified: yes, mcp.tc checked that this is the official server (https://mcp.tc/verify). It says who runs the server, not that it is safe.
- Homepage: <https://context7.com>
- Repository: <https://github.com/upstash/context7>
- Package: npm `@upstash/context7-mcp`

## About

Context7 connects your coding assistant to a hosted index of library and framework documentation. It resolves a library name to a Context7 library ID, then retrieves current docs and code examples for a question, optionally for a specific version, so answers do not rely on outdated training data.

It runs as a hosted streamable-http endpoint at https://mcp.context7.com/mcp, or locally through the npm package @upstash/context7-mcp. Authentication is optional. A free API key from context7.com/dashboard gives higher rate limits and is sent as an Authorization: Bearer header.

## What it can do

- Resolve a library name to a Context7-compatible library ID
- Retrieve current documentation for a library by ID
- Get code examples relevant to a specific question
- Target a specific library version by naming it in the prompt
- Skip library matching by giving an ID such as /vercel/next.js

## Tools (2)

- `resolve-library-id`: Resolve a package or product name to a Context7 library ID and list matching libraries. (read-only)
- `query-docs`: Retrieve current documentation and code examples for a library using its Context7 ID and a question. (read-only)

## Example prompts

- "How do I set up Next.js 14 middleware? use context7"
- "Show the Supabase auth API for email/password sign-up. use library /supabase/supabase"
- "Configure a Cloudflare Worker to cache JSON API responses for five minutes. use context7"
- "What changed in the Prisma migration commands in the latest version?"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

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

2. Start Claude Code and type `/mcp`. **context7** should show as connected. To sign in for more access, pick it and choose **Authenticate**.

Add `--scope user` to make it available in every project, not just this one. Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### Claude Desktop

1. Open **Settings → Connectors** and click **Add custom connector**.

2. Name it **Context7** and paste this URL:

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

3. Click **Add**, then **Connect**. Signing in to Upstash is optional.

Claude Desktop’s JSON config file only starts local servers. Remote servers go through Connectors, and connectors you add on claude.ai show up here too.

### claude.ai

1. Open the connector form on claude.ai. This button fills in the name and URL for you:

[Add to claude.ai](<https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Context7&connectorUrl=https%3A%2F%2Fmcp.context7.com%2Fmcp>) (opens connector settings)

2. Check that the URL reads `https://mcp.context7.com/mcp` and click **Add**.

3. Click **Connect**. Signing in to Upstash is optional.

Free plans allow one custom connector. On Team and Enterprise plans an owner adds it under **Organization settings → Connectors**.

### ChatGPT

1. On chatgpt.com, open **Settings → Security and login** and turn on **Developer mode**.

2. Go to `chatgpt.com/plugins` and click **+** to create an app for a remote MCP server.

3. Paste `https://mcp.context7.com/mcp` as the server URL and choose **No authentication**, or **OAuth** to sign in to Upstash for more access.

Developer mode is available on the web for Plus, Pro, Business, Enterprise and Education accounts.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

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

Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=context7&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.context7.com%2Fmcp%22%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"context7","type":"http","url":"https://mcp.context7.com/mcp"}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

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

Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "context7": {
      "serverUrl": "https://mcp.context7.com/mcp"
    }
  }
}
```

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf. It reads `serverUrl` (or `url`) for remote servers. Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### Codex

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

Or edit `~/.codex/config.toml` directly:

`config.toml`:

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

Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### Gemini CLI

```bash
gemini mcp add --transport http context7 https://mcp.context7.com/mcp
```

Then, inside Gemini CLI, run `/mcp auth context7` to sign in (optional).

This adds it to the current project. Add `-s user` to use it everywhere. Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

### Any client

Most clients accept this shape. Some name the URL field differently: `serverUrl` in Devin Desktop, `httpUrl` in Gemini CLI’s settings file.

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

Zed puts servers under `context_servers` in its settings. Cline needs `"type": "streamableHttp"`, or it assumes SSE.

Client only starts local servers? Bridge it with `npx -y mcp-remote https://mcp.context7.com/mcp`.

Works without a key. An API key from Upstash raises the limits: send it as `Authorization: Bearer <YOUR_API_KEY>`.

## Details

- Server version: 4.1.1
- MCP protocol version: 2026-07-28
- Last checked: 2026-10-03 (reachable)
- Listed: 2026-10-03
- Updated: 2026-10-03

---
Source: https://mcp.tc/i/context7 (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
