Back to services

Context7

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

View alternatives to Context7
Suggest edit
Open source
Self-hostable
MIT
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: We couldn't fetch the content of the official website this time, so the information below is compiled from publicly available sources. For specific details, please refer to the official website at https://context7.com/.

Overview

Context7 is developed by the Upstash team and addresses a common problem when large language models write code: a model's training data has a cutoff date, so it often produces outdated API calls or even invents functions that don't exist. Context7 indexes and organizes the latest documentation and code examples for a wide range of open-source libraries and frameworks, and injects the relevant content into the AI's context on demand through an MCP server, so the generated code stays consistent with the current version of the library.

Key Features

  • Up-to-date documentation retrieval: Fetches library documentation and code snippets from official sources, filters them by topic, and provides them to the model.
  • MCP server: Offers a standard MCP interface with two main tools:
    • resolve-library-id: resolves a library name into a library ID that Context7 recognizes;
    • get-library-docs: fetches documentation by library ID, with options to specify a topic and a token count.
  • Prompt trigger: Add "use context7" to your prompt, and the AI assistant will call Context7 to fetch documentation.
  • Web browsing: Search and view the documentation of indexed libraries directly on the official website.
  • Community contributions: Users can submit new libraries to expand the documentation index.

Target Users and Use Cases

  • Developers who use AI coding tools such as Cursor, Windsurf, VS Code (Copilot), Claude Code, and Claude Desktop;
  • Teams that frequently work with fast-moving frameworks (for example, Next.js and various SDKs) and need accurate API usage;
  • Developers building AI agents or RAG applications who need a reliable source of technical documentation.

Core Advantages

  • Directly reduces outdated APIs and hallucinations in AI-generated code;
  • Built on the open MCP protocol, so nearly any MCP-compatible client can connect;
  • No need to copy and paste documentation manually; relevant content is fetched automatically when you ask a question.

Installation and Configuration

Remote server: In a client that supports remote MCP, configure https://mcp.context7.com/mcp.

Running locally (requires Node.js): Add the following to your MCP client's configuration file:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

Claude Code example:

claude mcp add context7 -- npx -y @upstash/context7-mcp

Once configured, just add "use context7" at the end of your prompt.

Technical Requirements

  • The local setup requires a Node.js environment;
  • You need an AI client or editor that supports MCP.

Notable Points

  • The MCP server's code is open source on GitHub (upstash/context7);
  • Documentation content is curated and indexed by Context7, so coverage depends on which libraries have been indexed, and lesser-known libraries may be missing;
  • You can request an API key for higher usage limits or private use. For specific plans and limits, please refer to the official website.