Skip to main content
The CodSpeed MCP server gives AI-powered tools direct access to your performance data — benchmark runs, comparisons, and flamegraphs — so you can investigate regressions, explore profiling results, and review performance changes without leaving your editor or chat interface. The server follows the Model Context Protocol (MCP) specification and is hosted by CodSpeed at
https://mcp.codspeed.io/mcp

Getting started

Add the CodSpeed marketplace and install the plugin:
/plugin marketplace add CodSpeedHQ/codspeed
/plugin install codspeed
Alternatively, you can add the MCP server directly:
claude mcp add --transport http CodSpeed https://mcp.codspeed.io/mcp
Claude Code will open a browser window to authenticate with CodSpeed via OAuth on first use.

Example prompts

Once connected, you can ask your AI assistant questions like:
  • “Explain the regression on the feat/my-great-feature branch.”
  • “Make my foo_bar function faster.”
  • “What are the hottest functions in the bench_foo benchmark?”
  • “Analyze the flamegraph for bench_parse and refactor the hot path.”
  • “Compare the flamegraphs of bench_serialize between main and feat/new-encoder and explain what changed.”
  • “Find the bottleneck in bench_api_handler and open a PR to fix it.”
Because the MCP server runs inside coding agents, your assistant can cross-reference flamegraph hot spots with your actual source code — then suggest or apply optimizations directly.

Available tools

The CodSpeed MCP server exposes four tools:
ToolDescription
list_repositoriesList all CodSpeed-enabled repositories you have access to, including visibility and descriptions.
list_runsList recent performance runs for a repository, with optional filters for branch, event type, and status.
compare_runsCompare two performance runs and return a detailed report with regressions, improvements, and new benchmarks.
query_flame_graphQuery flamegraph profiling data for a specific benchmark in a run, showing hot spots and the call tree.

Authentication

The CodSpeed MCP server uses OAuth for authentication. When you first connect, your MCP client will open a browser window where you log in to CodSpeed and authorize access. The client stores the resulting token and refreshes it automatically — no API keys to manage.
The MCP server has access to the same repositories and data as your CodSpeed account.