uv-mcp

by dmclain

4 306 downloads Not rated yet
GitHub

About

uv-mcp is a Model Context Protocol (MCP) server that gives LLMs direct access to inspect and manage Python environments using the fast Python package installer uv. It is built for developers and AI assistants that need to handle Python dependency management, environment inspection, and troubleshooting tasks…

Explore

- Environment Inspection: Query installed packages and their versions
- Dependency Resolution: Check compatibility between packages
- Environment Comparison: Identify differences between local and cloud/production environments
- Requirement Management: Parse and validate requirements files
- Package Information: Retrieve metadata about PyPI packages
- Virtual Environment Management: Create and manage virtual environments

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name uv-mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Start the server by running uvx uv-mcp in your terminal. Once running, it exposes Python environment data and package management functions as standardized MCP resources and tools that any MCP client can consume.

- run(command: str[]) - Run a command or script
- init() - Create a new project
- add(package_name: str, version: Optional[str]) - Add dependencies to the project
- remove(package_name: str) - Remove dependencies from the project
- sync(dry_run: bool) - Install all declared dependencies, uninstall anything not declared
- lock() - Update the project's lockfile
- pip(command: str[]) - Run a pip command
- pip_install(package_name: str, version: Optional[str]) - Install a package using pip
- pip_uninstall(package_name: str) - Uninstall a package using pip
- pip_list() - List all installed packages using pip

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "uv-mcp": {
            "uv-mcp": {
                "command": "uvx",
                "args": [
                    "uv-mcp"
                ]
            }
        }
    }
}

McpServers

{
    "uv-mcp": {
        "command": "uvx",
        "args": [
            "uv-mcp"
        ]
    }
}

A Model Context Protocol (MCP) server for interacting with Python installations via uv, the fast Python package installer.

Overview

uv-mcp provides LLMs with direct access to inspect and manage Python environments through the uv package manager. This allows AI assistants to help with Python dependency management, environment inspection, and troubleshooting tasks.

Features

- Environment Inspection: Query installed packages and their versions
- Dependency Resolution: Check compatibility between packages
- Environment Comparison: Identify differences between local and cloud/production environments
- Requirement Management: Parse and validate requirements files
- Package Information: Retrieve metadata about PyPI packages
- Virtual Environment Management: Create and manage virtual environments

How It Works

uv-mcp implements the Model Context Protocol to expose Python environment data and package management functionality through standardized resources and tools.

Resources

- python:packages://installed - List of all installed packages and versions
- python:packages://outdated - List of installed packages with newer versions available
- python:packages://{package_name}/latest - Latest versions available for a package
- python:packages://{package_name}/dependencies - List of dependencies for a specific package
- python:requirements://{file_path} - Parsed content of requirements files

Tools

- run(command: str[]) - Run a command or script
- init() - Create a new project
- add(package_name: str, version: Optional[str]) - Add dependencies to the project
- remove(package_name: str) - Remove dependencies from the project
- sync(dry_run: bool) - Install all declared dependencies, uninstall anything not declared
- lock() - Update the project's lockfile
- pip(command: str[]) - Run a pip command
- pip_install(package_name: str, version: Optional[str]) - Install a package using pip
- pip_uninstall(package_name: str) - Uninstall a package using pip
- pip_list() - List all installed packages using pip

Usage

To start the server:

uvx uv-mcp

Development

This project is built with the MCP Python SDK and uv.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.