
rust-docs-mcp
by snowmead·★ 124·综合分 47
功能全面的 MCP 服务器,为 AI 代理提供 Rust 包文档、源码分析、依赖关系和模块结构。
概述
Rust-docs-mcp 是一个专业的 MCP 服务器,通过全面的文档访问、源码分析和依赖追踪,帮助 AI 代理探索和理解 Rust 包。它支持 crates.io、GitHub 仓库和本地文件系统等多种来源,具有工作区支持和离线缓存功能。该服务器实现了丰富的工具集,用于包检查,包括文档搜索、项目检查、依赖分析和模块结构可视化。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您的 AI 代理需要全面的 Rust crate 分析、文档访问和依赖追踪来构建 Rust 应用程序时,选择此 MCP 服务器。
什么时候不要选它
如果您需要处理非 Rust 语言或需要写入 crate 的权限,不要选择此服务器(它仅提供只读访问)。
此 server 暴露的工具
从 README 抽取出 12 个工具cache_crateDownload and cache a crate from various sources (cratesio, github, local)
remove_crateRemove cached crate versions to free disk space
list_cached_cratesView all cached crates with versions and sizes
list_crate_versionsList cached versions for a specific crate
get_crates_metadataBatch metadata queries for multiple crates
list_crate_itemsBrowse all items in a crate with optional filtering
search_itemsFull search with complete documentation
search_items_previewLightweight search returning only IDs, names, and types
get_item_detailsGet detailed information about specific items
get_item_docsExtract just the documentation string for an item
get_item_sourceView source code with configurable context lines
get_dependenciesAnalyze direct and transitive dependencies with filtering
可对比工具
安装
安装
快速安装
curl -sSL https://raw.githubusercontent.com/snowmead/rust-docs-mcp/main/install.sh | bash通过 Cargo 安装
cargo install rust-docs-mcpMCP 配置
添加到您的 MCP 配置中:
{
"rust-docs": {
"command": "/path/to/rust-docs-mcp",
"transport": "stdio"
}
}FAQ
- 缓存目录位置在哪里?
- 默认情况下,包被缓存在 `~/.rust-docs-mcp/cache/`。您可以使用 `--cache-dir` 选项或设置 `RUST_DOCS_MCP_CACHE_DIR` 环境变量来自定义此位置。
- 如何访问私有 GitHub 仓库?
- 使用您的个人访问令牌设置 `GITHUB_TOKEN` 环境变量。这会将 GitHub API 速率限制从 60 提高到每小时 5,000 次请求。
Hacker News 讨论
开发者社区最近的相关讨论。
- 帖子 by monadoid · 2025-11-02
- 帖子 by snowmead · 2025-06-20
rust-docs-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。