Nothing here is invented — each tool maps onto a cargo subcommand, with its target selection, feature choices and profile options exposed as parameters, and errors come back with cargo's own output rather than a summary of it. The compile-check loop is where it earns its place, because check and clippy are how an agent finds out whether a suggested change is real.
An MCP server wrapping the cargo command-line tool for Rust projects. The tools are grouped the way cargo itself is: building, executing, dependency management, project management, registry lookups and metadata.
- Build and quality: check to analyse without producing binaries, build to compile, clippy for lints with optional automatic fixes, fmt to format
- Execution: run for a binary or example, test for unit and integration tests, bench for benchmarks
- Dependencies: add and remove, update to refresh the lock file, tree to visualise the dependency graph
- Projects: new and init to create a package, clean to remove build artefacts, doc to build documentation
- Registry: search and info against crates.io, install and uninstall for Rust binaries
- Metadata: metadata for resolved dependencies in machine-readable form, version for cargo and Rust versions
- Most tools take a working directory, a package, features and the usual target selection, so the same tool addresses a workspace member or a single binary
A Rust toolchain, and a local build of the server from the repository. It speaks over standard input and output, and expects cargo to be on the path.
