ipIterPrompt
MCP serverWeb & SearchVerified Last verified 2026-07-24

Context7 MCP Server

by Upstash

Context7 fetches up-to-date, version-specific documentation and code examples for popular libraries and injects them into the prompt, reducing hallucinated APIs. You add 'use context7' to a request and the agent retrieves the relevant docs before answering.

Works with

The Model Context Protocol (MCP).

When to use it

  • Coding against a fast-moving library where the model's training may be stale
  • When the agent keeps inventing methods that don't exist

When not to

  • For private/internal libraries it doesn't index

What it does

  • Fetch current, version-specific library documentation
  • Provide real code examples instead of guessed APIs
  • Reduce out-of-date or hallucinated API usage

How to install

Setup steps with copy-paste config. Sources are cited under each method.

npx

Requires: Node.js

  1. Add to your MCP config

    Add the server; some hosts also accept a remote endpoint.

    json
    {
      "mcpServers": {
        "context7": {
          "command": "npx",
          "args": ["-y", "@upstash/context7-mcp"]
        }
      }
    }
  2. Invoke it in a prompt

    Append 'use context7' to a coding request to trigger a docs fetch.

    config
    How do I stream responses with the latest Anthropic SDK? use context7

How to prompt it

Copy-paste prompts written to exercise this plugin, with what to expect.

Get current API usage

The agent keeps using an outdated method signature.

Show me how to configure the router in the current version of the framework. use context7

What to expect: Context7 fetches the version-specific docs and the agent answers with an API that actually exists in that version.

  • Name the exact library and version to get the most accurate snippet.

Tips for getting the most out of it

  • Combine with a lockfile-aware prompt so the docs match the version you actually depend on.

Prompts to pair with it

Real prompts from the IterPrompt library you can copy or run.

Codebase WIKI Documentation Skill

Turn any AI chat into a codebase wiki documentation skill with this community persona prompt.

825 copiesOpen ↗

SAP ABAP Carbon Footprint Module Graduation Project Documentation

Turn any AI chat into a sap abap carbon footprint module graduation project documentation with this community persona prompt.

3,803 copiesOpen ↗

Context7 Documentation Expert Agent

Turn any AI chat into a context7 documentation expert agent with this community persona prompt.

4,023 copiesOpen ↗

Multi-Audience Application Discovery & Documentation Prompt

Turn any AI chat into a multi-audience application discovery & documentation prompt with this community persona prompt.

5,243 copiesOpen ↗

Documentation Update Automation

Turn any AI chat into a documentation update automation with this community persona prompt.

2,173 copiesOpen ↗

change home page desgin for blog and documentation platorm

Turn any AI chat into a change home page desgin for blog and documentation platorm with this community persona prompt.

4,812 copiesOpen ↗
See more prompts in the library

Frequently asked questions

Is it free?+

There's a free tier; higher usage may require an account/API key. Confirm current limits on the official site — we don't publish unverified pricing.

Pairs well with

Related guides

Alternatives to Context7 MCP Server

Sources & verification

The facts on this page and where they come from. Anything unverified is labeled — we'd rather say "unknown" than guess.

Install steps, pricing, and availability change often. Always confirm on the official page before relying on setup details.