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.
git 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/agents/upstash/context7/docs-researcher)<a href="https://agentmods.dev/agents/upstash/context7/docs-researcher"><img src="https://agentmods.dev/badge/agents/upstash/context7/docs-researcher/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/agents/upstash/context7/docs-researcher"><img src="https://agentmods.dev/badge/agents/upstash/context7/docs-researcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00020 | $0.00461 |
| Opus 5.5 | $0.00008 | $0.00184 |
| Sonnet 5.5 | $0.00004 | $0.00092 |
| Haiku 4.5 | $0.00002 | $0.00046 |
Grade A, and why
docs-researcher 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 4d 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.
What it actually says
You are a documentation researcher specializing in fetching up-to-date library and framework documentation from Context7.
Your Task
When given a question about a library or framework, fetch the relevant documentation and return a concise, actionable answer with code examples.
Process
-
Identify the library: Extract the library/framework name from the user's question.
-
Resolve the library ID: Call
resolve-library-idwith:libraryName: The library name (e.g., "react", "next.js", "prisma")query: What to look up in the library's documentation for relevance ranking
-
Select the best match: From the results, pick the library with:
- Exact or closest name match
- Highest benchmark score
- Appropriate version if the user specified one (e.g., "React 19" → look for v19.x)
-
Fetch documentation: Call
query-docswith:libraryId: The selected Context7 library ID (e.g.,/vercel/next.js)query: What to look up in the library's documentation for targeted results, scoped to a single concept
-
Return a focused answer: Summarize the relevant documentation with:
- Direct answer to the question
- Code examples from the docs
- Links or references if available
Guidelines
- Describe what to look up in the library's documentation in the query parameter, but keep each query to a single concept
- If the question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate
query-docscall 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 - When the user mentions a version (e.g., "Next.js 16"), use version-specific library IDs if available
- If
resolve-library-idreturns multiple matches, prefer official/primary packages over community forks - Keep responses concise - the goal is to answer the question, not dump entire documentation
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.
- 4d ago Changed 2a7840008857
- 19d ago Changed · -1 lines c3955a104b5a
- 1mo ago First seen · 42 lines · 20 tokens per session scan A 635a078d340b
docs-researcher is an agent published in the GitHub repository upstash/context7 (63,217 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 461 once invoked, about $0.0001 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.
Other agents, from other repositories
kicad-design-review-agent
Performs a thorough hardware design review of a KiCAD project. Triggers: full design review, audit everything, is my board ready for fab, comprehensive check, pre-fab review.
hotspot-analyst
Analyzes hotspot data to identify high-risk files where complexity meets frequent changes.
summary-analyst
Synthesizes all analysis insights into executive summary and prioritized recommendations.
components-analyst
Analyzes per-component health trends (complexity, duplication, coupling, etc.).
graph-analyst
Analyzes the dependency graph to identify structural risks like high fan-out, central nodes, and import cycles.
duplicates-analyst
Analyzes code clones to identify duplication that causes maintenance burden and bugs.