# Context7

Context7 brings current, version-aware library docs and code examples into an AI coding agent. Use it when generated answers rely on stale or invented APIs.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 5563 installs · ★ 65245 repo stars
- Author: upstash
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/upstash/context7
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/context7

## What it does

Context7 supplies documentation matched to a library version, along with code examples for the task at hand. Its MCP tools are `resolve-library-id` and `query-docs`: one identifies the library, while the other retrieves relevant documentation.

The server connects over HTTP and is listed for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and other supported clients. Add `use context7` to a request when you want the agent to consult the documentation. An API key is recommended for higher rate limits; the separate CLI + Skills mode requires Node.js 22.13 or newer.

## Requirements
- Remote server: `https://context7-mcp--upstash.run.tools`
- Works with: Context7

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http context7-mcp https://context7-mcp--upstash.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add context7 --url https://context7-mcp--upstash.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "context7": {
            "url": "https://context7-mcp--upstash.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "context7": {
            "type": "http",
            "url": "https://context7-mcp--upstash.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http context7 https://context7-mcp--upstash.run.tools
```

## When to use it
- look up documentation for a library version
- check whether an API exists
- bring current code examples into an agent prompt
- avoid code based on stale package knowledge

## Example prompts
- Build a Next.js proxy that checks JWT cookies and redirects unauthenticated users; consult `Context7` for the current API.
- Show the current email/password sign-up API for `Supabase`, and use `use context7` before answering.
- Configure a Cloudflare Worker to cache JSON responses and ask `Context7` for the relevant documentation.

## Similar
- [setup-context7-mcp](https://affpapa.org/en/nevibecode/skills/setup-context7-mcp.md) — skill · 1200 installs
- [context7-auto-research](https://affpapa.org/en/nevibecode/skills/context7-auto-research.md) — skill · 709 installs
- [Context7-Expert](https://affpapa.org/en/nevibecode/agents/context7-expert.md) — subagent · ★ 41430 repo stars
- [context7-docs](https://affpapa.org/en/nevibecode/plugins/context7-docs.md) — plugin · ★ 2858 repo stars
- [context7-docs-fetcher](https://affpapa.org/en/nevibecode/plugins/context7-docs-fetcher.md) — plugin · ★ 1013 repo stars
- [microsoft-docs](https://affpapa.org/en/nevibecode/skills/github-microsoft-docs.md) — skill · 14881 installs

## Other versions with the same name
- [Context7 · ](https://affpapa.org/en/nevibecode/mcp/geobio-context7.md) — 1447 installs
- [Context7 · ](https://affpapa.org/en/nevibecode/mcp/docker-context7.md)

From the same set: [upstash/context7](https://affpapa.org/en/nevibecode/by/upstash/context7.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
