upstash/context7

Context7 Platform -- Up-to-date docs for AI agents

What it solves

Context7 prevents LLMs from generating outdated or hallucinated code by providing them with real-time, version-specific documentation and code examples directly within the prompt context. It eliminates the need for developers to manually switch tabs to check documentation while using AI coding assistants.

How it works

Context7 functions as a bridge between AI agents and a curated index of software library documentation. It can be integrated into coding agents via two primary methods:

  1. CLI + Skills: Installs a CLI tool (ctx7) that guides agents to fetch documentation using specific commands.
  2. MCP (Model Context Protocol): Registers an MCP server that allows agents to call documentation tools natively as functions.

Users can specify library IDs or version numbers in their prompts to ensure the AI retrieves the most accurate and current information.

Who it’s for

Developers using AI coding assistants (such as Cursor, Claude Code, or OpenCode) who need accurate, up-to-date API references and implementation examples for various libraries.

Highlights

  • Version-Specific Retrieval: Automatically matches and retrieves documentation for specific library versions mentioned in the prompt.
  • Multiple Integration Modes: Supports both a CLI-based approach and an MCP server for native tool calling.
  • Direct Prompt Injection: Places documentation and examples straight into the LLM's context to reduce hallucinations.
  • Broad Client Support: Compatible with over 30 MCP clients and provides specialized setup for popular AI IDEs.

Related

  • Project
  • Project
  • Project
  • Project
  • Project