uv-mcp

uv-mcp

3.5

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

Top Comments

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. By leveraging the Model Context Protocol, uv-mcp standardizes the way Python environment data and package management functionalities are exposed, making it easier for AI models to interact with and manipulate Python environments. This server is particularly useful for developers and AI systems that need to ensure compatibility and manage dependencies across different environments, whether local or in production.

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

MCP Tools

  • {'run': 'Run a command or script'}
  • {'init': 'Create a new project'}
  • {'add': 'Add dependencies to the project'}
  • {'remove': 'Remove dependencies from the project'}
  • {'sync': 'Install all declared dependencies, uninstall anything not declared'}
  • {'lock': "Update the project's lockfile"}
  • {'pip': 'Run a pip command'}
  • {'pip_install': 'Install a package using pip'}
  • {'pip_uninstall': 'Uninstall a package using pip'}
  • {'pip_list': 'List all installed packages using pip'}

MCP 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'}

Usage with Different Platforms

start_server

bash
uvx uv-mcp