An MCP server that provides programmatic access to UV documentation through a standardized API. This server now leverages a modern, hierarchical resource structure that exposes both high‐level documentation sections and detailed command documentation (including subsections) as individual MCP resources. Tools have been streamlined, and many documentation queries are handled via the resource layer.
Requirements:
Ensure Python 3.13+ is installed (minimum 3.10 for MCP SDK compatibility).
Clone the Repository:
git clone https://github.com/StevenBtw/uv-docs-mcp.git
cd uv-docs-mcp
Set Up Virtual Environment and Install Dependencies:
python3.13 -m venv env
source env/bin/activate # On Windows use: env\\Scripts\\activate
pip install -e .
Run the Server:
uv run uv-docs
(If using Claude Desktop or other MCP clients, adjust configuration accordingly.)
The server is built with a modular and hierarchical design that clearly separates concerns:
flowchart TD
Client[MCP Client] --> Server[Server Layer]
Server --> Resources[Resource Layer]
Server --> Tools[Tools Layer]
Server --> Prompts[Prompts Layer]
Resources --> Cache[Cache System]
Tools --> Cache
Resource Layer:
Exposes UV documentation via URIs with the scheme uv-docs://
. Resources are structured hierarchically:
uv-docs://cli
, uv-docs://settings
, uv-docs://resolver
)uv-docs://cli/uv-run
, uv-docs://cli/uv-cache
)uv-docs://cli/uv-cache/uv-cache-dir
)Tools Layer:
Provides operational commands to interact with the cache and perform real-time searches.
Prompts Layer:
Supplies prompt templates for AI assistants to generate documentation summaries (e.g., the summarize-docs
prompt).
Resources are accessed using the uv-docs://
URI scheme and provide the full hierarchy of documentation. For example:
Base Section:
uv-docs://cli
returns the list of all CLI commands.
Command Level:
uv-docs://cli/uv-cache
returns metadata about the uv cache
command, including available documentation sections.
Subsection Level:
uv-docs://cli/uv-cache/uv-cache-dir
returns the detailed documentation content for the “uv cache dir” section.
Each resource returns JSON data with detailed metadata and, when requested, the full documentation content. This fine-grained breakdown allows MCP clients and AI assistants to query only the information they require.
The available tools have been streamlined:
{
"force": false
}
{
"query": "search query"
}
The server provides pre-built prompt templates for common documentation tasks:
{
"section": "cli|settings|resolver"
}
If no section is specified, summaries for all sections are generated.For Claude Desktop or other systems, modify the MCP server settings appropriately:
{
"mcpServers": {
"uv-docs": {
"command": "uv",
"args": [
"--directory",
"/Users/steven/Git/MCP/uv-docs",
"run",
"uv-docs"
]
}
}
}
{
"mcpServers": {
"uv-docs": {
"command": "uvx",
"args": [
"uv-docs"
]
}
}
}
For detailed debugging, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /Users/steven/Git/MCP/uv-docs run uv-docs
The server implements a version-aware caching system to optimize documentation retrieval:
update_cache
tool when necessary.uv-docs/
├── src/
│ └── uv_docs/
│ ├── __init__.py
│ ├── server.py # Server setup and routing
│ ├── resources.py # Resource handling and MCP resource interface
│ ├── cache.py # Version-aware cache system
│ ├── prompts.py # Prompt templates for documentation tasks
│ └── tools.py # Consolidated tool implementations (update_cache, search_documentation)
├── pyproject.toml # Project configuration
└── README.md # Project overview (this file)
uv sync
uv build
uv publish
Note: Set PyPI credentials via:
--token
or environment variable UV_PUBLISH_TOKEN
--username
/UV_PUBLISH_USERNAME
and --password
/UV_PUBLISH_PASSWORD
For the best debugging experience, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /Users/steven/Git/MCP/uv-docs run uv-docs
The Inspector will display a URL for browser-based debugging.
The server implements a version-aware caching system:
{
"mcpServers": {
"uv-docs": {
"env": {},
"args": [
"--directory",
"/Users/steven/Git/MCP/uv-docs",
"run",
"uv-docs"
],
"command": "uv"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.