JProfiler

io.github.ej-technologies由 GitHub 帳號 ej-technologies 發布v16.3.0更新於 Oct 29, 2026

Java profiling with AI agent integration. Profile CPU, memory, JDBC, HTTP and more.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

JProfiler MCP 讓 AI 助理對 Java 應用程式進行效能分析:錄製 CPU、記憶體、JDBC 與 HTTP 資料,並查詢快照和堆積轉儲。

可以做什麼
  • 探索並連接 JVM:列出本機或 Docker 中的 JVM、依 PID 附加,或取得用於分析新程序的 JVM 啟動參數。
  • 控制錄製:查看工作階段狀態、停止錄製,並執行執行緒轉儲、MBean 快照、堆積轉儲等即時操作。
  • 載入與比對快照:開啟既有的 .jps、.hprof 或 .jfr 檔案,支援基準與執行結果的比對。
  • 分析資料:以 jq 運算式查詢效能與堆積資料集,追蹤物件參照關係並展開呼叫樹。
  • 從執行中的 JVM 擷取堆積轉儲,檢視類別直方圖、最大物件與實例。
適用情境
適合在 AI 程式助理中排查 Java 效能問題:找出 CPU 熱點、緩慢的 JDBC 或 HTTP 呼叫、鎖定競爭、記憶體洩漏或配置問題,並讓助理直接讀取分析資料,不必手動匯出報告。
執行需求
以本機 stdio 程序執行,通常透過 npx 從 npm 套件啟動,因此需要 Node.js 以及下載套件的網路存取。它針對本機或 Docker 容器中的 JVM;未宣告任何 API 金鑰或環境變數。手動錄製 .jps 的工作流程意味著需要安裝 JProfiler。
安裝前請注意
附加到 JVM 會啟動即時錄製工作階段並持續蒐集效能資料,直到被停止;堆積轉儲可能很大,並可能使目標應用程式變慢或暫停。錄製設定與堆積腳本由助理提供,在正式或共用系統上應先確認錄製內容。快照和堆積轉儲包含類別名稱、SQL 和物件內容等應用程式內部資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 JProfiler,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

JProfiler MCP Server

[ej-technologies/jprofiler-mcp MCP server]

JProfiler is a Java profiler with AI agent integration via the Model Context Protocol. Profile CPU hotspots, memory allocations, JDBC queries, HTTP calls and more directly from your AI coding assistant.

Installation

Claude Code

claude mcp add jprofiler -- npx -y @ej-technologies/jprofiler-mcp

Codex

codex mcp add jprofiler -- npx -y @ej-technologies/jprofiler-mcp

Cursor

Listed on cursor.directory.

[Install MCP Server]

Other MCP clients

Use the following npx invocation as the MCP server command in your client's configuration:

npx -y @ej-technologies/jprofiler-mcp@latest

For clients that use a JSON configuration file (Claude Desktop, Antigravity, Windsurf, VS Code, etc.):

json
{  "mcpServers": {    "jprofiler": {      "command": "npx",      "args": ["-y", "@ej-technologies/jprofiler-mcp"]    }  }}

License

JProfiler requires a license. On first use, you can start a free 10-day evaluation or enter an existing license key. Purchase at https://www.ej-technologies.com/store/jprofiler.

License terms: https://www.ej-technologies.com/jprofiler/license

來源:README.md,提交 3da0cb8

工具

8

prepare_profiling

Prepare a profiling session by retrieving a JVM parameter to be added to a Java process call to record performance data with stack traces for the following subsystems: cpu, jdbc, jpa, mongo_db, cassandra, http_server, http_client, ws, jndi, jms, kafka_consumer, rmi, grpc, ai, process. The result is a JSON object containing a 'jvmParameter' to be added (quoted) to the Java process at startup. Add it verbatim and do not create or modify any files; the configuration is already set up for you. If the result contains 'additionalJvmParameters' (discovery of injected custom probes), add each element as a separate VM argument as well. Keep this MCP server running and run the Java process. It waits for the server to connect before application startup. During recording, attached_action can perform live actions. The recording is saved automatically when the JVM terminates, after the optional maximum duration, or when check_status is called with 'stopRecording: true'. Then call check_status to access the data - do not load the saved snapshot file yourself. Saving disconnects from the JVM. Use attach with its PID for another recording if it is still running.

輸入參數delaymaximumDurationrecordingConfig

load_snapshot

Load an existing .jps, .hprof, or .jfr file for analysis. You must call check_status to check the loading progress and - after this returns 'data_ready' - retrieve data with the query tool. To compare two performance snapshots, load both in a single call: set filePath to the run to analyze and baselineFilePath to the baseline; the differences are then reported in the hotspots and call trees of that run.

輸入參數filePath必填baselineFilePath

attach

Attach to a running JVM by PID or to a JVM inside a Docker container. Records performance data for the following subsystems: cpu, jdbc, jpa, mongo_db, cassandra, http_server, http_client, ws, jndi, jms, kafka_consumer, rmi, grpc, ai, process until check_status is called with 'stopRecording: true', or allocation data when "recordingConfig": {"recordAllocations": true} is passed. Pass "recordingConfig": {"recordMonitors": true} to additionally record monitor and lock events. You can use list_jvms to discover JVMs.

輸入參數pidrecordingConfigcontainerNameOrId

check_status

Check the status of a profiling session and discover which subsystems were recorded. Can be used to stop recording. When the data is ready provides information about the recorded subsystems (e.g. cpu, jdbc, http_client).

輸入參數stopRecording

query

Query a performance or heap dataset with a jq expression and return the result. The dataset is materialized lazily and cached per session. Each query is independent, there is no current object: builtins take explicit ids bound from earlier results, e.g. .instances[0].id as $id | {value: preview($id), keptAliveBy: pathToRoot($id).paths[0].path | map(.class)}

輸入參數idoptosetargsfromlinenamesorttextclassfield另有 40 個

create_heap_dump

Dump the heap of a locally running JVM or of a JVM inside a Docker container and load it for analysis. If allocation data is recorded for the JVM, the heap dump includes per-object allocation data. A recording session delivers a single heap dump, for a later dump attach again. You must call check_status to check the loading progress and - after this returns 'data_ready' - retrieve data with the query tool. You can use list_jvms to discover JVMs.

輸入參數pidcontainerNameOrId

attached_action

Perform a point-in-time action on the connected JVM: thread and monitor dumps, heap marking and heap dumps, MBean snapshots, and starting or stopping subsystem recording. Requires a recording session started with attach or prepare_profiling. The action names and parameters are the same as for the actions of recordingConfig.triggers.

輸入參數cpulabelaction必填filterfullGcprobesmonitorscomplexityallocationsincludeVirtualThreads

list_jvms

List locally running JVMs or JVMs running in a Docker container with their command line and PID. Use the information to call attach or create_heap_dump.

輸入參數containerNameOrId

版本歷史

2
  1. v16.3.0最新Oct 26, 2026
  2. v16.2.1Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分