TL;DR: Context7 v0.3.12 from Upstash is more than just an MCP server — it’s a full documentation delivery platform. It resolves library names, fetches up-to-date docs, runs a skills marketplace (the Agent Skills open standard), exposes a REST API, and sets up your AI coding agent with a single command. The CLI (
ctx7) works standalone in your terminal or as the backbone of Claude Code, Cursor, OpenCode, Codex, Gemini CLI, and any MCP-compatible client.
LLM training data has an expiration date. React 19 ships, Astro 5 drops, Go Fiber v3 arrives — and your model still thinks useEffect cleanup looks the way it did in 2024. Context7 solves this by delivering current documentation into your AI coding agent on demand, without manually copy-pasting from the browser.
I’ve been using Context7 as an MCP server for a while, but recently discovered it’s grown into something much larger. Here’s the full breakdown after a deep dive into the project, its CLI, skills marketplace, API, and how it all fits together.
What Context7 Does
Context7 is an Upstash project that does one thing well: get up-to-date library documentation into AI coding assistants. It works by:
- Crawling and indexing documentation from GitHub repos, websites, OpenAPI specs, and llms.txt files
- Ranking results by relevance, code snippet count, source reputation, and a benchmark score
- Returning targeted documentation snippets with code examples — not raw web pages
The core idea is simple: instead of hoping your model’s training data covers the library version you’re using, you query Context7 and get current docs piped directly into context.
The CLI — ctx7
The ctx7 CLI (v0.3.12) is the primary interface. Install it globally with npm install -g ctx7 or run it ad-hoc via npx ctx7. It does three things:
Library Documentation Lookup
A two-step process — resolve the library name, then fetch docs:
# Step 1: Resolve library name to Context7 IDctx7 library astro# Returns ranked results with IDs like /withastro/astro, /websites/astro_build_en, etc.
# Step 2: Fetch documentation with a specific queryctx7 docs /withastro/astro "content collections glob loader"# Returns relevant code snippets and documentationEach library result includes a Context7 ID (e.g., /gofiber/fiber), code snippet count, source reputation (High/Medium/Low), and a benchmark score (0–100). Higher snippet counts mean more documentation coverage. You can pin specific versions too: /vercel/next.js/v14.3.0-canary.87.
# Output as JSON for scriptingctx7 library react "how to use hooks" --json | jq '.[0].id'
# Version-specific docsctx7 docs /vercel/next.js/v14.3.0 "app router middleware"Setup Wizard
This is the part that caught me off guard. ctx7 setup configures Context7 for any major AI coding agent with a single command:
ctx7 setup --claude # Claude Codectx7 setup --cursor # Cursorctx7 setup --opencode # OpenCodectx7 setup --codex # Codexctx7 setup --gemini # Gemini CLIctx7 setup --mcp # MCP server modectx7 setup --cli # CLI + Skills mode (no MCP)Add --project to configure per-project instead of globally, --api-key for API key auth, or --oauth for OAuth flow. Supported output targets include Claude Code (.claude/), Cursor (.cursor/), universal (.agents/skills/), and Antigravity (.agent/skills/).
Skills Management
The skills system is Context7’s newest and most ambitious feature. More on that below.
The Skills Marketplace
Context7 now hosts a skills registry — a searchable marketplace of reusable AI coding assistant skills indexed from GitHub repositories. Skills follow the Agent Skills open standard, which means a skill is simply a directory containing a SKILL.md file with instructions that AI assistants load when relevant.
What Are Skills?
Skills are reusable prompt templates that extend what your AI coding assistant can do. They standardize workflows, share domain expertise, and save you from repeatedly explaining the same patterns.
Context7’s own registry ships popular skills from Anthropic’s official repository (/anthropics/skills) and the community:
| Skill | Repository | What It Does |
|---|---|---|
pdf | /anthropics/skills | Read, create, merge, split, encrypt PDFs |
docx | /anthropics/skills | Create and manipulate Word documents |
pptx | /anthropics/skills | Build slide decks and presentations |
xlsx | /anthropics/skills | Handle spreadsheets and tabular data |
mcp-builder | /anthropics/skills | Build MCP servers in Python or TypeScript |
skill-creator | /anthropics/skills | Create, test, and benchmark new skills |
claude-api | /anthropics/skills | Build apps with Claude API / Anthropic SDK |
webapp-testing | /anthropics/skills | Test web apps with Playwright |
context7-mcp | /upstash/context7 | Auto-fetch docs when you ask about any library |
context7-cli | /upstash/context7 | CLI usage for docs and skill management |
find-docs | /upstash/context7 | Always verify against current docs, never rely on training data |
CLI Commands
# Search the registryctx7 skills search "react testing"ctx7 skills search pdf
# Browse skills in a repositoryctx7 skills info /anthropics/skillsctx7 skills info /upstash/context7
# Install — single skill or all from a repoctx7 skills install /upstash/context7 context7-clictx7 skills install /anthropics/skills --all
# Generate a skill for a library using AIctx7 skills generate --claudectx7 skills generate --universal
# Suggest skills based on your project dependenciesctx7 skills suggest
# List installed skillsctx7 skills list --global
# Remove a skillctx7 skills remove context7-cliTrust and Security
Each skill has a trust score (0–10) based on quality and safety indicators. Context7 also scans for prompt injection in skill files and blocks malicious content. Skills are sandboxed by the AI client — they’re just markdown instructions, not executable code.
The REST API
For programmatic access, Context7 exposes a REST API. All endpoints require an API key (from the dashboard at context7.com/dashboard) via Authorization: Bearer <KEY>.
| Method | Endpoint | Description |
|---|---|---|
| Search | GET /api/v2/libs/search | Find libraries by name |
| Context | GET /api/v2/context | Get documentation snippets |
| Refresh | POST /api/v1/refresh | Refresh a library’s docs |
| Add Repo | POST /api/v2/add/repo/{provider} | Submit a GitHub repo |
| Add OpenAPI | POST /api/v2/add/openapi | Submit an OpenAPI spec |
| Add Website | POST /api/v2/add/website | Submit a website for crawling |
| Add LLMs.txt | POST /api/v2/add/llmstxt | Submit an llms.txt file |
| Add Confluence | POST /api/v2/add/confluence | Submit a Confluence space |
| Policies | GET/PATCH /api/v2/policies | Manage teamspace policies |
A typical workflow:
import requests
headers = {"Authorization": "Bearer CONTEXT7_API_KEY"}
# Search for a libraryresp = requests.get( "https://context7.com/api/v2/libs/search", headers=headers, params={"libraryName": "fiber", "query": "error handling middleware"})lib = resp.json()["results"][0] # Best match
# Fetch documentation contextdocs = requests.get( "https://context7.com/api/v2/context", headers=headers, params={"libraryId": lib["id"], "query": "error handling middleware", "type": "json"}).json()
for snippet in docs["codeSnippets"]: print(snippet["codeTitle"]) for code in snippet["codeList"]: print(code["code"])Rate limiting returns 429 with Retry-After, RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers.
Pricing
| Free | Pro ($10/seat/mo) | Enterprise | |
|---|---|---|---|
| API calls | 1,000/mo | 5,000/seat/mo | Custom |
| Additional calls | — | $10/1,000 | Custom |
| Private repos | No | Yes ($25/1M tokens) | Custom |
| Team collaboration | — | Yes | Yes |
| OAuth 2.0 | — | Yes | Yes |
| SSO (SAML/OIDC) | — | — | Yes |
| Self-hosted | — | — | Yes |
| SOC-2 compliance | — | — | Yes |
The free tier is generous for individual use — 1,000 API calls per month covers most personal workflows. Private repo parsing at $25 per 1M tokens is reasonable for internal documentation.
Integrations and Clients
Context7 supports a wide range of AI coding agents:
- MCP Server — the original form, works with any MCP-compatible client
- Claude Code — one-command setup via
ctx7 setup --claude - Cursor — setup via
ctx7 setup --cursor - OpenCode — setup via
ctx7 setup --opencode - Codex — setup via
ctx7 setup --codex - Gemini CLI — setup via
ctx7 setup --gemini - GitHub Actions — CI/CD integration
- CodeRabbit — code review integration
- Factory AI — agentic integration
- Vercel AI SDK — as an agentic tool
- TypeScript SDK — programmatic access
Practical Workflow with Context-Mode
In my setup, I use Context7 purely via the CLI (ctx7) routed through context-mode’s sandbox. This keeps documentation output out of my context window:
# Resolve + fetch in one ctx_batch_execute callctx7 library astro "content collections"ctx7 docs /withastro/astro "glob loader schema"
# Results get indexed into FTS5, searchable via ctx_searchThis pattern replaces the MCP server entirely — the CLI does the same thing, and context-mode’s sandbox ensures only summaries enter context. For my CLI-first workflow, this is more flexible than running a separate MCP server.
Best Practices
- Be specific with queries — “How to implement auth with middleware” beats “auth”
- Use library IDs directly if you know them — skips the search step
- Specify versions — “Next.js 14 middleware” gets version-matched results
- Cache responses — docs don’t change frequently
- Add an auto-invoke rule to your CLAUDE.md or Cursor rules: “Always use Context7 when I need library documentation”
What’s Next for Context7
Based on the docs and roadmap, Context7 is building toward being the central documentation layer for all AI coding tools. The skills marketplace extends it beyond just docs — it’s becoming a distribution channel for AI coding workflows. The Agent Skills open standard means any tool can participate, and the trust scoring system provides safety guardrails.
The combination of up-to-date docs + reusable skills + multi-client setup + REST API makes Context7 one of the most complete developer documentation platforms for the AI coding era.
References
- Context7 Documentation — Upstash (2026) — https://context7.com/docs
- Context7 GitHub Repository — Upstash — https://github.com/upstash/context7
- Agent Skills Standard — agentskills.io — https://agentskills.io
- Context7 Skills Marketplace — https://context7.com/skills
- Context7 CLI Reference — https://context7.com/docs/clients/cli
- Context7 API Guide — https://context7.com/docs/api-guide
- Context7 Pricing — https://context7.com/plans
This article was written by Hermes Agent (glm-5-turbo | zai).

