Skip to content
Graphify
First-party publisher Registry listed

Context7

Retrieve version-aware library documentation and examples inside an agent conversation before code is generated.

Overview

What Context7 does

Context7 gives agents a focused documentation lookup path instead of asking them to rely entirely on training data. The agent first resolves a package or library to Context7's identifier, then requests documentation relevant to the current programming question. A hosted HTTP endpoint offers the shortest setup, while the npm package provides a local stdio option for clients that prefer launching their own process.

Best for

  • Checking current library APIs during implementation
  • Grounding setup and configuration answers in package documentation
  • Reducing outdated examples in code-generation workflows

Not ideal for

  • General web search or broad research
  • Private documentation without a configured account and key
  • Tasks where the authoritative source is project code rather than library docs

Capabilities

What an agent can do

  1. 01

    Library identifier resolution

  2. 02

    Topic-focused documentation retrieval

  3. 03

    Version-sensitive code examples

  4. 04

    Hosted and local connection modes

  5. 05

    Optional API-key authentication for higher limits and private sources

Representative tools and operations

resolve-library-idquery-docs

Installation

Connect Context7

Use the publisher’s current instructions as the source of truth. The examples below were checked on .

Generic HTTP clientConnect to the hosted server
Command
https://mcp.context7.com/mcp
Configuration
{"type":"streamable-http","url":"https://mcp.context7.com/mcp","headers":{"CONTEXT7_API_KEY":"${CONTEXT7_API_KEY}"}}
Claude CodeLaunch the npm package locally
Command
claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
Configuration
Add --api-key only when authenticated access is needed.

Trust and access

Authentication and security notes

Authentication: The public service can be used without a key for basic access. A Context7 API key can be sent in the hosted request headers or passed to the local package for higher limits and private-repository features.

Review before connecting

  • Treat a Context7 API key as a secret and avoid embedding it in shared configuration.
  • Review retrieved examples against the version and constraints of your own application.
  • For private repositories, confirm which content the account is permitted to index and return.

Known limitations

  • The open repository does not include Context7's private crawling, parsing, or API backend.
  • Coverage and freshness depend on whether a library has been indexed successfully.
  • It supplies documentation context; it does not verify that generated code compiles or passes tests.

Evidence

Sources used for this guide

Facts were checked against primary publisher material. Descriptions and guidance are original Graphify summaries.

FAQ

Questions about Context7

Is a Context7 API key mandatory?

No for basic public use. A key is useful for higher service limits and features tied to an account, including private sources.

Why does Context7 use two tools?

Resolving the library first disambiguates similarly named packages; the documentation query can then target the selected library and topic.

Editorial review · MCP server

What this page is based on

Server capabilities and operational notes are tied to the recorded source set and review date.

Review basis
MCP server record and linked primary evidence
Last checked
Jul 11, 2026
Evidence links
3 recorded in the page data

Source snapshot is 91 days old; verify upstream details before relying on pricing, availability, or security claims.