| Crates.io | rust-crate-src-mcp |
| lib.rs | rust-crate-src-mcp |
| version | 0.1.3 |
| created_at | 2025-12-24 10:08:15.166053+00 |
| updated_at | 2026-01-05 19:19:51.663336+00 |
| description | An MCP server for pulling the source of crate dependencies. |
| homepage | |
| repository | https://github.com/cbgbt/rust-crate-src-mcp |
| max_upload_size | |
| id | 2002944 |
| size | 92,354 |
Fetch Rust crate source code from crates.io. Available as a library and MCP server.
Install via cargo:
cargo install rust-crate-src-mcp
Configure in your mcp.json:
{
"mcpServers": {
"rust-crate-src": {
"command": "rust-crate-src-mcp"
}
}
}
use rust_crate_src::get_crate_source;
let source = get_crate_source("serde", None).await?;
println!("Extracted to: {}", source.checkout_path.display());
// With version constraint
let source = get_crate_source("tokio", Some("^1.0")).await?;
Exposes the get_rust_crate_source tool:
Returns:
make check # Run all checks (test + lint + format) - REQUIRED before commits
make format # Auto-format code
make test # Run unit tests
make integ # Run integration tests (requires network)
| Module | Purpose |
|---|---|
lib.rs |
Public API facade |
version.rs |
Version resolution via crates.io API |
extract.rs |
Download and extract .crate tarballs |
bin/rust-crate-src-mcp.rs |
MCP server using rmcp |
See AGENTS.md for development guidelines.
This project is based on the get_rust_crate_source tool from symposium.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.