Context7 is a documentation service that puts current, version-specific library documentation and code examples into prompts for large language models and AI coding editors. Developers use it to help coding agents produce answers based on the libraries they actually use; the catalogue entries provide ways for agents to access Context7 through its CLI or MCP server.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add upstash/context7 --skill context7-mcpgit clone --depth 1 https://github.com/upstash/context7Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/upstash/context7/context7-mcp)<a href="https://agentmods.dev/skills/upstash/context7/context7-mcp"><img src="https://agentmods.dev/badge/skills/upstash/context7/context7-mcp/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/upstash/context7/context7-mcp"><img src="https://agentmods.dev/badge/skills/upstash/context7/context7-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.00576 |
| Opus 5.5 | $0.00023 | $0.00230 |
| Sonnet 5.5 | $0.00012 | $0.00115 |
| Haiku 4.5 | $0.00006 | $0.00058 |
Grade A, and why
context7-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
3 near-identical copies found in the catalogue:
- context7-mcp — 88% identical, 10 lines differ
- context7-mcp — 88% identical, 10 lines differ
- context7-mcp — 88% identical, 13 lines differ
How it starts
The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 questionquery: 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"), 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: What to look up in the library's documentation, scoped to a single concept
If the user's question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate query-docs call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic.
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: Describe what to look up in the library's documentation, but keep each query to a single concept
- One topic per query: Split multi-topic questions into separate
query-docscalls — resolve the library ID once, then query per concept, unless the question is about how the concepts interact - Version awareness: When users mention versions ("Next.js 16", "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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 22d ago Changed 112e7c0e1484
- 25d ago Changed · +12 lines 1d42d8962589
- 1mo ago Changed d1ea3447e915
- 3mo ago First seen · 57 lines · 58 tokens per session scan A 29ef59d34287
context7-mcp is a skill published in the GitHub repository upstash/context7 (65,890 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 576 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
context7-mcp compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| context7-mcpupstash/context7 | Skill | 66k | today | MIT | A | 58 | Claude Code, Codex |
| background-watch-hookavibe-bot/avibe | Skill | 659 | today | MIT | A | 32 | Claude Code, Codex |
| gentech-blockrunBlockRunAI/blockrun-mcp | Skill | 393 | today | MIT | A | 46 | Claude Code, Codex |
| portainer-mcp-hygieneportainer/portainer-mcp | Skill | 242 | 1mo ago | MIT | A | 315 | Claude Code, Codex |
| setupqdrant/mcp-server-qdrant | Skill | 1.6k | yesterday | Apache-2.0 | C | 45 | Claude Code, Codex |
| disease-analysisdbcls/togomcp | Skill | 23 | 2d ago | MIT | A | 149 | Claude Code, Codex |
| audit-architecturepanbanda/omen | Skill | 25 | 2d ago | Apache-2.0 | A | 33 | Claude Code |