https://github.com/dmclain/uv-mcp
MCP server for introspection of python environments
https://github.com/dmclain/uv-mcp
Last synced: about 2 months ago
JSON representation
MCP server for introspection of python environments
- Host: GitHub
- URL: https://github.com/dmclain/uv-mcp
- Owner: dmclain
- Created: 2025-03-24T17:52:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-26T04:00:41.000Z (7 months ago)
- Last Synced: 2025-09-06T23:15:40.469Z (about 2 months ago)
- Language: Python
- Size: 42 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - **uv-mcp** - MCP server for introspection of python environments `python` `mcp` `server` `pip install git+https://github.com/dmclain/uv-mcp` (🤖 AI/ML)
- awesome-mcp-servers - **uv-mcp** - MCP server for introspection of python environments `python` `mcp` `server` `pip install git+https://github.com/dmclain/uv-mcp` (AI/ML)
README
# 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](https://github.com/astral-sh/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](https://modelcontextprotocol.io) 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:
```bash
uvx uv-mcp
```
## Development
This project is built with the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) and [uv](https://github.com/astral-sh/uv).