# upstash/context7 [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/upstash/context7  
**GitHub Stars:** 63759  
**Views:** 17  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/upstash-context7

## Description
Up-to-date code documentation for LLMs and AI code editors.

## Tools
Capabilities this server exposes over MCP:

- **resolve-library-id** — Resolves a general library name into a Context7-compatible library ID.
- **query-docs** — Retrieves documentation for a library using a Context7-compatible library ID.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What upstash/context7 does

upstash/context7 MCP server connects an AI coding agent to the Context7 documentation service. It is designed to replace guesses based on stale training data with documentation and examples associated with current library versions.

The service is useful for implementation questions involving framework APIs, package configuration, authentication flows, deployment settings, and other library-specific tasks. A prompt can identify a library by name, provide a known Context7 library ID such as `/supabase/supabase`, or mention a desired version such as Next.js 16.

## How it works

The MCP flow has two main steps:

1. `resolve-library-id` matches a general library name to a Context7-compatible library ID.
2. `query-docs` retrieves documentation for that ID based on the agent’s query.

When the library ID and version are already known, including them in the prompt lets Context7 skip the matching step. Version information in the request helps select documentation for the requested release. Agents can use the returned material while generating code or explaining configuration.

Context7 also offers a separate CLI-plus-skills mode that does not require MCP. The `ctx7` CLI can search the index with `ctx7 library <name> <query>` and retrieve documentation with `ctx7 docs <libraryId> <query>`, but those commands are separate from the MCP tools listed here.

## Setup and configuration

The hosted MCP endpoint is `https://mcp.context7.com/mcp`. Configure that URL in an MCP-compatible client and send the Context7 API key in an HTTP authorization header:

```text
Authorization: Bearer YOUR_API_KEY
```

A free API key is recommended for higher rate limits. The CLI setup path requires Node.js 22.13 or newer and can be started with:

```bash
npx ctx7 setup
```

That command authenticates through OAuth, creates an API key, and lets you choose CLI-plus-skills or MCP mode. It can target particular agents with `--cursor`, `--claude`, or `--opencode`. Generated setup can be removed with `npx ctx7 remove`.

## Tools and capabilities

- Resolve general library names into Context7-compatible IDs.
- Retrieve documentation using a resolved library ID.
- Request version-specific library documentation by mentioning the version.
- Return current documentation and code examples to the coding agent’s context.
- Use explicit library IDs in prompts to avoid an additional matching step.

_Full upstream README: https://allmcps.com/mcp/upstash-context7/readme_

