Contributing
Set up
Section titled “Set up”git clone https://github.com/saadmanrafat/uv-mcp.gitcd uv-mcpuv syncThe repository ships .mcp.json, .codex/config.toml and opencode.json that run the server from your
checkout, so opening the repo in Claude Code, Codex or OpenCode lets you try your changes immediately.
Check your work
Section titled “Check your work”uv run pytest -m "not network" # fast; needs uv on PATH but no internetuv run pytest # everything, including tests that download from PyPIuv run ruff check src tests scriptsuv run ruff format src tests scriptsuv run uv-mcp-server --list-toolsThe integration tests drive the server through a real MCP client against the real uv, in temporary directories.
Adding or changing a tool
Section titled “Adding or changing a tool”- Put it in the matching module under
src/uv_mcp/tools/, named after the uv command (uv pip treebecomesuv_pip_tree). - Decorate it with
@uv_tool(title=..., toolset=..., read_only=..., destructive=..., idempotent=..., open_world=...). Be honest: clients rely on these annotations to decide when to ask the user. - Build the command with
Args, which validates values, and resolve every path withproject_dir()orsecurity.resolve_path(). Never use a shell. - Pass secrets with
env=/stdin_data=plussecrets=[...], never on argv. - Keep descriptions short (they cost every user context) and leave rare flags to
extra_args. - Add tests, then regenerate the reference:
uv run python scripts/gen_tool_reference.pyDocumentation
Section titled “Documentation”The site is Starlight under docs/:
cd docsnpm cinpm run devpython3 ../scripts/check_docs.py # internal links and style checks, run from the repo rootReleasing
Section titled “Releasing”- Bump the version in
pyproject.tomlandgemini-extension.jsonand add a changelog entry. - Tag
vX.Y.Zand push the tag. CI tests everything, publishesuv-mcp-serverto PyPI with trusted publishing, and creates a GitHub release.