context7
Built by Metorial, the integration platform for agentic AI.
context7
Server Summary
Search library documentation
Retrieve technical docs
Filter documentation topics
Compare library information
A powerful Model Context Protocol (MCP) server that provides seamless access to Context7's comprehensive library documentation and search capabilities. This server enables AI assistants to discover, search, and retrieve up-to-date documentation for thousands of software libraries, making it an essential tool for developers who want accurate, context-aware coding assistance. With features like topic filtering, token limiting, and trust scoring, Context7 MCP Server ensures you get exactly the documentation you need, when you need it.
The Context7 MCP Server bridges the gap between AI assistants and the vast ecosystem of software library documentation. Instead of relying on potentially outdated training data, this server provides real-time access to curated, high-quality documentation from Context7's extensive database. Whether you're working with popular frameworks like React and Next.js or exploring niche libraries, this server helps you find and retrieve the most relevant documentation instantly.
The server is designed with developer productivity in mind, offering flexible search capabilities and intelligent documentation retrieval. It understands that different tasks require different levels of detail, which is why it supports token limiting to control response size and topic filtering to focus on specific aspects of a library. The inclusion of metadata like star counts and trust scores helps you make informed decisions about which libraries to use in your projects.
Search for libraries and documentation across the Context7 platform. This tool is your starting point for discovering libraries that match your needs.
Parameters:
query
(string, required): The search term for finding libraries. Use natural language descriptions like "react hook form", "next.js ssr", or "state management redux"Returns: A list of matching libraries with comprehensive metadata including:
Use Cases:
Retrieve the full documentation for a specific library or repository. This tool gives you deep access to comprehensive library documentation with powerful filtering options.
Parameters:
library_path
(string, required): The identifier for the library, typically in the format "organization/repository" (e.g., "vercel/next.js", "react-hook-form/documentation")topic
(string, optional): Filter documentation to a specific topic area such as "ssr", "hooks", "routing", "authentication", or any other relevant subjectformat
(string, optional): Choose between "txt" for plain text format (default) or "json" for structured data that includes metadata and organized sectionstokens
(number, optional): Set a maximum token limit for the response to control the amount of documentation returned and manage context window usageReturns: Complete documentation content in your chosen format, filtered and sized according to your specifications.
Use Cases:
Access documentation for a specific library through a standardized URI pattern.
URI Pattern: context7://library/{library_path}/docs
Query Parameters:
format
: Specify "txt" or "json" output formattopic
: Filter to a specific documentation topictokens
: Limit the response token countExample URIs:
context7://library/vercel/next.js/docs?topic=ssr&tokens=5000
context7://library/facebook/react/docs?format=json
context7://library/tanstack/react-query/docs?topic=mutations
This resource template provides a RESTful way to access library documentation, making it easy to build consistent integrations and workflows.
Access search results for a specific query as a persistent resource.
URI Pattern: context7://search/{query}
Example URIs:
context7://search/react%20state%20management
context7://search/typescript%20validation
context7://search/nodejs%20authentication
This template allows you to treat search results as addressable resources, useful for caching, sharing, or building dynamic documentation workflows.
The Context7 MCP Server excels in various development scenarios:
Learning New Libraries: When starting with an unfamiliar library, use the search tool to find it, check its trust score and popularity, then retrieve targeted documentation on the specific features you need to implement.
Code Review and Troubleshooting: During code reviews or debugging sessions, quickly access official documentation to verify API usage, check for deprecated methods, or understand intended behavior without leaving your development environment.
Architecture Decisions: When evaluating multiple libraries for a project, search for alternatives, compare their metadata, and review documentation for each to make informed architectural choices.
Context-Aware Development: Provide your AI assistant with precise, current documentation so it can offer accurate suggestions, generate correct code examples, and answer questions based on official sources rather than potentially outdated information.
Documentation Aggregation: Build custom documentation workflows by combining multiple library docs, filtering by relevant topics, and controlling output size to create focused reference materials for your team.
The Context7 MCP Server transforms how AI assistants interact with technical documentation. Instead of hallucinating API details or relying on training data that may be months or years old, your assistant can retrieve current, authoritative information directly from Context7's curated database. The trust scoring system helps you avoid low-quality or abandoned libraries, while token limiting ensures you stay within context window constraints. Topic filtering means you get exactly the information you need without wading through irrelevant sections. Whether you're a solo developer exploring new technologies or part of a team standardizing on specific libraries, this server provides the documentation access layer that makes AI-assisted development truly reliable and productive.