Skip to main content

Model Context Protocol (MCP) server for interacting with Python installations via uv

Project description

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

  • uv_run(command: str[]) - Run a command or script
  • uv_init() - Create a new project
  • uv_add(package_name: str, version: Optional[str]) - Add dependencies to the project
  • uv_remove(package_name: str) - Remove dependencies from the project
  • uv_sync(dry_run: bool) - Install all declared dependencies, uninstall anything not declared
  • uv_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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uv_mcp-0.3.0.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uv_mcp-0.3.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file uv_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: uv_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uv_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9d562e7aea361d0deeb845749e1550eb6d69160242f6c2333eab14f33da536b7
MD5 c77bdaab4d40a190183b74ab991c22fa
BLAKE2b-256 e9a6c481b3cc52cb4dab2bd8ac4662a1105fe3ff32c7b632926850104b3c568f

See more details on using hashes here.

Provenance

The following attestation bundles were made for uv_mcp-0.3.0.tar.gz:

Publisher: publish.yml on dmclain/uv-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uv_mcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: uv_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uv_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ed61782046c25c82dc15ba5841d4ce42d7fc2f06c78da8c8f579fa0f216668
MD5 a1f1b1e412db085e81e884a2af02aade
BLAKE2b-256 343098df462df0c26d6e99b7f2b45e2092e51eec4b7e2d2465a8e0fd5443863a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uv_mcp-0.3.0-py3-none-any.whl:

Publisher: publish.yml on dmclain/uv-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page