smithery.ai

uv-mcp

UV command automation and project lifecycle management patterns powered by the uv-mcp server

First seen Mar 20, 2026

Installation

$ npx skills add https://smithery.ai

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Declared

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
Compatibilityopencode
Declared agents opencode
More metadata
related_python_guidelines
For general Python development standards
related_python_cli
For CLI scaffolding patterns
related_mcp_servers
For MCP integration best practices

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 5,122 B
  • docs SUMMARY.md 106 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

UV MCP

What I Do

Describe how to steer the uv-mcp server so natural language requests become precise uv workflows. This skill focuses on diagnosing environments, managing dependencies, controlling Python runtimes, and building artifacts with uv while keeping the workspace healthy.

Core Workflows

Environment Health & Setup

Intent Tool What Happens
Diagnose failures or missing environments diagnose_environment Confirms pyproject.toml, virtualenv presence, lock sync status, and reports remediation steps.
Repair broken setups repair_environment Creates .venv, installs Python, and syncs dependencies automatically.
Verify/install uv itself checkuvinstallation, install_uv Checks uv availability and returns platform-specific install steps when missing.
> "Diagnose the environment"
# Use output to confirm pyproject + venv state
> "Repair the environment"
# Follow-up diagnostics ensure issues are resolved

Dependency Management

Scenario Tool Notes
Add/remove libraries adddependency, removedependency Supports --dev, optional dependency groups, and updates both config + env.
Keep env aligned with uv.lock sync_environment Syncs or upgrades locked versions; run after lockfile updates.
Inspect or refresh packages checkoutdatedpackages, showpackageinfo Surfaces available upgrades and in-depth metadata for any package.

Project Inspection

  • list_dependencies: Lists installed packages; request tree mode for transitive view.
  • analyzedependencytree: Visualizes dependency graph depth to spot heavy branches before refactors.

Runtime Management

Action Tool Guidance
List installed interpreters listpythonversions Shows versions uv already manages.
Install new interpreter installpythonversion Downloads and activates the requested Python release.
Pin project runtime pinpythonversion Updates .python-version to keep CI/CD aligned.

Project Lifecycle

  • init_project: Scaffold a fresh uv-enabled project, ideal for greenfield work.
  • export_requirements: Emit requirements.txt for platforms that expect pip-compatible manifests.

Build & Distribution (uv ≥ 0.6.4)

Need Tool Tips
Create wheels/sdists build_project Choose wheel-only or sdist-only, customize output dir, capture artifact paths.
Refresh lockfile without installing lock_project Useful after manual pyproject.toml edits or before committing dependency changes.
Clear uv cache clear_cache Fixes checksum mismatches or frees disk space; target entire cache or a single package.

Diagnostic Workflow Template

  1. diagnose_environment
  2. Review reported issues.
  3. repair_environment
  4. diagnose_environment again.
  5. If still broken: clearcache → lockproject → sync_environment.

Error Handling & Troubleshooting

  • uv-mcp returns structured errors (error, error_code, suggestion). Echo them in summaries so humans know the auto-remediation path.
  • Common scenarios:

- UV not installed → run installuv. - Missing packages → syncenvironment. - Version conflicts → clearcache then lockproject and syncenvironment. - Corrupted artifacts → clearcache for that package and re-sync.

When to Use Me

  • Onboarding or repairing uv-based projects without manual shell work.
  • Automating dependency chores (install, remove, upgrade) through MCP.
  • Managing Python runtimes inside CI/CD or multi-OS fleets.
  • Preparing releases: lockfiles, builds, requirements.txt exports.

Best Practices

  1. Diagnose before repair: Always capture the initial state so changes are auditable.
  2. Sync after mutations: Any adddependency / lockproject call should be followed by sync_environment to keep .venv aligned.
  3. Pin intentionally: Use pinpythonversion once a runtime is validated by CI.
  4. Cache hygiene: Run clear_cache when checksum or corruption errors show up, then re-sync immediately.
  5. Capture artifacts: After build_project, record the returned artifact list (wheel + sdist paths) in release notes.

Integration Patterns

  • With python-guidelines: Apply linting/testing standards after uv-mcp modifies dependencies.
  • With python-cli: Use init_project + dependency adds to scaffold CLIs rapidly.
  • With mcp-servers: Document uv-mcp availability in .vscode/mcp.json and keep tool lists lean.

Use this skill whenever the uv-mcp server is the fastest path to maintaining healthy uv environments without leaving the IDE context.