0.2.6 • Published 5 months ago

@flamedeck/flamechart-mcp v0.2.6

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

🔥 Flamechart MCP Server

Install MCP Server

MCP server for analyzing performance profiles (Go, JavaScript, Python, etc.) using flamegraphs. Works entirely offline for local traces or with FlameDeck's hosted storage.


📖 Documentation🎥 Demo Video🔑 Get API Key


Screenshot of FlameDeck MCP in action

✨ Features

  • 🔍 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

🚀 Quick Start

Local Files Only (No API Key)

Allows you to reference traces stored on your local file system (e.g. /Users/johnsmith/etc)

Install MCP Server

Manual Installation:

{
  "mcpServers": {
    "flamechart-debug": {
      "command": "npx",
      "args": ["-y", "@flamedeck/flamechart-mcp"]
    }
  }
}

Remote FlameDeck Traces (API Key Required)

Allows you to reference remote traces hosted at flamedeck.com

Install MCP Server

Manual Installation:

{
  "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.

Practical Examples for Cursor/AI Assistants

Analyzing Local Trace Files

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

Analyzing Remote Flamedeck Traces

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...

🛠️ Available Tools

ToolDescriptionUse Case
get_top_functionsFind slowest functions by self/total timeIdentify bottlenecks
generate_flamegraph_screenshotCreate visual flamegraph PNGShare insights, reports
generate_sandwich_flamegraph_screenshotFocus on specific function callers/calleesDeep-dive analysis

📁 Supported Formats

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.

Development

Building

yarn build

Testing Locally

# Build the package
yarn build

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/cli.js

Publishing

  1. Update version in package.json
  2. Build the package: yarn build
  3. Publish: yarn publish

Related Packages

License

ISC

0.2.6

5 months ago

0.2.5

6 months ago

0.2.4

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago