A Model Context Protocol server for uv package manager
Project description
MCP Server UV
A Model Context Protocol (MCP) server implementation for the UV package manager. This server provides MCP-compatible interfaces for managing Python packages and virtual environments using UV.
Features
-
Package Management
- Install, uninstall, and upgrade Python packages
- List installed packages
- Add and remove project dependencies
- Compile and sync requirements
- View dependency trees
-
Project Management
- Initialize new Python projects
- Create and update lockfiles
- Build and publish packages
- Run commands in project environment
Installation
pip install mcp-server-uv
Requirements
- Python >= 3.11
- UV >= 0.1.10
- mcp-python >= 0.1.0
Usage
The server can be used as a Model Context Protocol server in compatible environments. It provides the following tools:
Package Management Tools
uv_pip_list: List installed packagesuv_pip_install: Install Python packagesuv_pip_uninstall: Remove packages from virtual environmentuv_pip_upgrade: Upgrade Python packagesuv_pip_compile: Generate requirements.txt with hashesuv_pip_sync: Sync virtual environment with requirements.txt
Project Management Tools
uv_init: Initialize a new Python projectuv_add: Add project dependenciesuv_remove: Remove project dependenciesuv_sync: Sync project dependenciesuv_lock: Update lockfileuv_run: Run commands in project environmentuv_tree: View dependency treeuv_build: Build distribution archivesuv_publish: Publish to package index
Development
Setup Development Environment
- Clone the repository
- Install development dependencies:
uv pip install -e ".[test]"
Running Tests
pytest
Test Coverage
The project uses pytest-cov for coverage reporting. Run tests with coverage:
pytest --cov=mcp_server_uv --cov-report=term-missing
License
This project is open source and available under the MIT License.
Author
- Liu Heng (liuheng@bonree.com)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_uv-0.0.9.tar.gz.
File metadata
- Download URL: mcp_server_uv-0.0.9.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d8282564bc4edd4cd5b2fff8331a84a8886f95322762680b34ebaa8e6afb708
|
|
| MD5 |
b7aa393e0584c3d7cdf62e04402787d4
|
|
| BLAKE2b-256 |
be23d0b180b8b1393baab5eb8eb01aec9e2ccbfc2ad19d68c265d886f32952f7
|
File details
Details for the file mcp_server_uv-0.0.9-py3-none-any.whl.
File metadata
- Download URL: mcp_server_uv-0.0.9-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93ba907ef6729c16e450ab9cbd84187bf84edde1ede0b5f080e4582b4a6ecfce
|
|
| MD5 |
793d2bca2582aad0d9c08816c76ee777
|
|
| BLAKE2b-256 |
4b517f9f3118632b0a625dbdc48321d3a22f8a71ad12695a527c49a1422aa22e
|