Server profile

Context7 MCP Server

Context7 retrieves current library documentation and code examples for AI coding assistants. It supports MCP tools or a CLI-and-skills workflow, with library IDs and version-aware requests helping narrow the documentation context.

Server facts

Context7 MCP Server

Project

Author
upstash
License
MIT

Tech

Runtime / language
node
Transports
stdio
Remote available
No
Authentication
Not specified

Activity

GitHub stars
63,157
Last commit
Data as of

Tags

  • Code Examples
  • Coding Agents
  • Documentation
  • Library Lookup
  • Version Specific

Overview

Context7 supplies coding assistants with library documentation and examples retrieved for the task at hand. It is intended to address the mismatch between a model's training knowledge and a project's current APIs or package versions. Users can request documentation through an ordinary prompt, identify a library directly with its Context7 ID, or mention a desired version. The MCP interface separates library resolution from documentation retrieval: one tool finds the correct identifier, and another queries relevant material for that library. This gives assistants a documented retrieval route instead of relying exclusively on recalled API usage.

The platform also offers a CLI and skills mode that does not require MCP. Its setup command runs through npx, requires Node.js 18 or later, authenticates with OAuth, creates an API key, and installs the selected integration. Manual MCP configuration uses a hosted endpoint and an API-key header; a free key is recommended for higher limits. The README provides client guidance and instructions for automatically invoking documentation retrieval on library-related tasks. It also sets important boundaries: listed documentation is community-contributed and is not guaranteed complete, accurate, or secure. Only the MCP server source is in this repository; the API backend, parser, and crawler are private. Those distinctions matter for anyone expecting a fully self-contained documentation platform.

Install & configure

Requirements

  • Node.js 18 or later for the setup CLI
  • A compatible coding agent or MCP client
Documented launch / install command
npx ctx7 setup

This is a setup command, not a persistent server launch. Choose MCP mode during setup. Manual HTTP configuration passes a key in the CONTEXT7_API_KEY header, not an environment variable. A free API key is recommended for higher limits.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

A supported configuration example is not available for this client and transport. Check the client documentation for its connection flow; do not substitute an undocumented JSON format.

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "context7-mcp": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "context7-mcp": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "context7-mcp": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
resolve-library-idMatch a library name and task to a Context7 library identifier.
query-docsRetrieve task-relevant documentation for an exact Context7 library ID.

Names, permissions, and defaults can change. Check the current upstream documentation before granting access.

Use cases

  • Retrieve library-specific API documentation while generating code.
  • Find examples for a particular framework or package version.
  • Resolve an ambiguous library name to a Context7 identifier.
  • Configure an agent to fetch documentation automatically for library questions.

Strengths

  • Supports version-aware documentation and code examples.
  • Offers both MCP tools and a CLI-and-skills mode.
  • Allows direct library IDs to skip library matching.

Limitations

  • Community-contributed documentation is not guaranteed accurate, complete, or secure.
  • The backend, parsing engine, and crawler are not included in the repository.
  • Higher rate limits are tied to using an API key.

Frequently asked questions

Yes. The README says to mention the library version in the prompt so Context7 can match it.

Include the Context7-compatible ID in your request to bypass the library-matching step.

No. Context7 also supports CLI commands guided by an installed agent skill.

No. The repository contains the MCP server, while the supporting API backend, parser, and crawler remain private.

Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.

Related MCP servers

Notion MCP Server

Memory & Knowledge

Notion MCP Server connects agents to Notion pages and data sources with compact discovery, reading, querying, and editing tools. It includes schema-aware helpers, raw API operations, and optional interactive MCP Apps.

Notion MCP Server

Memory & Knowledge

Connect an MCP client to the Notion API to work with pages and data sources. This local server supports Markdown content operations, but Notion now prioritizes its separate remote MCP service.

MCP Advisor

Developer Tools

MCP Advisor helps assistants discover MCP servers from natural-language requests and obtain installation guidance. It combines registry providers with offline search and offers optional local Meilisearch integration.

Serena

Developer Tools

Serena gives coding agents symbol-aware retrieval, editing, refactoring, and debugging capabilities through MCP. It uses language servers or a JetBrains plugin to bring IDE-style code understanding to existing AI clients.

FastAPI-MCP

Developer Tools

FastAPI-MCP exposes existing FastAPI endpoints as MCP tools while retaining schemas, endpoint documentation, and dependency-based authentication. It is a native extension for developers adding agent access to a FastAPI service.

GitMCP

Developer Tools

GitMCP turns public GitHub repositories and GitHub Pages projects into documentation sources for AI assistants. It offers repository-specific endpoints or a dynamic server for retrieving docs, searching code, and following referenced content.

XcodeBuildMCP

Developer Tools

XcodeBuildMCP provides an MCP server and CLI for AI agents working on iOS and macOS projects. One package supports direct terminal tools, simulator builds, and stateful operations such as debugging and log capture.

DevDocs by CyberAGI

Developer Tools

Crawl technical documentation into organized Markdown, JSON, and MCP-accessible content for development assistants. The public DevDocs repository is marked as not publicly maintained.