MCP server
Context7 MCP server
Upstash's Context7 MCP server gives coding assistants current, version-specific documentation for thousands of libraries.
- Official server
- Developer tools
At a glance
- Maintained by
- Upstash
- Tools exposed
- 2 listed below
- Reviewed
- September 24, 2026
Why it matters
What it does and why it matters
Coding assistants learn from code that may be months or years old. When a library changes its API, they keep suggesting the old way. Context7 solves that by fetching current, version-specific documentation and examples for the library in question and handing them to the assistant.
It has two tools: one finds the right library, and one queries its documentation. The result is code that matches the version you actually use.
It is maintained by Upstash and reads only public library documentation, so the risk is low. The documentation tool was renamed from its earlier name to query-docs, so older guides may show a different name. An API key raises rate limits.
We use documentation servers like this in our own AI-accelerated development, because they cut the time spent fixing outdated suggestions.
Use cases
Best business use cases
Current APIs
Upgrades
Quick answers
Onboarding
Fixing deprecated code
Tools
Available tools
Tool names as published by the maintainer at review time. Versions change, so check the repository for the current list.
Read and write: Read only: fetches public library documentation.
-
resolve-library-idTurn a library name into a Context7 library ID.
-
query-docsGet current documentation for a library by its Context7 ID.
Workflows
Example workflows
Use a new library correctly
-
1
Ask how to use a feature in a library.
-
2
The assistant resolves the library ID.
-
3
It queries the current docs.
-
4
It writes code based on them.
-
5
A developer tests and reviews.
Prepare an upgrade
-
1
Name the library and target version.
-
2
The assistant reads the docs for that version.
-
3
It lists breaking changes that affect your code.
-
4
It drafts the changes.
-
5
The team tests the upgrade.
Prompts
Example prompts
“Using the current Next.js docs, show how to add a server action to this form.”
“What changed in this library between version 4 and 5?”
“Rewrite this code to avoid deprecated calls, based on the current docs.”
Setup
Installation and configuration
Examples for Claude Desktop and Claude Code. Replace the placeholder values with your own keys, and store secrets outside version control.
Claude Desktop: claude_desktop_config.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"YOUR_API_KEY"
]
}
}
}
Claude Code: terminal
claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
- Hosted server: streamable-http; https://mcp.context7.com/mcp; Header Authorization: Bearer YOUR_API_KEY (recommended for higher rate limits).
- Local server: stdio; @upstash/context7-mcp.
- Needs: Context7 API key (optional, recommended; free at context7.com/dashboard).
Security
Security considerations
-
Public docs only
It reads public documentation, so data risk is low.
-
API key
Keep the optional key out of shared files.
-
Review code
Review generated code as usual.
-
Untrusted content
Docs are external content. Do not let them trigger actions.
Related servers
Servers that pair well with it
GitHub
GitHub's official MCP server lets AI read repositories, search code, manage issues and pull requests and, when allowed, change files.
Fetch
The MCP project's reference Fetch server lets AI download a web page and read it as clean text or markdown.
Sequential Thinking
The MCP project's Sequential Thinking reference server gives AI a structured way to break a problem into steps and revise them.
Keep exploring
Solutions and services that use it
Related services
View all related services- MCP integration Connect AI assistants to your CRM, files, databases and tools through Model Context Protocol servers, with safe permissions.
- AI copilots AI helpers built into your product or internal tools that draft, summarize and suggest while people decide.
- RAG knowledge assistants Assistants that answer questions from your own documents and show where each answer came from.
- AI Product Development AI agents, knowledge assistants, copilots and document automation built into the way your team already works.
- MVP development A first version with just enough features to put in front of real users and learn what to build next.
- Legacy modernization Replace an aging system step by step, with the business running normally while the new parts take over.
Solutions
View all solutions- Internal help desk assistant An assistant in Slack or Teams that answers policy and how-to questions from your handbooks and opens tickets when needed.
- Approval workflows Requests, approvals and reminders in one place, with clear owners and deadlines instead of long email threads.
- AI sales research agent Short, sourced briefings on each prospect before a call, drafted by an AI agent from public information and your CRM.
- Automated quoting Draft accurate quotes and proposals from a request, your price rules and past work, for a person to approve.
- Knowledge assistant (RAG) Ask a question in plain words and get an answer from your own documents, with links to the sources.
- Compliance tracking Track filing deadlines, licenses and obligations in one place, with reminders and AI summaries of relevant rule changes.
Industries
View all industries- Professional services Client portals, proposal drafting, knowledge assistants and internal tools for consultancies, agencies and firms.
- Healthcare Patient booking, intake forms, internal knowledge assistants and admin automation for clinics and care providers.
- Legal Contract review assistants, knowledge search, intake and document automation for law firms and in-house legal teams.
Guides and articles
View all guides and articles- Where AI helps in development, and where it does not An honest map of the development tasks AI speeds up and the ones that still need experienced people.
- What is AI-accelerated development? How software teams use AI to plan, code, test and document faster, and where people still make every decision.
- What is RAG and when do you need it? How retrieval-augmented generation lets AI answer from your documents, when it fits and how to build it well.
- How to build an AI workflow with MCP servers Plan, connect and test an AI workflow that uses MCP servers, from a single task to a reliable process.
- RAG vs fine-tuning Two ways to make AI work with your knowledge, compared by cost, accuracy and upkeep.
AI models
View all ai models- Mistral Medium 3.5 A newer open-weight Mistral model for agent and coding work, with image input, tool calling, structured outputs and a 256K window.
- Codestral 25.08 Mistral's low-latency coding model for code completion and generation, with fill-in-the-middle support, tool calling and a 128K window.
- Qwen3-Coder Qwen's open-weight coding models under Apache 2.0, from the efficient Qwen3-Coder-Next to the large 480B model, with tool use and long context.
- Coding Models that write, review and explain code, and power coding assistants and developer tools.
- Gemini Embedding 2 Google's current embedding model, multimodal: it embeds text, images, video, audio and PDFs for search and retrieval.
- GPT-6 Sol The middle model of the GPT-6 family, positioned for complex coding and agentic workflows at a mid price level.
Glossary terms
View all glossary terms- AI copilot An AI copilot is an assistant built into a tool people already use, which suggests, drafts and explains while the person stays in control.
- RAG RAG, or retrieval-augmented generation, is a method where an AI system first finds relevant passages in your documents, then answers using only those passages.
- Claude Code Claude Code is Anthropic's agentic coding tool, which works in a developer's terminal, IDE, desktop app or browser to read code, run commands and make changes.
- Chatbot A chatbot is software that holds a conversation with people through text or voice, answering questions or completing simple tasks.
- Embeddings Embeddings are lists of numbers that represent the meaning of text or images, so software can find items that are similar in meaning.
- Semantic search Semantic search finds results by meaning rather than exact words, so a search for "reset my login" can find an article titled "Forgot your password".
FAQ
Questions people ask us
Have a question that is not here? Ask us directly.
Upstash.
Two: one to resolve a library ID and one to query its documentation.
It works without one. A key gives higher limits.