MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

Context7 MCP

by upstash

Feed your AI agent the latest library docs so it stops hallucinating outdated APIs

code Node.js Beginner Self-hostable No API key Verified
πŸ“… Updated: 6d ago

Description

Every developer using AI coding assistants has hit the same wall: you ask for help with a library, and the agent confidently generates code using an API that was deprecated two versions ago. Context7 MCP eliminates this problem by giving your agent on-demand access to up-to-date documentation for thousands of libraries and frameworks. When your agent needs to write code that uses a specific package, it can fetch the current docs first and work from accurate information instead of stale training data. The workflow is elegantly simple. Context7 maintains a curated index of documentation for popular open-source projects, continuously updated as new versions are released. Your agent uses two tools: one to resolve a library name into a Context7 identifier, and another to fetch the relevant documentation pages. The retrieved content is compact and structured, designed to fit within context windows without overwhelming the model. This means your agent gets exactly the reference material it needs, not an entire documentation site dumped into the prompt. What makes Context7 particularly valuable is that it requires zero configuration beyond installing the MCP server. No API keys, no accounts, no subscriptions for basic use. It works out of the box with every major MCP client, and the documentation index covers the libraries developers actually use: React, Next.js, Tailwind, Prisma, FastAPI, LangChain, and hundreds more. If you have ever wasted time correcting an AI agent that insisted on using a function signature that no longer exists, this server pays for itself on the first use.

βœ… Best for

Any developer using AI coding agents who wants accurate, up-to-date library documentation injected into their agent's context

⏭️ Skip if

You only work with internal or proprietary libraries that are not in public documentation indexes

πŸ’‘ Use cases

  • Ensure AI-generated code uses current API signatures instead of outdated ones
  • Look up framework-specific patterns and best practices during code generation
  • Explore unfamiliar libraries by having your agent fetch and summarize their docs
  • Validate that suggested dependencies exist and check their current usage patterns

πŸ‘ Pros

  • βœ“ No API key or account required to get started
  • βœ“ Covers thousands of popular libraries with continuously updated docs
  • βœ“ Dramatically reduces hallucinated or outdated code from AI agents
  • βœ“ Lightweight two-tool interface that is easy for agents to use effectively
  • βœ“ Very active development with frequent updates and growing library coverage

πŸ‘Ž Cons

  • βœ— Documentation coverage depends on Context7's index, niche libraries may be missing
  • βœ— Fetched docs consume context window tokens, which matters for smaller models
  • βœ— Relies on Context7's cloud service for documentation retrieval

πŸ”§ Exposed tools (2 tools)

ToolCategoryDescription
resolve-library-iddocumentationResolve a library or framework name to a Context7 identifier
get-library-docsdocumentationFetch up-to-date documentation pages for a resolved library

⚑ Installation

Prerequisites:

  • β€’ Node.js
claude mcp add context7 -- npx context7-mcp@latest

πŸ’‘ Tips & tricks

Add Context7 as the first MCP server in your setup. Most agents will learn to consult it automatically when they need to write code with a specific library. If your agent is not using it proactively, include "use context7" in your prompt when asking for code that depends on a particular framework. The resolve-library-id tool accepts fuzzy names, so "react" or "nextjs" will work without exact package names.

Quick info

Author
upstash
License
Runtime
Node.js
Transport
stdio
Category
code
Difficulty
Beginner
Self-hostable
βœ…
API key
No API key needed
Docker
β€”
Version
1.0.31
Updated
Feb 16, 2026

Client compatibility

  • βœ… Claude Code
  • βœ… Cursor
  • βœ… VS Code Copilot
  • βœ… Gemini CLI
  • βœ… Windsurf
  • βœ… Cline
  • βœ… JetBrains AI
  • βœ… Warp

Platforms

🍎 macOS 🐧 Linux πŸͺŸ Windows