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 分