MCP server for debugging and analyzing flamegraphs using Model Context Protocol
npm install @flamedeck/flamechart-mcp
MCP server for analyzing performance profiles (Go, JavaScript, Python, etc.) using flamegraphs. Works entirely offline for local traces or with FlameDeck's hosted storage.
-----
-----
!Screenshot of FlameDeck MCP in action
- 🔍 Generate Visual Flamegraphs - Use the strong vision capabilities of reasoning llms to debug performance issues
- 🌐 Multi-Format Support - Chrome, Firefox, Node.js, pprof, stackprof and more
- 🔌 Works Offline - Only requires an API key if using flamedeck.com for trace hosting
> Allows you to reference traces stored on your local file system (e.g. /Users/johnsmith/etc)

Manual Installation:
``json`
{
"mcpServers": {
"flamechart-debug": {
"command": "npx",
"args": ["-y", "@flamedeck/flamechart-mcp"]
}
}
}
> Allows you to reference remote traces hosted at flamedeck.com

Manual Installation:
`json`
{
"mcpServers": {
"flamechart-debug": {
"command": "npx",
"args": ["-y", "@flamedeck/flamechart-mcp"],
"env": {
"FLAMEDECK_API_KEY": "your_api_key_here"
}
}
}
}
> You will need to create an API key with trace:download permissions in your Flamedeck settings.
Example prompt for Cursor:
`
Analyze this trace file and find out why my React app's rendering is slow:
/Users/developer/profiles/react-app-slow.cpuprofile
Focus on any React-related functions that might be causing bottlenecks
`
Example prompt for team collaboration:
`
My teammate shared this performance trace from production. Analyze it and help me understand the bottlenecks:
https://www.flamedeck.com/traces/98508d02-1f2a-4885-9607-ecadceb3d734
Focus on:
1. Database query performance
2. Any functions taking >100ms
`
Example prompt for API performance investigation:
``
Our API response times spiked yesterday. Root cause with this production trace:
https://www.flamedeck.com/traces/abc123...
| Tool | Description | Use Case |
|------|-------------|----------|
| get_top_functions | Find slowest functions by self/total time | Identify bottlenecks |generate_flamegraph_screenshot
| | Create visual flamegraph PNG | Share insights, reports |generate_sandwich_flamegraph_screenshot
| | Focus on specific function callers/callees | Deep-dive analysis |
FlameDeck builds on top of the incredible Speedscope project, and support all trace formats listed here. Because the code is forked, this may diverge in the future.
`bash`
yarn build
`bashBuild the package
yarn build
Publishing
1. Update version in
package.json
2. Build the package: yarn build
3. Publish: yarn publishRelated Packages
@flamedeck/upload` - Client library for uploading tracesISC