
Uniprof
io.github.indragiek由 GitHub 账号 indragiek 发布v0.3.4更新于 Oct 24, 2026
Universal CPU profiler designed for humans and AI agents
概览
Uniprof 是一个本地 CPU 性能分析 MCP 服务器,让助手对多种语言运行时的应用进行性能分析并定位热点。
- 可以做什么
- 无需修改代码或添加依赖,即可对 Python、Node.js、Ruby、PHP、JVM、.NET、BEAM 和原生代码进行性能分析,并根据所执行的命令自动选择分析器。将性能数据记录到文件以便后续使用。分析已记录的性能数据以找出热点。在浏览器中以火焰图可视化结果。检查环境并为受支持的客户端安装 MCP 服务器。
- 适用场景
- 适合需要助手排查应用为何变慢、定位 CPU 热点,或针对不同语言运行时的脚本和服务采集并比较性能数据的场景。
- 运行要求
- 通过 npm(npx uniprof mcp run)作为本地进程运行,支持 macOS 或 Linux;Windows 仅能通过 WSL2 使用。推荐安装 Docker,容器化分析默认使用 Docker;主机模式需要自行安装各分析器。原生代码分析需要构建中包含调试信息和帧指针。
安装
在 SourceWeft 中
- 打开 控制台中的 Uniprof,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
uniprof
uniprof simplifies CPU profiling for humans and AI agents. Profile any application without code changes or added dependencies.
Table of Contents
- Supported Platforms
- System Requirements
- Installation
- Quick Start
- Compiling with Debug Information
- Documentation
- Credits
- License
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.
* 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
MCP Server
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:
Save profiles to analyze and visualize later:
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).
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.
Documentation
Credits
- py-spy (MIT) is used for Python profiling. Included in the uniprof-python image.
- 0x (MIT) is used for Node.js profiling. Included in the uniprof-nodejs image.
- rbspy (MIT) is used for Ruby profiling. Included in the uniprof-ruby image.
- Excimer (Apache 2.0) is used for PHP profiling. Included in the uniprof-php image.
- async-profiler (Apache 2.0) is used for JVM profiling. Included in the uniprof-jvm image.
- dotnet-trace (MIT) is used for .NET profiling. Included in the uniprof-dotnet image.
- perf (GPL) is used for native profiling on Linux. Included in the uniprof-native and uniprof-beam images.
- speedscope (MIT) is bundled with uniprof and used for flamegraph visualization
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.
来源:README.md,提交 e088547
工具
0版本历史
1- v0.3.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分