Context7 MCP Server

Context7 MCP Server

Provides up-to-date library documentation by resolving library names and fetching docs via the Context7 API.

Category
Visit Server

README

Context7 MCP Server (Python)

A Python MCP server for the Context7 API, providing up-to-date library documentation. Built with the Dedalus MCP framework.

Features

  • resolve_library_id - Resolve a library name to its Context7 ID
  • get_library_docs - Fetch documentation for a specific library

Installation

# Clone the repository
git clone https://github.com/dedalus-labs/context7-mcp-python.git
cd context7-mcp-python

# Install dependencies with uv
uv sync

Configuration

Create a .env file with your Context7 API key:

CONTEXT7_API_KEY=your_api_key_here

Get your API key from Context7.

Usage

Running the Server

uv run python src/main.py

The server will start on http://localhost:3012/mcp.

Testing with the Client

uv run python src/client.py

Tools

resolve_library_id

Resolve a general library name to a Context7-compatible library ID.

Parameters:

  • library_name (required): Library name to search for (e.g., "react", "nextjs", "postgres")

Returns: Matching libraries with their Context7 IDs

get_library_docs

Fetch up-to-date documentation for a library from Context7.

Parameters:

  • library_id (required): Exact Context7 library ID (e.g., "/mongodb/docs", "/vercel/next.js")
  • topic (optional): Focus on a specific topic within the library
  • tokens (optional): Max tokens of documentation (default: 10000)

Returns: Library documentation content

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured