OfficialDocumentation

Context7

by Upstash

Give coding assistants current, version-specific library documentation on demand.

Best for

Coding agents that keep producing outdated or invented API usage for fast-moving libraries.

Connect Context7

Choose your client

Local

This server runs on your machine. Pick your client for the matching config; placeholders stand in for any secrets.

claude_desktop_config.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp"
      ],
      "env": {
        "CONTEXT7_API_KEY": "<YOUR_CONTEXT7_API_KEY>"
      }
    }
  }
}
  • Replace each placeholder with your own value. The registry lists these variables but does not say which are optional.
  • Add this under the existing mcpServers key if the file already has one, then fully restart Claude Desktop.

Format checked Oct 30, 2026 against Claude Desktop documentation. Client settings change, so confirm with the client's own docs.

Connection details

Hosted endpoint
https://mcp.context7.com/mcp
Packages

npm package · stdio
@upstash/context7-mcp@4.4.4

MCPB bundle · stdio
https://github.com/upstash/context7/releases/download/mcpb-v4.4.4/context7.mcpb@4.4.4

Overview

Context7 looks up documentation for a library when asked and hands it to the assistant, so answers about an API do not rest only on training data. The MCP server has two tools: resolve-library-id finds the library, and query-docs retrieves documentation for it. Upstash offers it as a hosted endpoint at mcp.context7.com or as an npm package you run locally, and the project also supports a CLI-and-skills setup that does not use MCP. In the README's examples, adding "use context7" to a prompt is what triggers a lookup.

What it can do

  • resolve-library-id turns a library name into a Context7 library ID; query-docs retrieves documentation for that ID.
  • Runs as a hosted endpoint at https://mcp.context7.com/mcp or as the @upstash/context7-mcp npm package.
  • npx ctx7 setup can instead install a skill that fetches docs through CLI commands, with no MCP server involved.

What you need

Sign-in and credentials

An API key is recommended and is free from the Context7 dashboard; for the hosted endpoint it goes in a Bearer Authorization header, and npx ctx7 setup signs in with OAuth and generates one.

Environment variables

Set these before the server starts.

  • CONTEXT7_API_KEYsecret
Request headers

The hosted endpoint asks for these headers.

  • Authorizationsecret
Runs as

npm package, MCP bundle

Sources

MCP Registry
Listed in the MCP Registry as io.github.upstash/context7
Last checked
Oct 31, 2026
Record reviewed
Oct 31, 2026

Statements on this page come from

Why is this labelled Official?

Registry name io.github.upstash/context7. The registry only lets an organization's owners publish under its io.github.<org> namespace (registry authentication docs, read 2026-10-30). Repository upstash/context7 is the project's own repository: its About description reads "Context7 Platform -- Up-to-date docs for AI agents" and the README title is "Context7 - Up-to-date Docs for AI Agents" (both read 2026-10-30). The registry entry's website is context7.com.

Listing on HistChat is not an endorsement or a security review. MCP servers can access data or perform actions, so review the source and permissions before connecting.

  • Microsoft Learn

    MicrosoftOfficial

    Search and fetch current Microsoft documentation and code samples from an assistant, with no sign-in.

    Category
    Documentation
    Connection
    Remote
  • Chrome DevTools

    GoogleOfficial

    Let a coding agent drive a live Chrome browser to debug pages, inspect network traffic and record performance traces.

    Category
    Developer Tools
    Connection
    Local
    GitHub stars
    55k
  • PostHog

    PostHogOfficial

    Query product analytics, manage feature flags and experiments, and debug errors in PostHog from an assistant.

    Category
    AI & Data
    Connection
    Remote