# Context7

> Pulls current, version-specific library docs and code examples into your agent, so the code it writes uses today's APIs.

Upstash's Context7 brings up-to-date, version-specific documentation and code examples for the libraries you use straight into your agent's context. Instead of leaning on old training data or inventing APIs that don't exist, your agent looks up the current docs before it writes code. Add "use context7" to a prompt, or name a library ID such as /vercel/next.js.

What you can do with it
- Look up current docs and code examples for a library while you code
- Mention a version ("Next.js 16") and get the docs for that version
- Skip the search step by naming a library ID, like /supabase/supabase
- Rank code examples in the language you write in

Its two tools
- resolve-library-id turns a library name into a Context7 ID and lists its versions
- query-docs fetches the docs and code examples for that ID and your question

How it connects
Upstash hosts the MCP server at https://mcp.context7.com/mcp, with your Context7 API key in an Authorization: Bearer header. Clients that support MCP sign-in, such as ChatGPT's custom MCP servers, can use https://mcp.context7.com/mcp/oauth to sign in with OAuth instead. It also runs locally with npx -y @upstash/context7-mcp --api-key YOUR_API_KEY, installs as a Gemini CLI extension, and comes as Upstash's own Claude Code plugin (claude plugin marketplace add upstash/context7, then claude plugin install context7@context7-marketplace), which signs you in through your browser. npx ctx7 setup signs you in and sets it up for Cursor, Claude Code or OpenCode in one step.

Good to know
- It only reads documentation; it doesn't change your code or accounts.
- An API key from context7.com/dashboard is recommended for higher rate limits, and a free account is enough to start.
- Context7's library docs are community-contributed, so check what your agent writes.
- The MCP server is open source; the docs index behind it runs on Upstash's servers.

- Type: Plugin
- Made by: upstash
- Category: Developer tools
- Formats: Remote MCP, Local MCP, Extensions, Claude plugins
- Version: latest
- Website: https://context7.com
- Source: https://github.com/upstash/context7
- Page: https://pluginboard.ai/plugins/context7

## Works with

- ChatGPT
- Claude
- Muse
- Grok Bot
- Gemini
- Grok
- GitHub Copilot
- Cursor
- Claude Code
- Codex
- Antigravity
- Gemini CLI
- Replit
- OpenClaw
- OpenCode
- Hermes Agent

## Install

You'll need:

- `Authorization` (optional): API key for authentication. Accepts "Bearer <key>" or the raw key.

Replace each `<NAME>` placeholder with your own value.

### ChatGPT

In ChatGPT on the web: Plugins → + → Add custom MCP server, then paste https://mcp.context7.com/mcp under Connection. Business and Enterprise plans; Pro can add read-only servers.

### Claude

In Claude (web or desktop): Customize → Connectors → Add custom connector, then paste https://mcp.context7.com/mcp

### Muse

In Muse: In a Muse chat, ask it to create a custom connector for the MCP server at https://mcp.context7.com/mcp. Then tap Connect on the card it shows and sign in, or add your key.

### Grok Bot

In Grok Bot: In a chat with your Bot, say "Add this MCP server: https://mcp.context7.com/mcp". It confirms the details with you and sets it up, and the tools are ready from your next message.

### Gemini

In Gemini: At gemini.google.com: Settings → Connected Apps → Add a custom app, then paste https://mcp.context7.com/mcp

### Grok

In Grok on the web: At grok.com/connectors: New Connector → Custom, then enter https://mcp.context7.com/mcp and sign in if it asks.

### GitHub Copilot

Add to VS Code: vscode:mcp/install?%7B%22name%22%3A%22context7%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.context7.com%2Fmcp%22%7D

Copilot CLI:

```shell
copilot mcp add --transport http context7 https://mcp.context7.com/mcp
```

### Cursor

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

Add to .cursor/mcp.json:

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

### Claude Code

Run in your terminal:

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

### Codex

Run in your terminal:

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

### Antigravity

Add to ~/.gemini/config/mcp_config.json:

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

### Gemini CLI

Run in your terminal:

```shell
gemini extensions install https://github.com/upstash/context7
```

### Replit

In Replit: At replit.com/integrations, open MCP Servers → + Add MCP server, paste https://mcp.context7.com/mcp (add any headers under Advanced settings), then click Test & save.

### OpenClaw

Run in your terminal:

```shell
openclaw mcp add context7 --url https://mcp.context7.com/mcp --transport streamable-http
```

If it needs a key or sign-in: For https://mcp.context7.com/mcp, add --header NAME=value for each header it needs, or --auth oauth and then run openclaw mcp login context7.

### OpenCode

Run in your terminal:

```shell
opencode mcp add context7 --url https://mcp.context7.com/mcp
```

If it needs a key: For https://mcp.context7.com/mcp, add --header 'NAME=value' for each header it needs. Add --global to use it in every project.

### Hermes Agent

Run in your terminal:

```shell
hermes mcp add context7 --url https://mcp.context7.com/mcp
```

Add to ~/.hermes/config.yaml:

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

If it signs in with OAuth: If https://mcp.context7.com/mcp asks you to sign in, add --auth oauth to the command, or auth: oauth to its entry.

---
From Pluginboard (https://pluginboard.ai).
