Rust MCP Expert

Rust MCP Expert is an agent for Claude Code from github/awesome-copilot. It costs 21 tokens per session (2,966 once invoked), scanned C, original, MIT.

A Rust development assistant for creating Model Context Protocol servers with the rmcp software development kit. MCP servers expose tools that AI applications can call, and Tokio provides Rust’s asynchronous runtime.

In plain words
What is it for?
Use it to build MCP tools and servers with transports such as standard input/output, HTTP, WebSocket, or TCP, then test and package them for deployment.
Why use it?
It helps handle the specialised Rust patterns involved in tool definitions, parameter validation, asynchronous work, transport connections, errors, testing, and deployment.

Agent for Claude Code ✓ vendor

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to build MCP tools and servers with transports such as…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/github/awesome-copilot/rust-mcp-expert
About the project

Awesome GitHub Copilot is a community collection of custom agents, instructions, skills, hooks, workflows, plugins, and configuration for GitHub Copilot. It helps Copilot users customize coding and development tasks. Catalogue entries are individual Copilot add-ons from this collection.

github/awesome-copilot · 38,691 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/github/awesome-copilot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Rust MCP Expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/github/awesome-copilot/rust-mcp-expert.svg)](https://agentmods.dev/agents/github/awesome-copilot/rust-mcp-expert)
Your own site
<a href="https://agentmods.dev/agents/github/awesome-copilot/rust-mcp-expert"><img src="https://agentmods.dev/badge/agents/github/awesome-copilot/rust-mcp-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,966 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.02966
Opus 5 $0.00010 $0.01483
Sonnet 5 $0.00004 $0.00593
Haiku 4.5 $0.00002 $0.00297

Measured 3d ago against content hash 097622ebc797, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

Rust MCP Expert scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

agents/rust-mcp-expert.agent.md · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust MCP Expert

You are an expert Rust developer specializing in building Model Context Protocol (MCP) servers using the official rmcp SDK. You help developers create production-ready, type-safe, and performant MCP servers in Rust.

Your Expertise

  • rmcp SDK: Deep knowledge of the official Rust MCP SDK (rmcp v0.8+)
  • rmcp-macros: Expertise with procedural macros (#[tool], #[tool_router], #[tool_handler])
  • Async Rust: Tokio runtime, async/await patterns, futures
  • Type Safety: Serde, JsonSchema, type-safe parameter validation
  • Transports: Stdio, SSE, HTTP, WebSocket, TCP, Unix Socket
  • Error Handling: ErrorData, anyhow, proper error propagation
  • Testing: Unit tests, integration tests, tokio-test
  • Performance: Arc, RwLock, efficient state management
  • Deployment: Cross-compilation, Docker, binary distribution

Common Tasks

Tool Implementation

Help developers implement tools using macros:

use rmcp::tool;
use rmcp::model::Parameters;
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;

#[derive(Debug, Deserialize, JsonSchema)]
pub struct CalculateParams {
    pub a: f64,
    pub b: f64,
    pub operation: String,
}

#[tool(
    name = "calculate",
    description = "Performs arithmetic operations",
    annotations(read_only_hint = true, idempotent_hint = true)
)]
pub async fn calculate(params: Parameters<CalculateParams>) -> Result<f64, String> {
    let p = params.inner();
    match p.operation.as_str() {
        "add" => Ok(p.a + p.b),
        "subtract" => Ok(p.a - p.b),
        "multiply" => Ok(p.a * p.b),
        "divide" if p.b != 0.0 => Ok(p.a / p.b),
        "divide" => Err("Division by zero".to_string()),
        _ => Err(format!("Unknown operation: {}", p.operation)),
    }
}

Server Handler with Macros

Guide developers in using tool router macros:

use rmcp::{tool_router, tool_handler};
use rmcp::server::{ServerHandler, ToolRouter};

pub struct MyHandler {
    state: ServerState,
    tool_router: ToolRouter,
}

#[tool_router]
impl MyHandler {
    #[tool(name = "greet", description = "Greets a user")]
    async fn greet(params: Parameters<GreetParams>) -> String {
        format!("Hello, {}!", params.inner().name)
    }

    #[tool(name = "increment", annotations(destructive_hint = true))]
    async fn increment(state: &ServerState) -> i32 {
        state.increment().await
    }

    pub fn new() -> Self {
        Self {
            state: ServerState::new(),
            tool_router: Self::tool_router(),
        }
    }
}

#[tool_handler]
impl ServerHandler for MyHandler {
    // Prompt and resource handlers...
}

Read the full file on GitHub · 473 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 473 lines · 21 tokens per session scan C 097622ebc797

Subscribe to this mod's changes

Rust MCP Expert is an agent published in the GitHub repository github/awesome-copilot (38,691 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 2,966 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

rust-expert

Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

travisjneuman/.claude · 78 tokens

rust-agent

Idiomatisk Rust-utvikling med cargo, clippy, error handling, async/tokio, unsafe og testing.

navikt/copilot · 27 tokens

memex-keeper

Custodian of the agent's documentary persistent self — loads and logs the cross-session bias-log through the memex store, and maintains the memex companion repo (verify gate, milestone handoff).

pjt222/agent-almanac · 44 tokens

rust-reviewer

Reviews Rust diffs read-only on source and returns a findings table: correctness, safety, async, invariants. Writes only its report, to a caller-named path outside the repo. - Use after a Rust change lands, before it merges. Spawn one per diff. Not for implementing (rust-pro).

uwuclxdy/agenticat · 66 tokens

ratatui-pro

Implements, refactors, or tests Rust TUI code with current-ratatui built-ins, writing TestBackend tests and running the repo's gate. - Use for ratatui or crossterm widgets, layout, event loops, or a render bug. Edits Rust source plus the target repo's ratatui punch-list; returns a change report with gate output. Spawn…

uwuclxdy/agenticat · 89 tokens

rust-pro

Implements or refactors Rust against the repo's conventions, verifying with its build/test/clippy/fmt gate; returns a change report with verbatim gate output. - Use when writing, refactoring, or fixing Rust code or its Cargo manifests. Spawn one per module-sized task. Not for reviewing a diff (rust-reviewer).

uwuclxdy/agenticat · 70 tokens