- Home
- MCP servers
- Cargo Metadata
Cargo Metadata
- rust
0
GitHub Stars
rust
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"frozenlib-mcp-attr-example-cargo-metadata": {
"command": "./target/release/mcp-attr-example-cargo-metadata",
"args": []
}
}
}You can run a Cargo Metadata MCP Server that exposes key metadata about your Cargo projects through the Model Context Protocol (MCP). This server makes it easy to query project metadata, packages, dependencies, targets, workspace details, and features from your MCP client.
How to use
Connect an MCP client to the Cargo Metadata MCP Server to fetch structured data about your Cargo projects. You can request project metadata, package information, dependencies, build targets, workspace information, and feature sets. Use the client’s configured MCP server to perform these queries and integrate the results into your tooling, IDEs, or automation workflows.
How to install
Prerequisites: you need a Rust toolchain installed on your system. This includes rustc and cargo. You also need an MCP client to connect to the server (for example, an editor or tool that supports MCP).
Step-by-step setup:
- Clone the project containing the MCP server into your workspace
- Build the server in release mode
- Run the server to start listening for MCP client connections
Additional sections
Build the server in release mode to optimize performance. The server can be started directly after building, or you may run the produced binary if you prefer a standalone executable.
Usage with an MCP client requires you to point the client configuration to the runtime command that launches the MCP server. A typical local setup runs the compiled binary so the client can connect via MCP without requiring a remote URL.
Provided tools and endpoints let you retrieve all supported data: get_metadata, get_package_info, get_dependencies, get_targets, get_workspace_info, and get_features. Each tool accepts an optional manifest_path parameter; if you omit it, the server uses the Cargo.toml in the current directory by default.
Available tools
get_metadata
Fetches the project's overall metadata information including manifest details and workspace context.
get_package_info
Retrieves information about the project's packages, including names, versions, and paths.
get_dependencies
Returns the list of dependencies for the project, including indirect dependencies.
get_targets
Obtains the build targets defined by the Cargo project such as binaries, libraries, and examples.
get_workspace_info
Provides details about the workspace layout, members, and related metadata.
get_features
Gets the feature sets defined for the project and their activation details.