← Back to MCP servers

Upstash

Context7 MCP Server

Fetch up-to-date library documentation and code examples directly into your AI coding assistant.

No auth required

Last reviewed Mar 2, 2026

Install

claude mcp add context7 --transport stdio -- npx -y @upstash/context7-mcp@latest
Scope: project

Available tools

ToolDescription
resolve-library-idSearch for a library and resolve its Context7 identifier
get-library-docsFetch documentation and code examples for a specific library

What it does

The Context7 MCP Server from Upstash provides your AI coding assistant with access to up-to-date documentation and code examples for thousands of open-source libraries. Instead of relying on training data that may be outdated, the assistant can fetch current documentation on demand, ensuring accurate and version-specific guidance.

This is one of the most impactful MCP servers for day-to-day development. It solves the common problem of AI assistants generating code based on outdated API patterns by giving them real-time access to the latest library documentation. Whether you are using a newly released version of a framework or an obscure utility library, Context7 has the docs.

Use cases

  • Get accurate, up-to-date code examples for any library version instead of relying on potentially stale training data
  • Look up API reference documentation for unfamiliar libraries while coding
  • Verify that generated code matches the latest API of a framework or library
  • Explore library features and patterns when evaluating new dependencies
  • Get version-specific documentation when working with older or newer versions of a library

Getting started

  1. Install the server using the command above. No API keys or authentication are needed -- Context7 provides free access to its documentation index.
  2. Once installed, your AI assistant can automatically fetch library documentation when it needs to generate code or answer questions about specific libraries.
  3. Use the resolve-library-id tool first to find the correct library identifier, then get-library-docs to fetch the documentation.
  4. Context7 indexes documentation from thousands of popular open-source libraries and updates them regularly. If a library is not indexed, you can request it through the Context7 website.