
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 分