Skill Development

context7

Context7 connects Claude Code to Upstash's hosted remote MCP server so it can pull current, version-specific documentation and code examples straight from source repositories. This replaces stale training data and helps avoid hallucinated APIs.

  • 37.6k GitHub stars
context7 — illustration

What it is

Context7 targets a common problem with AI coding assistants: outdated training data and hallucinated APIs. It doesn't rely on stale knowledge. Instead, it fetches current documentation and code examples directly from source repositories and brings them into the LLM's context, including documentation for specific versions. This plugin connects Claude Code to Context7's hosted remote MCP server at https://mcp.context7.com/mcp. You don't need local Node.js, npm or npx. The plugin provides two tools: - resolve-library-id searches for libraries and returns Context7-compatible identifiers (such as /vercel/next.js) along with the available versions. - query-docs fetches documentation for a specific library, ranked by relevance to your question. The plugin works automatically when you ask about libraries. To target a specific version, include the version in the library ID (for example /vercel/next.js/v15.1.8). The versions returned by resolve-library-id let you pick the one that matches your project. An API key is optional. Without one, the plugin connects anonymously and shares the anonymous rate limits. With a key from the Context7 dashboard, it uses your own plan. The plugin description also says to authenticate with Context7 when prompted. The plugin is maintained by Upstash. The full plugin, with skills, agents and commands, lives in the upstash/context7 repository.

Who it's for

  • Claude Code users who want current library documentation instead of relying on outdated training data
  • Developers who want to reduce hallucinated APIs in AI-generated code
  • Developers who need documentation that matches the specific library versions in their projects
  • Users who prefer a hosted MCP server and don't want to install Node.js, npm or npx locally

Requirements

Requirements

  • Claude Code
  • Network access to Context7's hosted remote MCP server (https://mcp.context7.com/mcp)
  • Optional: a Context7 API key, created in the Context7 dashboard, to use your own plan instead of the anonymous rate limits

Setup

  1. (Optional) Set your Context7 API key

    Create an API key in the Context7 dashboard (https://context7.com/dashboard). Export it as an environment variable before launching Claude Code, for example in ~/.zshrc or ~/.bashrc. The plugin's MCP server configuration picks up CONTEXT7_API_KEY automatically.

    bash
    # e.g. in ~/.zshrc or ~/.bashrc
    export CONTEXT7_API_KEY="your-api-key"
  2. Restart and verify

    Restart Claude Code after setting the key. Then check your usage in the Context7 dashboard (https://context7.com/dashboard).

Context7 بيوصّل Claude Code بسيرفر MCP مستضاف من Upstash، وبيجيب توثيق وأمثلة كود محدّثة وخاصة بكل نسخة مباشرة من مستودعات المصدر. هيك ما بتضل معتمد على معلومات قديمة أو APIs مألّفة.

Examples

Ask about framework setup

Prompt
prompt
How do I set up authentication in Next.js 15?

Expected output: Asking about a library is enough to trigger the plugin. It fetches current Next.js documentation to answer.

Request code examples

Prompt
prompt
Show me React Server Components examples

Expected output: The plugin pulls up-to-date code examples from source repositories.

Look up library syntax

Prompt
prompt
What's the Prisma syntax for relations?

Expected output: query-docs returns Prisma documentation ranked by relevance to the question.