STDIO Context7 MCP Server
Provides tools for resolving library names to Context7-compatible IDs and fetching up-to-date library documentation and code examples via the Context7 API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@STDIO Context7 MCP Server fetch the latest React hooks docs and code examples"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
STDIO Context7 MCP Server
Alternative Context7 MCP implementation built to work with Claude Code via Docker MCP Toolkit
An alternative implementation of the Context7 MCP server, designed to work seamlessly with Claude Code via Docker MCP Toolkit. This version provides up-to-date library documentation and code examples through STDIO transport, addressing connectivity issues with the original Context7 server in Docker MCP environments.
π― Purpose
This is an alternative MCP server to the original Context7, specifically created to solve connectivity issues with Docker MCP Toolkit. Built with the specific goals of:
Docker MCP Toolkit Compatible: Works reliably with Claude Code via Docker Desktop's MCP infrastructure (where the original doesn't)
Claude Code Optimized: First-class support for Claude Code IDE workflows
Enhanced STDIO Transport: Direct, efficient communication via standard input/output
Production-Ready Security: Enterprise-grade Docker image with SBOMs, provenance, and signing support
Universal Compatibility: Works with all MCP-compatible AI assistants (Claude, Cursor, Windsurf, etc.)
Related MCP server: Context7 MCP Clone
β¨ Features
π³ Docker MCP Toolkit Native: Built for Docker Desktop MCP integration
π€ Claude Code First: Optimized for Claude Code IDE workflows
π Library Resolution: Resolve library names to Context7-compatible IDs
π Documentation Retrieval: Fetch up-to-date documentation and code examples
π― Topic Filtering: Focus on specific topics within libraries
β‘ STDIO Transport: Fast, local integration with MCP clients
π³ Production Docker: Multi-arch with SBOMs, provenance, and security hardening
π Enterprise Security: Non-root user, minimal attack surface, Alpine Linux base
π Multi-Architecture: Supports amd64 and arm64 platforms (Intel, AMD, Apple Silicon)
π Universal Compatibility: Works with Cursor, Windsurf, and other MCP clients
Installation
Prerequisites
Node.js >= 20.8.1
npm >= 10.0.0
Docker (optional, for containerized deployment)
npm Installation
npm install -g @dolasoft/stdio-context7-mcp-serverDocker Installation
# Pull the official image
docker pull dolasoft/stdio-context7-mcp:latestUsage
CLI Arguments
--api-key <key>: Context7 API key for authentication (optional, get one at context7.com/dashboard for higher rate limits)
MCP Client Configuration
π³ Docker MCP Toolkit (Recommended)
This server is built for Docker MCP Toolkit and integrates seamlessly with Claude Code. Using Docker provides the most reliable and secure deployment option.
For Docker Desktop MCP:
{
"mcpServers": {
"stdio-context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--stop-timeout",
"10",
"dolasoft/stdio-context7-mcp:latest"
]
}
}
}π€ Claude Code
This server is optimized for Claude Code via Docker MCP Toolkit. Add to your MCP configuration:
{
"mcpServers": {
"stdio-context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--stop-timeout",
"10",
"dolasoft/stdio-context7-mcp:latest"
]
}
}
}With API Key (for higher rate limits):
{
"mcpServers": {
"stdio-context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--stop-timeout",
"10",
"dolasoft/stdio-context7-mcp:latest",
"--api-key",
"YOUR_CONTEXT7_API_KEY"
]
}
}
}Get your free API key at context7.com/dashboard
Pro tip: Add this to your CLAUDE.md for automatic Context7 usage:
## Context7 Integration
Use the stdio-context7 MCP server for library documentation and code examples.
Always use `resolve-library-id` first, then `get-library-docs`.Other MCP Clients
For Claude Desktop, Cursor, Windsurf, or any MCP-compatible client:
{
"mcpServers": {
"stdio-context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--stop-timeout",
"10",
"dolasoft/stdio-context7-mcp:latest"
]
}
}
}With API Key:
{
"mcpServers": {
"stdio-context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--stop-timeout",
"10",
"dolasoft/stdio-context7-mcp:latest",
"--api-key",
"YOUR_CONTEXT7_API_KEY"
]
}
}
}Available Tools
1. resolve-library-id
Resolves a general library name into a Context7-compatible library ID.
Parameters:
libraryName(required): The name of the library to search for
Example:
{
"libraryName": "react"
}Response:
Found library: React
Library ID: /facebook/react
Description: A JavaScript library for building user interfaces2. get-library-docs
Fetches documentation for a library using a Context7-compatible library ID.
Parameters:
context7CompatibleLibraryID(required): Exact library ID (e.g.,/mongodb/docs)topic(optional): Focus docs on a specific topic (e.g., "routing", "hooks")tokens(optional): Max tokens to return (default: 5000, minimum: 1000)
Example:
{
"context7CompatibleLibraryID": "/facebook/react",
"topic": "hooks",
"tokens": 3000
}Response:
# React Documentation
A JavaScript library for building user interfaces
## Topic: hooks
This section focuses on hooks in React.
## Getting Started
Here you would find comprehensive documentation and examples for React.Using with AI Assistants
In Cursor or Claude Desktop
Simply mention the library in your prompt and ask the AI to use context7:
Create a Next.js middleware that checks for a valid JWT. use context7Or reference a specific library ID:
Implement authentication with Supabase. use library /supabase/supabaseSupported Libraries
This server uses the real Context7 API and supports all libraries available in the Context7 ecosystem. Simply use the resolve-library-id tool to find any library, including:
React (
/facebook/react) - UI libraryNext.js (
/vercel/next.js) - React frameworkExpress (
/expressjs/express) - Node.js web frameworkMongoDB (
/mongodb/docs) - Database documentationSupabase (
/supabase/supabase) - Backend platformAnd thousands more...
The server fetches up-to-date documentation directly from Context7's live API.
Security
The Docker image is built with enterprise-grade security:
Non-root user (UID 1001)
Multi-architecture: amd64, arm64
SBOMs & Provenance: Full supply chain transparency
Alpine Linux: Minimal attack surface
Regular updates: Automated security patches
Troubleshooting
Server not responding?
Verify Docker is running:
docker psCheck MCP client logs for connection errors
Ensure correct image:
docker pull dolasoft/stdio-context7-mcp:latest
Library not found?
Always use
resolve-library-idfirst to find the correct library IDEnsure library ID format is correct (e.g.,
/org/repo)
License
MIT License - see LICENSE file for details
Acknowledgments
Powered by Context7 API by Upstash
Built with Model Context Protocol
Built for the MCP community and Docker MCP Toolkit
Available Tools
2 toolsget-library-docsB
Fetches documentation for a library using a Context7-compatible library ID.
Inputs: context7CompatibleLibraryID (required), topic, tokens.
resolve-library-idB
Resolves a general library name into a Context7-compatible library ID.
Inputs: libraryName (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
The two tools form a clear two-step pipeline: one converts a library name to an ID, the other consumes that ID to return docs. There is no overlap in inputs or purpose, so an agent cannot mistake one for the other.
Both names are kebab-case verb_noun constructions (resolve-library-id, get-library-docs) with a consistent 'verb-library(s)-object' shape. The pattern is predictable and readable.
Two tools is the minimal correct surface for a documentation lookup service, and each is essential to the workflow. It is on the thin side, but nothing here is redundant or missing for the stated purpose.
The resolve-then-fetch lifecycle fully supports the core use case of retrieving library docs. Minor gaps exist β no topic/keyword search within docs, no version enumeration, and no reverse lookup from ID to library name β but agents can work around them.
Maintenance
Related MCP Connectors
Find open-source libraries and fetch contextual code snippets by version to accelerate developmentβ¦
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singlβ¦
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation forβ¦
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides access to the Context7 API for searching up-to-date documentation, code examples, API references, and troubleshooting help across thousands of programming libraries and frameworks. Enables developers and AI agents to quickly find accurate documentation, compare libraries, get migration guides, and resolve coding issues.-
- AlicenseNot gradedqualityDmaintenanceProvides up-to-date, version-specific documentation and code examples for software libraries directly to LLMs, enabling resolution of library identifiers and retrieval of relevant documentation with code snippets.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceProvides real-time access to code library documentation and examples through Context7 API integration, enabling AI assistants to retrieve up-to-date technical documentation, code snippets, and best practices for various programming libraries.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides up-to-date library documentation by resolving library names and fetching docs via the Context7 API.MIT