Labsco
MCP SERVER

Cargo MCP

by seemethere

Build, test, lint and format a Rust project without handing an agent a shell.

Build Systems & CI/CD
Summary
Cargo as tool calls, not shell strings.

Because each subcommand is a typed tool, release mode or a feature list is a parameter rather than a string an agent assembles - and you can allow the check and test tools without granting a general shell.

What it is

An MCP server that wraps Cargo. Each subcommand is its own tool with typed parameters - release mode, feature list, target triple, workspace path - so builds, tests, Clippy runs and rustfmt happen as tool calls rather than as command lines.

What you get
  • A project built, in debug or release, with the features and target you name
  • Tests run, all of them or one by name
  • A binary run, chosen by name in a multi-binary project
  • Errors checked without producing a binary
  • Clippy run over the project
  • Code formatted with rustfmt
  • Documentation generated
  • Build artifacts cleared
  • The dependency tree displayed
Requirements

Python 3.8 or higher, and Rust with Cargo already installed - the server runs the real toolchain rather than reimplementing it. Install from source with pip install -e . The workspace root is auto-detected; pass workspace_path when it guesses wrong.

Setup effort

One command — cargo-mcp