Hotpath RS
Quickly find bottlenecks in Rust - one profiler for CPU, time, memory, and async code.
What is Hotpath RS?
Hotpath RS is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to quickly find bottlenecks in rust - one profiler for cpu, time, memory, and async code.
Quickly find bottlenecks in Rust - one profiler for CPU, time, memory, and async code.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Quickly find bottlenecks in Rust - one profiler for CPU, tim
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx hotpath-rsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Hotpath RS
Hotpath-rs is a Rust profiling library and MCP server that provides low-overhead CPU timing, memory allocation tracking, async/Tokio runtime monitoring, and channel throughput measurement — all in one unified tool. Developers annotate functions or blocks with simple macros and get a live TUI dashboard powered by ratatui, plus statistical summaries (average, total, p95, p99) on exit. The built-in MCP server lets AI assistants like Claude analyze profiling results and suggest optimizations without the developer manually interpreting flame graphs.
Prerequisites
- Rust toolchain (stable, 1.75 or later recommended) with cargo installed
- A Rust project with async code (Tokio) or synchronous code to profile
- An MCP client such as Claude Desktop for using the MCP server mode
- Optional: samply installed for CPU flame graph generation (cargo install samply)
Add hotpath to your Cargo.toml
Add the hotpath crate as a dependency and define the optional feature flags for the profiling modes you need.
[dependencies]
hotpath = "0.16"
[features]
hotpath = ["hotpath/hotpath"]
hotpath-cpu = ["hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath/hotpath-alloc"]Annotate synchronous functions
Add the #[hotpath::measure] attribute macro to any synchronous function you want to profile. Hotpath automatically records call count, average time, and total time.
#[hotpath::measure]
fn expensive_computation(input: &[u8]) -> Vec<u8> {
// your code here
}Annotate your async main with hotpath::main
Wrap your Tokio async main with #[hotpath::main] to enable runtime monitoring and ensure the profiling report is printed on exit.
#[tokio::main]
#[hotpath::main]
async fn main() {
// your application code
}Profile arbitrary code blocks
Use the measure_block! macro to profile sections of code that are not entire functions, giving each block a descriptive label.
hotpath::measure_block!("database_query", {
let results = db.query("SELECT * FROM users").await?;
results
});Run with profiling features enabled
Build and run your application with the hotpath and hotpath-alloc features enabled to collect timing and memory allocation data.
cargo run --features='hotpath,hotpath-alloc'Hotpath RS Examples
Client configuration
claude_desktop_config.json entry for using hotpath-rs as an MCP server to analyze Rust profiling results.
{
"mcpServers": {
"hotpath-rs": {
"command": "npx",
"args": ["hotpath-rs"],
"env": {}
}
}
}Prompts to try
Questions and tasks to ask Claude with hotpath-rs profiling data available.
- "Analyze my hotpath profiling output and identify the top 3 bottlenecks"
- "My p99 latency for the database_query block is 450ms — what are likely causes?"
- "Show me which Tokio worker threads are most saturated in my async runtime"
- "Compare memory allocation rates between my cache-hit and cache-miss code paths"
- "Suggest optimizations for functions that have high call counts but low individual time"Troubleshooting Hotpath RS
No profiling output appears when the program exits
Ensure you have added #[hotpath::main] to your async main function (or the sync equivalent) and built with the hotpath feature enabled (`--features='hotpath'`). Without the main macro, the report collection hook is not registered.
Memory allocation tracking shows zero allocations
The allocation tracker requires the hotpath-alloc feature. Run with `--features='hotpath,hotpath-alloc'`. Note that this feature replaces the global allocator, which may conflict with other custom allocators in your dependency tree.
Compile errors about conflicting feature flags
The hotpath-cpu feature enables samply-based CPU profiling and requires samply to be installed (`cargo install samply`). If you only need time and memory data, use only the hotpath and hotpath-alloc features without hotpath-cpu.
Frequently Asked Questions about Hotpath RS
What is Hotpath RS?
Hotpath RS is a Model Context Protocol (MCP) server that quickly find bottlenecks in rust - one profiler for cpu, time, memory, and async code. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Hotpath RS?
Follow the installation instructions on the Hotpath RS GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Hotpath RS?
Hotpath RS works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Hotpath RS free to use?
Yes, Hotpath RS is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Hotpath RS Alternatives — Similar Developer Tools Servers
Looking for alternatives to Hotpath RS? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Hotpath RS in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Hotpath RS?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.