PluginBench
MCP Server
Maintained
MIT

io.github.indragiek/uniprof MCP Server

io.github.indragiek/uniprof

Universal CPU profiler for any language—profile Python, Node.js, Ruby, PHP, Java, .NET, native code, and more without code changes.

What is the io.github.indragiek/uniprof MCP server?

The uniprof MCP server is a universal CPU profiler that automatically detects and profiles applications across multiple languages and platforms (Python, Node.js, Ruby, PHP, JVM, .NET, BEAM, and native code) without requiring code modifications or dependencies. It unifies profiling output into a single format, runs statistical analysis to identify hotspots, and integrates with AI agents via the Model Context Protocol.

uniprof simplifies CPU profiling by providing a unified interface over language-specific profilers. It automatically selects the right profiler based on your application, runs it in isolated Docker containers (or on the host), and transforms varying output formats into actionable insights. Use it to profile any app, visualize flamegraphs, and identify performance bottlenecks—all without touching your code.

How to install io.github.indragiek/uniprof

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "uniprof": {
      "command": "npx",
      "args": [
        "-y",
        "uniprof",
        "mcp",
        "run"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • profile — Profile an application and analyze CPU hotspots in one step
  • record — Record a CPU profile to a JSON file for later analysis
  • analyze — Analyze recorded profile data to identify performance hotspots
  • visualize — Visualize a profile as an interactive flamegraph in the browser
  • bootstrap — Check and verify the profiling environment setup

Use cases

  • Profile Python, Node.js, Ruby, PHP, Java, .NET, or native applications to identify CPU bottlenecks
  • Generate and visualize flamegraphs to understand call stack distribution and find performance hotspots
  • Record profiles for offline analysis and share profiling results across teams
  • Profile containerized or host-based applications with automatic runtime detection
  • Integrate CPU profiling into AI-assisted code optimization workflows

io.github.indragiek/uniprof MCP server FAQ

What is uniprof?

uniprof is a universal CPU profiler that works with Python, Node.js, Ruby, PHP, JVM, .NET, BEAM, and native code. It automatically detects your application type, runs the appropriate profiler, and provides unified analysis and visualization without code changes.

Is uniprof free?

Yes, uniprof is open-source under the MIT License. The profiling tools it bundles (py-spy, 0x, rbspy, async-profiler, etc.) are also open-source with permissive licenses.

How do I install uniprof as an MCP server in Cursor or Claude?

Run `uniprof mcp install cursor` or `uniprof mcp install claudecode` to auto-install. For other clients, use `npx -y uniprof mcp run` with the stdio transport. First install uniprof globally with `npm install -g uniprof`.

What platforms does uniprof support?

uniprof runs on macOS and Linux (including WSL2). It profiles Python 3.7+, Node.js 14+, Ruby 2.5+, PHP 7.2+, Java 8+, .NET 5+, Erlang/Elixir OTP 24+, and native applications. Windows host is not directly supported.

Does uniprof require Docker?

Docker is recommended for zero-setup profiling of language runtimes (Python, Node.js, Ruby, etc.). You can also use `--mode host` to profile with locally-installed profilers. Native macOS profiling uses Instruments and requires host mode.

What output formats does uniprof provide?

uniprof records profiles as JSON, analyzes them to identify hotspots, and visualizes them as interactive flamegraphs using speedscope. Profiles can be saved, shared, and analyzed offline.

README (reference)

Source of truth, from the repository.

uniprof

uniprof simplifies CPU profiling for humans and AI agents. Profile any application without code changes or added dependencies.

# Profile and analyze any app in one step
npx uniprof python script.py

Table of Contents

Supported Platforms

uniprof implements a common interface over multiple profilers that specialize in different platforms and runtimes. It automatically detects which profiler to use based on the command being executed, runs the profiler, transforms the varying output formats into a single format, and runs statistical analysis on the data to identify hotspots.

PlatformProfilerContainerHostMin Version
Pythonpy-spy✅✅Python 3.7+
Node.js0x✅✅Node 14+
Rubyrbspy✅✅Ruby 2.5+
PHPExcimer✅✅PHP 7.2+
JVMasync-profiler✅✅Java 8+
.NETdotnet-trace✅✅.NET 5+
BEAMperf✅✅*OTP 24+
Native (macOS)Instruments❌✅Xcode 14.3+
Native (Linux)perf✅✅Linux 2.6.31+

* Linux only for host mode

System Requirements

tl;dr: macOS or Linux with Docker installed

uniprof is designed to run on macOS and Linux but has primarily been developed & tested on macOS. If you find any bugs when running on Linux, please report them. Running on a Windows host is currenly not supported, but you can run on Linux installed on Windows via WSL2. Note that when using uniprof via WSL2, profiling native Windows executables is not supported, but you can still use the profilers for the higher level language runtimes like Python and Node.js.

Profiling tools are often non-trivial to set up correctly and can require elevated privileges. To simplify set up and provide better isolation for the profiled code, uniprof defaults to using Docker containers for each runtime that are pre-configured to run specific profiling tools. uniprof mounts your workspace in the container and executes the program with the profiler attached. uniprof also supports profiling outside the container if the host system has the profiling tools installed by running with the --mode host flag. The only case where containerized execution is not supported is when profiling a native Mach-O binary on macOS, since Apple Instruments cannot run inside a container.

Installation

npm install -g uniprof

MCP Server

# Install uniprof MCP server automatically
uniprof mcp install claudecode
uniprof mcp install cursor
uniprof mcp install vscode

Supported clients for auto-installation: amp, claudecode, codex, cursor, gemini, vscode, zed

If auto-installation is not supported for your client, add an MCP server using the stdio transport with the command npx -y uniprof mcp run.

For detailed MCP documentation see docs/mcp.md.

Quick Start

Profile and analyze in one step:

# Profile most languages and get immediate analysis
uniprof python app.py
uniprof node server.js
uniprof ruby script.rb
uniprof java -jar myapp.jar
uniprof dotnet MyApp.dll
uniprof ./my-native-app

# Profile and visualize flamegraph in browser
uniprof --visualize python app.py

Save profiles to analyze and visualize later:

# 1. Check environment (optional)
uniprof bootstrap

# 2. Record a profile
uniprof record -o profile.json -- python app.py
uniprof record -o profile.json -- node server.js
uniprof record -o profile.json -- ruby script.rb
uniprof record -o profile.json -- php script.php
uniprof record -o profile.json -- java -jar myapp.jar
uniprof record -o profile.json -- ./gradlew run
uniprof record -o profile.json -- ./mvnw spring-boot:run
uniprof record -o profile.json -- dotnet MyApp.dll
uniprof record -o profile.json -- elixir script.exs
uniprof record -o profile.json -- mix run
uniprof record -o profile.json -- ./my-native-app
uniprof record -o profile.json -- /Applications/MyApp.app

# 3. Analyze profile data to find hotspots
uniprof analyze profile.json

# 4. Visualize flamegraph in the browser
uniprof visualize profile.json

For detailed command line options documentation see docs/cli.md.

Host vs. Container Modes

Use the --mode option to control how profiling runs:

  • auto (default): Prefer container mode when Docker is available; otherwise use host.
    • Language runtimes (Python/Node.js/Ruby/PHP/BEAM/JVM/.NET) default to container for zero-setup.
    • Native on macOS with Mach-O binaries uses host (Instruments). ELF binaries on macOS are supported in container mode.
    • Native on Linux defaults to container; host can be used if you prefer your local perf setup.
  • host: Force host-installed profilers.
  • container: Force Docker containers (not supported for macOS Instruments/Mach-O binaries).
# Auto mode (default)
uniprof record -o profile.json -- python script.py

# Force host profilers
uniprof record --mode host -o profile.json -- python script.py

# Force container mode
uniprof record --mode container -o profile.json -- ./my-linux-app

Compiling with Debug Information

Native profiling requires debug information for meaningful results. Debug symbols enable the profiler to map memory addresses to function names, providing readable output instead of just hexadecimal addresses. Additionally, frame pointers improve call stack accuracy, especially for optimized code.

CompilerDWARF Debug InfoFrame PointersNotes
gccgcc -g -o myapp main.cgcc -fno-omit-frame-pointer -o myapp main.cUse -g3 for maximum debug info, -ggdb for GDB-specific extensions
clangclang -g -o myapp main.cppclang -fno-omit-frame-pointer -o myapp main.cppUse -gfull on macOS for complete debug info
swiftswiftc -g main.swiftswiftc -Xcc -fno-omit-frame-pointer main.swiftDebug builds include symbols by default with swift build
cargocargo build (debug mode)<br>cargo build --release + [profile.release]<br>debug = trueRUSTFLAGS="-C force-frame-pointers=yes" cargo buildDebug builds include DWARF by default; for release builds, add debug = true to Cargo.toml
gogo build -gcflags=all="-N -l"Built-in, always enabledGo includes debug info by default; -gcflags disables optimizations for better debugging
zigzig build-exe -O Debug main.zigzig build-exe -fno-omit-frame-pointer main.zigUse -O ReleaseSafe with debug info for optimized builds with symbols
ghcghc -g -rtsopts main.hsghc -fno-omit-frame-pointer main.hsUse -prof for profiling builds; -rtsopts enables runtime profiling options

Documentation

Credits

License

All uniprof source code in this repository is licensed under the MIT License. See LICENSE.

uniprof downloads and runs Docker images that bundle third-party software. The Dockerfiles used to build these images can be found in containers/. These images and their contents are not covered by the MIT license and are governed by their own licenses. uniprof does not grant rights to those components and does not relicense them.

Related MCP servers

Governed OT data tap: 14 field protocols + cross-protocol RCA brain; audit + MOC gating.

1
Python
MIT
View repository →

Industrial-AIOps energy edition: IEC-104/DNP3/IEC-61850 read-only OT connectors on iaiops.core.

0
Python
MIT
View repository →

x402 clean article text and metadata for AI/RAG. $0.002 per successful article.

View repository →

x402-paid research, web change, metadata, article, PDF, and sitemap tools for AI agents.

View repository →

x402 structured link extraction for agents. $0.0005 per successfully processed page.

View repository →

x402 PDF text, pages, and metadata for AI/RAG. $0.0015 per successful PDF.

View repository →