# Context7

> Context7 is a freemium MCP server for developer tools. Version-specific library docs and code examples piped into coding agents via MCP. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $10 a month
- **Platforms:** CLI, API, vscode, Web, self-hosted
- **Website:** https://context7.com
- **Repository:** https://github.com/upstash/context7
- **GitHub stars:** 65,031
- **License:** MIT
- **MCP Registry name:** io.github.upstash/context7
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says Context7 fetches current documentation and code snippets for a library and passes them into a coding agent's context, so generated code is less likely to rely on stale training data. Requests can name a library directly with a Context7 ID or let the server match a library name, and a version can be mentioned in the prompt to target a specific release.

It works in two modes: an MCP server exposing resolve-library-id and query-docs tools, or a ctx7 CLI paired with an installable skill that lets the agent call the CLI directly without MCP. The setup command authenticates via OAuth and can target Cursor, Claude or OpenCode.

It suits developers who use AI coding assistants on fast-moving frameworks and want answers tied to the version they are using. The server code is MIT-licensed, while the backend, parsing and crawling services are private and not in the repository.

## Features

- **Version-specific documentation lookup:** Retrieves docs matched to the library version mentioned in a prompt.
- **Direct library ID selection:** Lets a prompt name a Context7 library ID so matching is skipped.
- **MCP tool interface:** Exposes resolve-library-id and query-docs tools to MCP-compatible clients.
- **CLI and skill mode:** Offers a ctx7 CLI plus an installed skill that works without MCP.
- **Language-ranked examples:** Optional language parameter ranks code examples in the language you write in.
- **One-command setup:** The ctx7 setup command handles OAuth, API key creation and skill installation.

## Good for

- Getting current API examples for a framework while writing code in an editor agent
- Checking configuration steps for a cloud service without leaving the coding session
- Reducing hallucinated function names when an agent works with a library release
- Looking up auth or database API usage from official docs during a prototype

## Install

### Claude Code (Terminal)

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

### Claude Desktop (Settings → Connectors → Add custom connector)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## FAQ

### Is there a free tier?

The plans page lists a Free plan at $0 with public repository access. A free API key is recommended for higher rate limits.

### How much does the Pro plan cost?

The plans page lists Pro at $10 per seat per month with private repos and unlimited API calls.

### Is the MCP server open source?

The repository is MIT-licensed and hosts the MCP server source code. The API backend, parsing and crawling engines are private.

### How do I connect it to an MCP client?

The README gives the server URL https://mcp.context7.com/mcp and says to pass the API key in an Authorization Bearer header, with more client guides linked.

### Is Context7 free?

Context7 has a free plan, with paid plans for more usage or features. Paid plans start at $10 a month.

### How do I add Context7 to Claude Code?

Run this command in your terminal: claude mcp add --transport http context7 https://mcp.context7.com/mcp

### What are the best alternatives to Context7?

The closest alternatives to Context7 are CodeCortex Context Engine, Ai Context, Llmmcp, Contextq MCP and FrontMCP docs.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [CodeCortex Context Engine](https://ai-powered.com/mcp/codecortex-context-engine): CodeCortex Context Engine is an open-source MCP server for developer tools.
- [Ai Context](https://ai-powered.com/mcp/ai-context): Ai Context is a free MCP server for developer tools.
- [Llmmcp](https://ai-powered.com/mcp/llmmcp): Llmmcp is an open-source MCP server for developer tools.
- [Contextq MCP](https://ai-powered.com/mcp/contextq-mcp): Contextq MCP is a freemium MCP server for knowledge and memory.
- [FrontMCP docs](https://ai-powered.com/mcp/frontmcp-docs): FrontMCP docs is a free MCP server for developer tools.
- [ContextStream MCP Server](https://ai-powered.com/mcp/contextstream-mcp-server): ContextStream MCP Server is a freemium MCP server for knowledge and memory.
- [amCharts 5](https://ai-powered.com/mcp/amcharts-5): amCharts 5 is a free MCP server for developer tools.
- [Contextator](https://ai-powered.com/mcp/contextator): Contextator is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/context7
