context7
Built by Metorial, the integration platform for agentic AI.
context7
Server Summary
Search library documentation
Retrieve filtered documentation
Access codebase context
Generate technical documentation
A Model Context Protocol (MCP) server that provides seamless access to Context7's comprehensive library documentation database. Search across thousands of libraries, retrieve focused documentation, and integrate up-to-date reference materials directly into your AI-assisted development workflow. Perfect for developers who want instant access to reliable, curated technical documentation without leaving their development environment.
The Context7 MCP server bridges the gap between your development tools and Context7's extensive documentation repository. Instead of manually searching for library documentation or copying code examples from multiple sources, this server enables your AI assistant to fetch exactly the documentation you need, when you need it. Whether you're exploring new libraries, debugging implementation details, or seeking best practices, Context7 provides filtered, relevant documentation that helps you write better code faster.
Context7 maintains a curated collection of documentation for popular libraries and frameworks, complete with trust scores, usage statistics, and token-aware content delivery. The server intelligently handles documentation retrieval, supports topic-based filtering, and respects token limits to ensure you get precisely the information you need without overwhelming your context window.
Search for libraries and documentation across the Context7 platform. This tool helps you discover relevant libraries based on your search terms and provides essential metadata to help you evaluate options.
Parameters:
query (required, string): Your search term for finding libraries. Examples include "react hook form", "next.js ssr", "vue router", or any library name or technology you're looking for.Returns: A list of matching libraries with comprehensive metadata including repository stars, community trust scores, total token counts, and direct paths for documentation retrieval.
Use Cases:
Retrieve detailed documentation for a specific library or repository from Context7. This powerful tool supports advanced filtering to help you extract exactly the documentation segments you need.
Parameters:
library_path (required, string): The library identifier path, typically in the format "organization/repository" (e.g., "vercel/next.js", "react-hook-form/documentation", "vuejs/vue-router")topic (optional, string): Filter documentation by specific topic areas such as "ssr", "hooks", "routing", "authentication", "api", or any other documentation sectionformat (optional, string): Choose response format - "txt" for plain text (default) or "json" for structured data with additional metadatatokens (optional, number): Set a maximum token limit for the response to manage context window usage efficientlyReturns: Complete or filtered documentation content in your chosen format, ready to be integrated into your development context.
Use Cases:
Direct access to library documentation through a URI-based resource template. This template provides a standardized way to reference documentation resources.
URI Template: context7://library/{library_path}/docs
Query Parameters:
format: Output format (txt or json)topic: Topic filter for focused documentationtokens: Maximum token count for the responseExample URIs:
context7://library/vercel/next.js/docscontext7://library/react-hook-form/documentation/docs?topic=validationcontext7://library/tanstack/react-query/docs?format=json&tokens=5000Access library search results as a resource, enabling persistent references to search queries.
URI Template: context7://search/{query}
Example URIs:
context7://search/typescript validation librariescontext7://search/react state managementcontext7://search/nextjs authenticationExploring New Libraries: Start with search_libraries to discover options, review trust scores and popularity metrics, then use get_documentation to dive deep into the most promising candidates.
Focused Learning: When you need to understand a specific feature, use get_documentation with topic filtering to retrieve only the relevant sections, keeping your context clean and focused.
Implementation Reference: Retrieve documentation for libraries you're actively using, with token limits set appropriately to leave room for your code and other context.
Comparison Research: Search for multiple libraries solving similar problems, fetch their documentation, and compare approaches, APIs, and implementation patterns side by side.
The Context7 MCP server transforms how you access documentation during development. Rather than context-switching to browsers, parsing through lengthy docs sites, or maintaining local documentation copies, you get instant, filtered access to curated content. The trust scoring helps you make informed decisions about library adoption, while token-aware delivery ensures you never overwhelm your AI assistant's context window with unnecessary information.
By integrating documentation retrieval directly into your AI-assisted workflow, you maintain focus, reduce friction, and spend more time writing code and less time hunting for information. The combination of search, filtered retrieval, and flexible formatting makes Context7 an essential tool for modern development workflows.