New advertisers: 50% off your first month with code FIRSTMONTHSee slots
upstash avatar

Context7 Mcp

Fetch current library documentation through Context7 instead of relying on training data for framework and API questions.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
6
skills.sh installs
7.1K
GitHub stars
65.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers setup questions, library API references, and code generation for libraries such as React, Next.js, Prisma, and Supabase
  • Runs resolve-library-id to find the library, then query-docs to fetch scoped documentation for each concept
  • Enforces one concept per query, with separate calls for multi-topic questions unless the concepts interact
  • Passes a pinned or named library version as version so answers match the version the project uses

Install

$ npx -y skills add upstash/context7 --skill context7-mcp -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.

When to Use This Skill

Activate this skill when the user:

  • Asks setup or configuration questions ("How do I configure a Next.js proxy?")
  • Requests code involving libraries ("Write a Prisma query for...")
  • Needs API references ("What are the Supabase auth methods?")
  • Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)

How to Fetch Documentation

Step 1: Resolve the Library ID

Call resolve-library-id with:

  • libraryName: The library name extracted from the user's question
  • query: What to look up in the library's documentation (improves relevance ranking)

Step 2: Select the Best Match

From the resolution results, choose based on:

  • Exact or closest name match to what the user asked for
  • Higher benchmark scores indicate better documentation quality
  • If the user mentioned a version (e.g., "React 19") or the project pins one, keep it for version in Step 3

Step 3: Fetch the Documentation

Call query-docs with:

Details

Repository
github.com/upstash/context7
Categories
Technical Documentation, AI Agents & LLM Apps, Agent Workflow & Planning
First seen
Apr 16, 2026

More from upstash/context7

All 3

Similar to Context7 Mcp

More Technical Documentation