MCP Server UV

by hackcpp

141 downloads Not rated yet
GitHub

About

A Model Context Protocol server for uv package manager

Explore

- 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

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 MCP Server UV
    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

``bash
pip install mcp-server-uv


1. Clone the repository
2. Install development dependencies:
bash
uv pip install -e ".[test]"

bash
pytest
``

uv_pip_list

List installed packages

uv_pip_install

Install Python packages

uv_pip_uninstall

Remove packages from virtual environment

uv_pip_upgrade

Upgrade Python packages

uv_pip_compile

Generate requirements.txt with hashes

uv_pip_sync

Sync virtual environment with requirements.txt

uv_init

Initialize a new Python project

uv_add

Add project dependencies

uv_remove

Remove project dependencies

uv_sync

Sync project dependencies

uv_lock

Update lockfile

uv_run

Run commands in project environment

uv_tree

View dependency tree

uv_build

Build distribution archives

uv_publish

Publish to package index

- uv_pip_list: List installed packages
- uv_pip_install: Install Python packages
- uv_pip_uninstall: Remove packages from virtual environment
- uv_pip_upgrade: Upgrade Python packages
- uv_pip_compile: Generate requirements.txt with hashes
- uv_pip_sync: Sync virtual environment with requirements.txt

- uv_init: Initialize a new Python project
- uv_add: Add project dependencies
- uv_remove: Remove project dependencies
- uv_sync: Sync project dependencies
- uv_lock: Update lockfile
- uv_run: Run commands in project environment
- uv_tree: View dependency tree
- uv_build: Build distribution archives
- uv_publish: Publish to package index

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp server uv": {
            "mcp-server-uv": {
                "command": "uv",
                "args": [
                    "pip",
                    "install",
                    "-e",
                    ".[test]"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-uv": {
        "command": "uv",
        "args": [
            "pip",
            "install",
            "-e",
            ".[test]"
        ]
    }
}
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

``bash 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 packages - uv_pip_install: Install Python packages - uv_pip_uninstall: Remove packages from virtual environment - uv_pip_upgrade: Upgrade Python packages - uv_pip_compile: Generate requirements.txt with hashes - uv_pip_sync: Sync virtual environment with requirements.txt

Project Management Tools

-
uv_init: Initialize a new Python project - uv_add: Add project dependencies - uv_remove: Remove project dependencies - uv_sync: Sync project dependencies - uv_lock: Update lockfile - uv_run: Run commands in project environment - uv_tree: View dependency tree - uv_build: Build distribution archives - uv_publish: Publish to package index

Development

Setup Development Environment

1. Clone the repository 2. Install development dependencies:
`bash uv pip install -e ".[test]" `

Running Tests

`bash pytest `

Test Coverage

The project uses pytest-cov for coverage reporting. Run tests with coverage:
`bash pytest --cov=mcp_server_uv --cov-report=term-missing ``

License

This project is open source and available under the MIT License.

Author

- Liu Heng ([email protected])

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
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.