克拉特西奥mcp
    
让你的AI代理访问crate搜索、文档、依赖性分析、下载统计数据和安全审计——这是它对Rust依赖性做出明智决定所需的一切。
快速启动
托管(无需安装)
公共实例正在运行 https://cratesio-mcp.fly.dev/.添加到MCP客户端配置中:
{
"mcpServers": {
"cratesio-mcp": {
"type": "http",
"url": "https://cratesio-mcp.fly.dev/"
}
}
}从crates.io安装
cargo install cratesio-mcp从源代码构建
git clone https://github.com/joshrotenberg/cratesio-mcp
cd cratesio-mcp
cargo install --path .码头工人
docker run -p 3000:3000 ghcr.io/joshrotenberg/cratesio-mcp:latestMCP客户端配置
克劳德代码(stdio)
{
"mcpServers": {
"cratesio-mcp": {
"command": "cratesio-mcp"
}
}
}克劳德代码(HTTP,本地或远程)
{
"mcpServers": {
"cratesio-mcp": {
"type": "http",
"url": "http://localhost:3000/"
}
}
}克劳德桌面版
增添 claude_desktop_config.json:
{
"mcpServers": {
"cratesio-mcp": {
"command": "cratesio-mcp"
}
}
}包含什么
工具(23)
| 工具 | 说明 |
|---|---|
search_crates | 按名称或关键字搜索板条箱 |
get_crate_info | 详细的板条箱元数据(描述、链接、统计数据) |
get_crate_versions | 包含发布日期和下载次数的版本历史记录 |
get_crate_version | 特定版本的详细元数据 |
get_crate_readme | 板条箱版本的README内容 |
get_crate_features | 功能标志及其子功能激活 |
get_crate_docs | 从docs.rs浏览文档结构 |
get_doc_item | 特定项目的完整文档(fn、struct、trait) |
search_docs | 在板条箱文档中按名称搜索项目 |
get_dependencies | 特定版本的依赖关系 |
get_reverse_dependencies | 依赖于给定板条箱的板条箱 |
audit_dependencies | 根据OSV.dev漏洞数据库检查deps |
get_downloads | 下载统计数据和趋势 |
get_version_downloads | 特定版本的每日下载统计数据 |
get_crate_authors | 作者列于Cargo.toml |
get_owners | 板条箱所有者和维护者 |
get_user | GitHub用户名的用户配置文件 |
get_user_stats | 用户板条箱的总下载统计数据 |
get_summary | crates.io全球统计 |
get_categories | 浏览crates.io分类 |
get_category | 特定类别的详细信息 |
get_keywords | 浏览crates.io关键字 |
get_keyword | 特定关键字的详细信息 |
资源(4)
| 资源 | 描述 |
|---|---|
crates://{name}/info | 板条箱元数据 |
crates://{name}/readme | 板条箱README内容 |
crates://{name}/docs | 文件结构 |
| 最近的搜索 | 最近的搜索查询和结果 |
提示(2)
| 提示 | 描述 |
|---|---|
analyze_crate | 指导全面的板条箱分析 |
compare_crates | 并排比较多个板条箱 |
运输
- 标准 (默认)--适用于Claude Desktop、Claude Code和其他MCP客户端
- HTTP/SSE --带有服务器发送事件的流式HTTP(MCP 2025-11-25规范)
# stdio (default)
cratesio-mcp
# HTTP
cratesio-mcp --transport http --port 3000HTTP传输包括 塔 中间件栈:超时、速率限制、隔离并发控制、可选响应缓存和结构化跟踪。
图书馆使用情况
机箱还为机箱公开了一个类型化异步客户端。io API:
use std::time::Duration;
use cratesio_mcp::client::{CratesIoClient, CratesQuery, Sort};
let client = CratesIoClient::new("my-app", Duration::from_secs(1))?;
// Search for crates
let query = CratesQuery::builder()
.search("tower")
.sort(Sort::Downloads)
.build();
let results = client.crates(query).await?;
// Get crate details
let info = client.get_crate("tower-mcp").await?;客户端覆盖了板条箱、版本、所有者、类别、关键字、用户、团队、令牌、发布和可信发布的46个端点。
许可证
麻省理工学院或阿帕奇-2.0
