Guides9 min read

Best MCP Servers for Rust Developers in 2026

Supercharge your Rust development with MCP servers. From Cargo dependency lookups to database schema inspection, these tools give your AI real context for writing safe, idiomatic Rust code.

By MyMCPTools Team·

Rust's greatest strengths — the borrow checker, lifetime annotations, zero-cost abstractions — are also the source of its steepest learning curve. AI assistants can be transformative for Rust developers, but only when they have real context about your codebase: your actual data structures, your Cargo.toml dependencies, the exact compiler error you're seeing. MCP servers close that gap, giving your AI live access to the files, tools, and documentation it needs to generate code that actually compiles.

This guide covers the essential MCP servers for Rust developers, with a focus on workflows where real-time context is most valuable.

Filesystem Access — The Foundation

Filesystem MCP Server — Read Your Actual Codebase

The Filesystem MCP server is non-negotiable for any serious Rust development workflow. It gives your AI read access to your source files, Cargo.toml, and workspace configuration — enabling it to understand your actual type definitions, trait implementations, and module structure before generating a single line of code.

Rust-specific workflows:

  • Lifetime help: Share your struct definitions directly and ask "explain why this lifetime annotation is needed" — the AI sees your actual types, not a simplified example
  • Trait implementation: "Implement the Display trait for this enum" — the AI reads your enum variants before generating the match arms
  • Cargo.toml analysis: "What version of tokio am I using, and is there a newer stable release?" — reads your actual lockfile
  • Macro debugging: Share complex macro definitions and ask for expansion explanations or fixes
  • Error message triage: Paste compiler output alongside the source file for targeted, accurate fix suggestions

Recommended setup: Point the Filesystem server at your workspace root (the directory containing your Cargo.toml or workspace Cargo.toml). This gives the AI access to all crates in the workspace while keeping it scoped to your project.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/rust-workspace"]
    }
  }
}

Documentation and Library Research

Brave Search MCP Server — Real-Time Docs.rs and Crates.io Lookups

Rust's ecosystem moves fast. Tokio's async runtime patterns have evolved significantly across versions. Serde's derive macros have nuances that change across point releases. The Actix Web and Axum frameworks have diverged in their approach to middleware and error handling. AI assistants trained on historical data will confidently generate code for older API patterns that no longer compile.

The Brave Search MCP server solves this by letting your AI fetch current documentation from docs.rs before generating code that uses a specific crate.

Rust documentation workflows:

  • "Look up the current API for tokio::sync::RwLock and show me how to use it with async/await"
  • "What's the current serde_json API for handling optional fields with custom defaults?"
  • "Check docs.rs for the latest axum version and show the routing API changes from 0.6 to 0.7"
  • "Find examples of using rayon's ParallelIterator with custom thread pool configuration"
  • "Look up the current sqlx query macro API for PostgreSQL with compile-time checking"

Crates.io research: The Brave Search server is equally useful for crate discovery. "Find a well-maintained Rust crate for parsing TOML files with good serde support" returns current ecosystem recommendations rather than dated training data.

Version Control and Collaboration

GitHub MCP Server — Crate Source Code and Issues

For Rust developers working with open-source crates, the GitHub MCP server provides direct access to crate source code, issues, and pull requests. This is invaluable when documentation is incomplete or when you're debugging behavior that differs from the documented API.

Open source Rust workflows:

  • Read the actual implementation of a crate function when the docs don't fully explain the behavior
  • Search issues for known bugs or limitations before spending time debugging
  • Find usage examples from the crate's own tests — usually the most accurate documentation
  • Review recent commits to a dependency before upgrading to catch breaking changes
  • Search for trait implementation examples across Rust ecosystem codebases

Git MCP Server — Your Codebase History as Context

The Git MCP server makes your project's commit history available as diagnostic context. For Rust projects, this is particularly valuable when debugging type system changes or API breakage during refactors.

Rust-specific git workflows:

  • Find the commit that changed a struct definition when a downstream type check broke
  • Review the full context of a recent unsafe block addition before audit
  • Diff versions of a trait implementation across a refactor to identify behavioral changes
  • Search commit messages for when a particular dependency was upgraded

Database Integration

PostgreSQL MCP Server — Schema Context for sqlx and Diesel

Rust's compile-time database query verification (via sqlx macros or Diesel's schema DSL) requires accurate schema knowledge. The PostgreSQL MCP server gives your AI access to your actual database schema before generating query code — eliminating the round-trip of "it compiles but the column name is wrong" errors.

Database workflow in Rust:

  • Generate correct sqlx query! macros with actual column types and nullability from schema inspection
  • Write Diesel model structs that match your exact schema column types
  • Debug migration files by checking the current schema state before and after
  • Generate sea-orm entities from live schema inspection

SQLite MCP Server — Embedded Database Development

SQLite is common in Rust CLI tools, desktop apps, and embedded systems. The SQLite MCP server enables the same schema-aware code generation for SQLite-backed Rust projects using rusqlite or sqlx with SQLite.

Infrastructure and Deployment

Docker MCP Server — Containerizing Rust Applications

Rust's cross-compilation support and small binary sizes make it excellent for containerization, but multi-stage Docker builds for Rust have specific patterns (musl compilation for scratch images, layer caching for Cargo dependencies). The Docker MCP server lets your AI inspect your actual Docker environment and running containers while generating Dockerfile content.

Rust containerization patterns:

  • Generate optimized multi-stage Dockerfiles that cache Cargo dependency compilation
  • Debug container runtime behavior by inspecting the actual container state
  • Verify that your static binary works in a minimal Alpine or scratch container

Recommended Stack by Rust Project Type

CLI tool / systems utility: Filesystem + Git + Brave Search + GitHub

Web service (Axum / Actix): Filesystem + PostgreSQL + Git + GitHub + Brave Search + Docker

Embedded / async systems: Filesystem + GitHub + Brave Search (for no_std crate lookup) + Git

Library / open source crate: Filesystem + GitHub + Git + Brave Search

Data processing / CLI pipeline: Filesystem + SQLite or PostgreSQL + Git + Brave Search

Start with Filesystem + Brave Search — these two alone eliminate the most common failure modes in AI-assisted Rust development (type mismatch from stale training data, deprecated API patterns). Add GitHub when you're working with external crates, and PostgreSQL when you're working with databases.

Browse the full coding MCP servers catalog or see Best MCP Servers for Go Developers for a comparable guide in the systems programming space.

Recommended Tools

Better Stack

Free Plan

Get alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.

Start monitoring free →

1Password

14-day Free Trial

Store and inject API keys, payment credentials, tokens, and file access secrets into your MCP server configs. Trusted by 150K+ developers.

Try 1Password free →

🔧 MCP Servers Mentioned in This Article

📁

Filesystem MCP Server

sandboxed read, write, edit, move and search access to an explicit whitelist of local directories, and it is the reference implementation most other filesystem MCP servers are modelled on. Shipped by Anthropic in the official modelcontextprotocol/servers monorepo (89,000+ stars, actively maintained), it is a Node.js server published to npm as @modelcontextprotocol/server-filesystem. The part worth understanding before you install is the access-control model, because there are now two ways to grant directories and they do not compose. Method one is command-line arguments: `npx -y @modelcontextprotocol/server-filesystem /path/one /path/two`. Method two, and the one the maintainers recommend, is MCP Roots — a client that supports the roots protocol sends its roots at initialization, and those roots COMPLETELY REPLACE any directories passed on the command line, then get replaced again on every `notifications/roots/list_changed`. That means allowed directories can change at runtime without restarting the server, but it also means a roots-capable client silently overrides your CLI arguments. If the server starts with no arguments and the client either does not support roots or sends an empty list, initialization throws an error. The tool surface is broad: `read_text_file` (with mutually exclusive `head`/`tail` line windows), `read_media_file` returning base64 image/audio content blocks, `read_multiple_files` which keeps going when individual reads fail, `write_file`, `edit_file`, `create_directory`, `list_directory`, `list_directory_with_sizes`, `move_file`, `search_files`, `directory_tree`, `get_file_info` and `list_allowed_directories`. `edit_file` is the one to learn — it does line-based and multi-line pattern matching with indentation detection and preservation, returns a git-style diff with context, and supports `dryRun: true` so you can preview a change before applying it; the maintainers recommend always running a dry run first. Every operation is refused outside the allowed set, and `list_allowed_directories` is the fastest way to confirm what the server actually believes it can touch.

Local
💻

GitHub MCP Server

authenticated access to the whole GitHub platform — repositories, files, branches, issues, pull requests, Actions runs, security alerts, discussions and notifications — from Claude, Cursor, VS Code, Copilot CLI and any other MCP host. There is no npm package for this server, and that trips up most people who try to install it: `@github/mcp-server` is not published to the npm registry, so any `npx` line you find for it will fail. GitHub ships it three other ways. The easiest is the hosted remote server at https://api.githubcopilot.com/mcp/, which needs no install at all — point an HTTP-transport MCP client at that URL and log in with OAuth (VS Code 1.101+, Claude Desktop, Claude Code, Cursor and Windsurf all support this). The second is the official Docker image ghcr.io/github/github-mcp-server, which is what the copy-paste command on this page runs; on github.com it now performs a browser-based OAuth login on first use and keeps the token in memory only, which is why the published Docker configs map a fixed loopback callback port (-p 127.0.0.1:8085:8085 with GITHUB_OAUTH_CALLBACK_PORT=8085) so the container can receive the callback. Prefer a token? Set GITHUB_PERSONAL_ACCESS_TOKEN instead — it takes precedence over OAuth, and the minimum useful scopes are repo, read:org and read:packages. The third is the native Go binary from the repository's releases, which needs no fixed port for the OAuth flow. GitHub Enterprise Server has no hosted option: use the local server with --gh-host or GITHUB_HOST set to your instance (include the https:// scheme — it defaults to http://, which GHES rejects). Toolsets can be narrowed with GITHUB_TOOLSETS, and an insiders channel is available at /mcp/insiders or via the X-MCP-Insiders header.

Auth required📘
💻

Git

Tools to read, search, and manipulate Git repositories. Full Git operations support.

Local
🔍

Brave Search MCP Server

The Brave Search MCP Server is the official server from Brave that gives AI assistants privacy-first web search through the independent Brave Search API — no tracking, no profiling, and results drawn from Brave's own web index rather than Google or Bing. It exposes five distinct tools that map directly to the Brave Search API endpoints: brave_web_search for general queries with pagination, freshness filters, and safe-search controls; brave_local_search for businesses, restaurants, and points of interest with automatic location filtering; brave_news_search for recent articles and current events; brave_image_search for image discovery; and brave_video_search for finding videos across the web. Authentication uses a single BRAVE_API_KEY (free tier available at brave.com/search/api) or a mounted BRAVE_API_KEY_FILE for Docker-secret setups. Install in Claude Desktop, Cursor, Windsurf, or VS Code with one npx command and choose stdio or streamable-HTTP transport. Because Brave operates its own crawler and index, the Brave Search MCP server is a strong choice for developers who want an alternative to Google-dependent search tools, need reproducible non-personalized results, or care about data privacy in agent workflows — Claude can pull fresh web context, verify facts, and research topics without leaking queries to ad-tech pipelines.

Local
🗄️

SQLite MCP Server

conversational read and write access to any SQLite database file, plus a running business-insights memo that accumulates what the analysis turns up. It is a Python server on PyPI, not a Node one, and the difference is the single most common reason setups fail here: `@modelcontextprotocol/server-sqlite` does not exist on npm, so every npx line for it 404s. The working invocation is `uvx mcp-server-sqlite --db-path /path/to/database.db` (PyPI package mcp-server-sqlite, v2025.4.25), or the equivalent `mcp/sqlite` Docker image with a volume mounted at /mcp. The --db-path argument is required and points at the .db file; the server will create it if it is not there yet. Six tools are exposed, deliberately split by risk: read_query for SELECT only, write_query for INSERT/UPDATE/DELETE, create_table for DDL, list_tables and describe-table for schema introspection, and append_insight, which writes into a memo://insights resource that updates live as findings accumulate — that resource, not the SQL tools, is what makes this server different from a generic database connector. It also ships an mcp-demo prompt that takes a business topic, generates a plausible schema and sample data, and walks through an analysis end to end, which is the fastest way to see the memo behaviour without wiring up real data. One caveat to weigh before adopting it: this is an Anthropic reference implementation that now lives in modelcontextprotocol/servers-archived, archived on 2025-05-28. The published package still installs and runs, but it is frozen — no new features, no dependency updates, and no security patches.

Local
🔧

Docker MCP Server

The Docker MCP server (ckreiling/mcp-server-docker) gives an AI assistant direct control of a Docker daemon over the Model Context Protocol: containers, images, networks and volumes, as tools rather than shell commands. It is the community server most people mean by "Docker MCP" — distinct from Docker’s own Docker MCP Gateway, which does not manage your containers at all but runs *other* MCP servers inside containers. If you want to ask Claude why the postgres container keeps restarting, you want this one; if you want a single secure endpoint in front of twenty catalog servers, you want the gateway. The tool surface is explicit and small enough to reason about: list_containers, create_container, run_container, recreate_container, start_container, fetch_container_logs, stop_container and remove_container for containers; list_images, pull_image, push_image, build_image and remove_image for images; list_networks / create_network / remove_network and list_volumes / create_volume / remove_volume for the rest. Two resource templates, docker://containers/{id}/logs and docker://containers/{id}/stats, let a client read logs and live stats by container ID or name without a tool call. It also ships a docker_compose prompt that puts the model into a plan-then-apply loop — you describe the containers you want under a project name, the model proposes a concise plan, and nothing runs until you approve it; reopening the prompt with the same project name re-reads the state of everything created under it, which is how you clean up after a lost chat. It runs on the Python Docker SDK’s from_env, so DOCKER_HOST applies: set ssh://user@host and the same server administers a remote engine. Two limits are deliberate and stated by the project — privileged options like --privileged and --cap-add/--cap-drop are not supported, and container configuration passes through the model, so no secrets belong in it.

Local📘

📚 More from the Blog