-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
MCP servers are soooo hot right now. https://modelcontextprotocol.io/introduction
When moving between different hosts, having a shared vscode profile having "self installing" mcp servers in project specific settings in mcp_settings.json is a dream come true. Currently afaik Rust has no mechanism to install + execute using cargo.
Rust is a wonderful language for MCP "vibe code" & agentic AI code generation because if rustc compiles, the executable is devoid of a huge class of memory overflow & other types of errors the compiler guarantees won't be present, as well as advanced linting. Fast & meaningful linting or access to the editors LSP is super important when LLMs are in play. MCP plays a critical role in the IDE by connecting the AI agent to the LLM using an instruction protocol.
Despite MCP being a language-neutral specification, the Rust MCP SDK isn't stable (or even useful afaik), whereas the Python and NodeJS libraries at github.com/modelcontextprotocol are more mature right now. I'm sure the Rust SDK will be awesome when it's stable.
However, there's another issue I want to address: how to do low-friction installation of MCP tools in Rust/cargo.
By frictionless, I mean:
You paste the JSON into the
mcpServerinmcp_settings.jsonand the provider simply turns green & starts working. ✅
🧰 Existing Approaches
- Node.js has
npx&bunx - Python has
uvx,pipx
Both ecosystems support downloading + installing + running MCP servers.
Most Python projects still specify
pip, and only a few suggest first installinguv, then usinguvx.
Node.js npx and bunx are the easiest — but both often run into problems with outdated NodeJS runtimes in environments like VSCode extension hosts.
Trying to debug that? High friction.
🦀 What About Rust?
I've always found cargo quite novel — Rust is one of the few languages with its own packaging system. I realize they are separate, but also at this point quite inseparable.
In this case, MCP is still new, and perhaps there’s opportunity to enhance cargo. That’s the discussion I’d like to start.
I think the best approach for Rust is probably to build on top of pkgx, though several options scratch the itch in different ways — none of them fully support the MCP use case yet.
🔍 Tool Comparison
| Tool | Category | Crates.io | GitHub | Installs to | Auto-run | Comments |
|---|---|---|---|---|---|---|
cargo install |
Built-in Cargo | ✅ | ✅ (SO ref) | ~/.cargo/bin |
❌ | Default method; installs CLI but doesn’t auto-execute. |
cargo-binstall |
Cargo subcommand | ✅ | ✅ (GitHub) | ~/.cargo/bin |
❌ | Prefers prebuilt binaries for fast install; falls back to compiling. |
cargo-run-bin |
Cargo subcommand | ✅ | ✅ (GitHub) | Workspace cache | ✅ (via alias) | Runs tools in Cargo.toml w/ locked versions. Not for ad-hoc use. |
pkgx |
Standalone CLI | 🚫 | ✅ (published binaries) | Transient (no install) | ✅ | Cleanest UX so far; own registry/pantry. |
💭 Final Thoughts
Does anybody have thoughts on how to reduce the MCP server friction?
Should we unify around a standard Rust-first install + run pattern for MCP tooling?
Drop your thoughts below ⬇️