MCP server for cargo, crates.io, and rustdoc workflows, enabling integrated data and actions.
Configuration
View docs{
"mcpServers": {
"camshaft-cargo-mcp": {
"command": "cargo-mcp",
"args": []
}
}
}You run Cargo’s MCP server to connect Cargo, crates.io, and rustdoc workflows to a centralized MCP endpoint. This lets you manage data and commands across Rust tooling from a single integration point, improving automation and consistency across your Rust projects.
You connect your MCP client to the cargo MCP server to run cargo-related data operations and actions. Use the standard MCP client workflow to register the server, then send requests that align with cargo-mcp’s capabilities. Once connected, you can perform actions such as querying or syncing cargo data through the unified MCP interface, without manually wiring each tool to separate endpoints.
Prerequisites: ensure you have the Rust toolchain installed, including the cargo package manager.
$ cargo install --git https://github.com/camshaft/cargo-mcpConfigure your editor or client to use the cargo MCP server. The following examples show the standard in-process, local configuration that points to the cargo-mcp executable.
{
"mcpServers": {
"camshaft/cargo-mcp": {
"command": "cargo-mcp",
"args": [],
"disabled": false,
"autoApprove": []
}
}
}Two common local configuration approaches are shown for your IDE and your CLI-based MCP client.
// VSCode MCP integration
{
"servers": {
"camshaft/cargo-mcp": {
"type": "stdio",
"command": "cargo-mcp"
}
}
}// CLI-based MCP configuration
{
"mcpServers": {
"camshaft/cargo-mcp": {
"command": "cargo-mcp",
"args": [],
"disabled": false,
"autoApprove": []
}
}
}Keep the cargo-mcp binary up to date to receive the latest compatibility and security improvements. If you enable auto-approve for MCP operations, ensure you trust the configured server before enabling it.
If you manage multiple MCP servers, keep a separate named entry for each server and clearly label their type as either stdio (local process) or http (remote). This keeps your client configuration predictable and helps you quickly switch between cargo-related MCP endpoints.