pprof-analyzer
This is a Model Context Protocol (MCP) server implemented in Go, providing a tool to analyze Go pprof performance profiles.
claude mcp add --transport stdio zephyrdeng-pprof-analyzer-mcp docker run -i pprof-analyzer-mcp
How to use
The Pprof Analyzer MCP Server provides a collection of tooling to analyze Go pprof profiles directly through the MCP framework. It offers an analyze_pprof tool capable of processing CPU, heap, goroutine, allocs, mutex and block profiles and returning results in multiple formats (text, markdown, json, and flamegraph-json). In addition, you can generate flamegraphs via generate_flamegraph, launch an interactive pprof UI on macOS with open_interactive_pprof, compare two profiles with compare_profiles, and detect memory leaks by comparing heap snapshots with detect_memory_leaks. The server is designed to work with standard MCP clients and can be connected via a docker command or other integration methods supported by MCP clients. You can request Top N results, switch output formats, and generate structured data suitable for visualization.
How to install
Prerequisites:
- Docker installed and running (recommended for this MCP server).
- Optional: Go toolchain if you prefer building from source locally instead of using Docker.
Using Docker (recommended):
- Build the Docker image locally (if not already built by the maintainer): docker build -t pprof-analyzer-mcp .
- Run the MCP server with Docker (as described in the README): docker run -i --rm pprof-analyzer-mcp
Alternative: Build from source (Go required)
- Ensure Go 1.18+ is installed.
- Clone the repository and navigate to the project root.
- Build the executable: go build
- Run the server binary directly (if the project exposes an MCP entrypoint): ./pprof-analyzer-mcp
If you plan to run via npm/pipx/uvx/etc., please refer to the project’s official deployment notes for any additional steps, but the Docker path is the simplest to ensure environment consistency.
Additional notes
Notes and tips:
- The Docker image for pprof-analyzer-mcp bundles Graphviz, which is required for flamegraph generation when using generate_flamegraph.
- For open_interactive_pprof on macOS, ensure the go toolchain is available in PATH. This tool may operate in the background and will report its PID upon success.
- The tool set includes compare_profiles for regression testing across profile runs and detect_memory_leaks for memory growth analysis; these can produce output in text, markdown, or JSON formats depending on client configuration.
- If you customize the MCP client to connect to the docker-based server, ensure the client’s mcp.json points to the correct command and that Docker permissions allow container execution from the client environment.
- Environment variables (e.g., for custom paths or API endpoints) can be added to the mcp_config under an env block if needed by your deployment context.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go