Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
upstash avatar

Context7 Mcp

  • 3.8k installs
  • 60.2k repo stars
  • Updated August 2, 2026
  • upstash/context7

context7-mcp is an agent skill that fetches up-to-date framework and library documentation via Context7 resolve-library-id and query-docs MCP tools.

About

context7-mcp is an Upstash Context7 skill that routes coding questions to live library documentation instead of stale training data. It activates when users ask setup or configuration questions, request code involving frameworks, need API references, or mention stacks such as React, Vue, Next.js, Prisma, or Supabase. The workflow resolves a libraryName with the user's full question via resolve-library-id, selects the best match using name accuracy and benchmark scores while honoring version hints like React 19, then calls query-docs with the chosen libraryId and the specific question. Guidelines stress passing the full user query for relevance, preferring official packages over community forks, and citing versions when available. This MCP-oriented variant complements CLI-based Context7 skills by embedding the same documentation retrieval pattern inside agent tool calls. Developers invoke it whenever generated code must follow current framework APIs, middleware rules, auth methods, or ORM query syntax that changes between releases.

  • Triggers on library setup, API reference, and framework code generation requests.
  • Two-step flow: resolve-library-id then query-docs with the user question.
  • Selection prefers exact name matches, higher benchmark scores, and version-specific IDs.
  • Covers React, Vue, Svelte, Express, Tailwind, Next.js, Prisma, Supabase, and similar stacks.
  • Emphasizes official sources and passing the full user query for better doc retrieval.

Context7 Mcp by the numbers

  • 3,761 all-time installs (skills.sh)
  • +189 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #107 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
At a glance

context7-mcp capabilities & compatibility

Capabilities
library id resolution from natural language quer · targeted documentation retrieval via query docs · version aware official source selection
Works with
supabase
Use cases
documentation · api development · frontend
From the docs

What context7-mcp says it does

use Context7 to fetch current documentation instead of relying on training data.
SKILL.md
Call `resolve-library-id` with:
SKILL.md
Call `query-docs` with:
SKILL.md
npx skills add https://github.com/upstash/context7 --skill context7-mcp

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.8k
repo stars60.2k
Security audit2 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryupstash/context7

How do I answer library setup and API questions with current docs instead of outdated model training data?

Fetch current library documentation and API examples through Context7 resolve-library-id and query-docs MCP tools during coding tasks.

Who is it for?

Developers using agents for React, Next.js, Prisma, Supabase, or other fast-moving libraries who need live doc lookup during implementation.

Skip if: Offline-only environments, proprietary internal APIs absent from Context7, or tasks with no library documentation needs.

When should I use this skill?

User asks how to configure a framework, requests code using a named library, or needs current API methods for React, Vue, Next.js, Prisma, or Supabase.

What you get

Resolved library IDs and fetched documentation snippets incorporated into accurate, version-aware coding answers.

  • Resolved library IDs
  • Fetched documentation excerpts for coding answers

Files

SKILL.mdMarkdownGitHub ↗

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 Next.js middleware?")
  • 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: The user's full question (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"), prefer version-specific IDs

Step 3: Fetch the Documentation

Call query-docs with:

  • libraryId: The selected Context7 library ID (e.g., /vercel/next.js)
  • query: The user's specific question

Step 4: Use the Documentation

Incorporate the fetched documentation into your response:

  • Answer the user's question using current, accurate information
  • Include relevant code examples from the docs
  • Cite the library version when relevant

Guidelines

  • Be specific: Pass the user's full question as the query for better results
  • Version awareness: When users mention versions ("Next.js 15", "React 19"), use version-specific library IDs if available from the resolution step
  • Prefer official sources: When multiple matches exist, prefer official/primary packages over community forks

Related skills

How it compares

Live Context7 doc lookup via MCP instead of guessing APIs from training data.

FAQ

How does context7-mcp retrieve documentation?

It calls resolve-library-id with libraryName and the user query, picks the best libraryId, then calls query-docs with that id and the question.

When should this skill activate?

On setup questions, library code generation, API reference requests, or mentions of frameworks like React, Next.js, Prisma, or Supabase.

How should library matches be chosen?

Prefer exact name matches, higher benchmark scores, version-specific IDs when mentioned, and official packages over community forks.

Is Context7 Mcp safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Documentationdocsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.