Context7 MCP server
Context7 pulls up-to-date, version-specific library documentation and code examples into an AI coding assistant's context. It resolves a library name to a Context7 library ID, then fetches the documentation for that ID.
Endpoint and access
No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.
https://mcp.context7.com/mcpWhat its tools do
2 tools, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.
Read-only (2)
Checks and signals
Each line is separate evidence, not a trust score.
- Passed Endpoint answered the live check ·
- Passed Endpoint and vendor documentation share a domain
- Uptime 100% over 90 days
- Availability 2 of 2 checks passed in 30 days
- Popularity 64,081 GitHub stars
About Context7
The Context7 server enables AI coding assistants to retrieve up-to-date, version-specific library documentation and code examples. It resolves a library name to a Context7 library ID and then fetches the corresponding documentation for that ID.
This server suits tasks where developers need current reference material while writing code. It supports fetching documentation by naming the version, skipping library matching by passing a Context7 library ID directly, and retrieving version-specific details.
Connection to the server requires no sign-in. However, individual tools may still need a vendor account, credentials, or permissions. Users must create an API key in the Context7 dashboard and pass it via the Authorization: Bearer header.
What you can do with it
- Fetch current documentation for a library while writing code against it.
- Retrieve version-specific documentation by naming the version.
- Skip library matching by passing a Context7 library ID directly.
Source and maintenance
- Last repository push
- Latest release
- @upstash/context7-sdk@0.6.0
- Maintenance checked
Protocol and capabilities
- Server
- Context7 4.7.3
- MCP protocol negotiated in check
- 2025-11-25
- Tools
- 2 advertised
- Resources
- 0 advertised
- Resource templates
- 0 advertised
- Prompts
- 0 advertised
{
"tools": {
"listChanged": false
},
"prompts": {
"listChanged": false
},
"resources": {
"subscribe": false,
"listChanged": false
}
}Server-provided instructions
Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.
Tools
2 advertised
resolve-library-id — Resolve Context7 Library ID
Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Each result includes: - Library ID: Context7-compatible identifier (format: /org/project) - Name: Library or package name - Description: Short summary - Code Snippets: Number of available code examples - Source Reputation: Authority indicator (High, Medium, Low, or Unknown) - Benchmark Score: Quality indicator (100 is the highest score) - Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version. For best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact matches prioritized) - Description relevance to the query's intent - Documentation coverage (prioritize libraries with higher Code Snippet counts) - Source reputation (consider libraries with High or Medium reputation more authoritative) - Benchmark Score: Quality indicator (100 is the highest score) Response Format: - Return the selected library ID in a clearly marked section - Provide a brief explanation for why this library was chosen - If multiple good matches exist, acknowledge this but proceed with the most relevant one - If no good matches exist, clearly state this and suggest query refinements For ambiguous queries, request clarification before proceeding with a best-guess match. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query",
"libraryName"
],
"properties": {
"query": {
"type": "string",
"description": "What to look up in the library's documentation. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."
},
"libraryName": {
"type": "string",
"description": "Library name to search for and retrieve a Context7-compatible library ID. Use the official library name with proper punctuation — e.g., 'Next.js' instead of 'nextjs', 'Customer.io' instead of 'customerio', 'Three.js' instead of 'threejs'."
}
}
}{
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}query-docs — Query Documentation
Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Do not call this tool more than 3 times per question. If you know the programming language the user is working in, pass it as `language` so the results match their setup.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"libraryId",
"query"
],
"properties": {
"query": {
"type": "string",
"description": "What to look up in the library's documentation, scoped to a single concept. Be specific and include relevant details, but keep each query to one topic — if the user's question spans multiple distinct concepts, make a separate call per concept instead of combining them, unless the question is about how the concepts interact. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad (too vague): 'auth' or 'hooks'. Bad (too broad): 'routing and auth and caching in Next.js'. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."
},
"language": {
"type": "string",
"description": "Programming language the user is writing code in, such as 'Python', 'TypeScript', 'Go', or 'C#'. Ranks code examples in that language first. Leave it out when the language is unknown or does not apply."
},
"libraryId": {
"type": "string",
"description": "Exact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v16.2.9') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'."
}
}
}{
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}Prompts
0 advertised
Resources
0 advertised
90-day uptime
A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.
- 2026-11-02: 3 of 3 checks answered
- 2026-11-03: 4 of 4 checks answered
- 2026-11-04: 4 of 4 checks answered
- 2026-11-05: 4 of 4 checks answered
- 2026-11-06: 4 of 4 checks answered
- 2026-11-07: 2 of 2 checks answered
- 2026-11-09: 1 of 1 checks answered
- 2026-11-10: 2 of 2 checks answered
- 2026-11-11: 1 of 1 checks answered
- 2026-11-12: 1 of 1 checks answered
- 2026-11-14: 1 of 1 checks answered
- 2026-11-15: 2 of 2 checks answered
- 2026-11-16: 4 of 4 checks answered
- 2026-11-17: 5 of 5 checks answered
- 2026-11-18: 5 of 5 checks answered
- 2026-11-19: 4 of 4 checks answered
- 2026-11-20: 3 of 3 checks answered
- 2026-11-21: 4 of 4 checks answered
- 2026-11-22: 4 of 4 checks answered
- 2026-11-23: 3 of 3 checks answered
- 2026-11-24: 4 of 4 checks answered
- 2026-11-25: 4 of 4 checks answered
- 2026-11-26: 4 of 4 checks answered
- 2026-11-27: 2 of 2 checks answered
30-day availability
Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.
- Successful checks
- 2 of 2 (100%)
- Average latency
- 911 ms
- 95th percentile latency
- 996 ms
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · probe · passed · 816 ms · metadata changed · 2 tool(s), 0 resource(s), 0 resource template(s), 0 prompt(s)
- · probe · passed · 1005 ms · metadata changed · 2 tool(s), 0 resource(s), 0 resource template(s), 0 prompt(s)
- · repository · passed · metadata changed · updated
- · repository · passed · metadata changed · updated
- · repository · passed · metadata changed · updated
- · registry · passed · metadata changed · Source metadata updated
- · registry · passed · metadata changed · Source metadata updated
- · registry · passed · metadata changed · Source metadata updated
- · registry · passed · metadata changed · Source metadata updated
- · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown
Try asking
Reviewed prompts from cited playbooks. Connect the listed servers before using them.
Get the documentation for the React library regarding how to use the useState hook. Return the code examples.Please find the documentation for setting up middleware in Next.js using the Context7 MCP server. First resolve the library ID, then query the docs.Use Context7 to show me how to configure caching in Next.js 16.Agent playbooks using this server
Connect from your client
Each snippet registers the same endpoint; pick the client you use.
Claude Code
claude mcp add --transport http context7 https://mcp.context7.com/mcpCodex
codex mcp add context7 --url https://mcp.context7.com/mcpCursor
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}Cline
{
"mcpServers": {
"context7": {
"type": "streamableHttp",
"url": "https://mcp.context7.com/mcp",
"disabled": false
}
}
}VS Code
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}Gemini CLI
gemini mcp add --transport http context7 https://mcp.context7.com/mcpClaude Desktop
https://mcp.context7.com/mcpWindsurf
{
"mcpServers": {
"context7": {
"serverUrl": "https://mcp.context7.com/mcp"
}
}
}Let your agent find its tools
Find servers like Context7 from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.
Other documentation and reference servers
Frequently asked questions
- Can I use Context7 without an API key?
- No. While connecting to the server requires no sign-in, individual tools require an API key. You must create an API key in the Context7 dashboard and pass it via the Authorization: Bearer header.
- Does the server support version-specific documentation?
- Yes. The server supports retrieving version-specific documentation by naming the version. It also allows skipping library matching by passing a Context7 library ID directly to the `resolve-library-id` tool.
- What tools are available in the Context7 server?
- The server provides two tools: `query-docs` and `resolve-library-id`. These tools allow fetching documentation and resolving library names to IDs, respectively.
Do you run Context7?
Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.