Skip to content
MCP server

Context7

Version-specific library docs and code examples piped into coding agents via MCP

Actively maintainedStatus and history

The repository was last updated yesterday and is published under MIT.

Install
Pricing
Freemium
Platforms
CLI, API, vscode
Runs
Locally or Remotely
GitHub stars
65K
Last commit
1 day ago
Language
TypeScript

Similar MCP servers

About Context7

Context7 is a freemium MCP server for developer tools. It can run locally on your machine or as a hosted remote server.

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.

Install

Run in a terminal

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

Add to Settings → Connectors → Add custom connector

https://mcp.context7.com/mcp
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Using several servers? Build one config file with the MCP config generator.

Configuration

  • CONTEXT7_API_KEYAPI key for authentication
  • CONTEXT7_API_KEYAPI key for authentication

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

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.

What it does

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

Pricing

Freemium, from $10 a month

Free plan; Pro at $10 per seat/month; Enterprise custom

Prices change. Check context7.com before you buy.

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

How AIPoweredBot checks servers