Context7 logo

Context7

by upstash

Fetches current, version-aware library documentation and code examples for AI coding agents through Context7.

Install Context7

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for upstash/context7, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

upstash/context7 MCP server gives coding agents access to current, version-specific documentation and code examples from the Context7 service. Its MCP tools first resolve a library name into a Context7-compatible ID, then retrieve documentation for that ID. Use it when generated code needs accurate APIs, setup steps, or examples for libraries such as Next.js, Cloudflare Workers, or Supabase. The hosted endpoint can be configured directly in an MCP client, while the Context7 CLI can automate setup.

Use cases

  • Retrieve current framework API examples
  • Check version-specific library configuration
  • Generate code against Supabase authentication APIs
  • Find Cloudflare Worker caching guidance
  • Resolve a package name before querying its documentation

Key features

  • Context7-compatible library ID resolution
  • Documentation retrieval by library ID
  • Version-aware documentation queries
  • Hosted MCP endpoint
  • Optional CLI and skills setup

Tools2

What Context7 lets your agent do. Expand a tool for its parameters.

Self-reported~44 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

33/34 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 22d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars63kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Tools exposed2Callable tools this server registers over MCP.
Directory activity17 viewsConfig copies, upvotes, and views on AllMCPs.

How Context7 works

What upstash/context7 does

upstash/context7 MCP server connects an AI coding agent to the Context7 documentation service. It is designed to replace guesses based on stale training data with documentation and examples associated with current library versions.

The service is useful for implementation questions involving framework APIs, package configuration, authentication flows, deployment settings, and other library-specific tasks. A prompt can identify a library by name, provide a known Context7 library ID such as /supabase/supabase, or mention a desired version such as Next.js 16.

How it works

The MCP flow has two main steps:

  1. resolve-library-id matches a general library name to a Context7-compatible library ID.
  2. query-docs retrieves documentation for that ID based on the agent’s query.

When the library ID and version are already known, including them in the prompt lets Context7 skip the matching step. Version information in the request helps select documentation for the requested release. Agents can use the returned material while generating code or explaining configuration.

Context7 also offers a separate CLI-plus-skills mode that does not require MCP. The ctx7 CLI can search the index with ctx7 library <name> <query> and retrieve documentation with ctx7 docs <libraryId> <query>, but those commands are separate from the MCP tools listed here.

Setup and configuration

The hosted MCP endpoint is https://mcp.context7.com/mcp. Configure that URL in an MCP-compatible client and send the Context7 API key in an HTTP authorization header:

text
Authorization: Bearer YOUR_API_KEY

A free API key is recommended for higher rate limits. The CLI setup path requires Node.js 22.13 or newer and can be started with:

Terminal
npx ctx7 setup

That command authenticates through OAuth, creates an API key, and lets you choose CLI-plus-skills or MCP mode. It can target particular agents with --cursor, --claude, or --opencode. Generated setup can be removed with npx ctx7 remove.

Tools and capabilities

  • Resolve general library names into Context7-compatible IDs.
  • Retrieve documentation using a resolved library ID.
  • Request version-specific library documentation by mentioning the version.
  • Return current documentation and code examples to the coding agent’s context.
  • Use explicit library IDs in prompts to avoid an additional matching step.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Context7

upstash/context7 is an MCP server that connects AI coding agents to Context7’s up-to-date library documentation service. Its main tools, resolve-library-id and query-docs, identify libraries and retrieve version-specific documentation and code examples for use in generated code, setup guidance, and API questions.

Configure the Context7 endpoint https://mcp.context7.com/mcp in your MCP client and provide an API key as an Authorization Bearer header. Alternatively, run npx ctx7 setup to authenticate, generate a key, and choose MCP mode.

Yes, upstash/context7 supports Cursor. The setup command can target Cursor with npx ctx7 setup --cursor, and the project provides a Cursor installation link.

Mention the desired library version in your prompt, such as Next.js 16. Context7 uses that version information when selecting documentation; you can also include a known Context7 library ID to skip library matching.

An API key is recommended for higher rate limits. For manual MCP configuration, pass it in the Authorization: Bearer YOUR_API_KEY header when connecting to the hosted Context7 endpoint.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewContext7 AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/upstash-context7?style=directory)](https://allmcps.com/mcp/upstash-context7)
HTML Embed
<a href="https://allmcps.com/mcp/upstash-context7"><img src="https://allmcps.com/api/badge/upstash-context7?style=directory" alt="Context7 on AllMCPs" /></a>