Context7 MCP Server

Widget generated by MCP Showcase

Introduction

This MCP server provides access to Context7, a comprehensive documentation service by Upstash that maintains up-to-date documentation for popular libraries and frameworks. The server enables AI assistants to retrieve current documentation and code examples for any supported library, making it ideal for integration with LLMs and AI code editors like Cursor and Claude.

The server offers two complementary tools that work together to deliver accurate, current documentation. The first tool resolves library names to standardized identifiers, while the second fetches the actual documentation content with configurable scope and detail levels.

This service is particularly valuable for developers and AI assistants who need reliable, current documentation rather than potentially outdated training data, ensuring code examples and API references reflect the latest versions of libraries.

Use Cases

Library Documentation Retrieval

Get comprehensive documentation for specific libraries or frameworks to understand their APIs, features, and implementation patterns.

Sample prompt: I need the complete documentation for React Router including routing setup, navigation hooks, and error boundaries

Focused Topic Documentation

Retrieve documentation focused on specific topics within a library, such as hooks, authentication, or deployment strategies.

Sample prompt: Show me all the authentication-related documentation for Supabase, including code examples for login, signup, and session management

Library Comparison Research

Research and compare multiple libraries by retrieving their documentation to understand feature sets, implementation approaches, and use cases.

Sample prompt: I need documentation for both Prisma and Drizzle ORM to compare their query builders, schema definitions, and TypeScript integration

Code Implementation Guidance

Access current API references and code examples when implementing specific features or integrating libraries into projects.

Sample prompt: Get me the latest Next.js App Router documentation focusing on server components, data fetching, and route handlers with TypeScript examples

Framework Migration Support

Retrieve documentation for both source and target frameworks to facilitate migration projects and understand API differences.

Sample prompt: I need documentation for Vue 2 and Vue 3 composition API to help migrate my application, focusing on lifecycle hooks and state management

Development Environment Setup

Access setup and configuration documentation for libraries, including installation, configuration, and integration guidelines.

Sample prompt: Show me the complete setup documentation for Tailwind CSS including configuration options, plugin integration, and build optimization

Details

MCP Server URL:
https://mcp.context7.com/mcp
Type:
HTTP Stream
Authentication:
None

Tools

resolve-library-id
Resolves a package/product name to a Context7-compatible library ID and returns a list of matching libraries. You MUST call this function before 'get-library-docs' 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. 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) - Trust score (consider libraries with scores of 7-10 more authoritative) 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.
get-library-docs
Fetches up-to-date documentation for a library. You must call 'resolve-library-id' 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.

Explore other MCP servers in our directory