
用于 Eclipse MAT 的无头 MCP 服务器,使用直接的 Java -jar 执行org.eclipse.equinox.launcher_*.jar。
概览
用于 Eclipse MAT 的无头 MCP 服务器,使用直接的 Java -jar 执行org.eclipse.equinox.launcher_*.jar。 - mat_healthcheck — 验证 MAT 启动器和 Java 运行时可用性 - mat_parse_report — 运行预定义的 MAT 报告(泄漏疑似、系统概览等) - mat_oql_query — 执行 OQL 查询并返回内联结果 - mat_run_command — 执行 56 个内置 MAT 分析命令(直方图、dominator_tree、path2gc、thread_overview 等) - mat_index_status — 检查堆转储中是否存在 MAT 索引伪影 - mat_oql_spec — 返回 OQL 解析器指导及支持的模式 dominator_tree,show_dominator_tree,immediate_dominators,big_drops_in_dominator_tree 直方图、delta_histogram*、list_objects、group_by_value、duplicate_classes 泄密猎人,漏网者2*,find_leaks,find_leaks2*,reference_leak thread_overview,thread_details,thread_stack collection_fill_ratio,collections_grouped_by_size,array_fill_ratio,arrays_grouped_by_size,hash_entries,...
概述(AI 翻译)
用于Eclipse MAT的无头MCP服务器,使用直接java -jar org.eclipse.equinox.launcher_*.jar执行。
特色
mat_healthcheck— 验证MAT启动器和Java运行时可用性mat_parse_report— 运行预定义的MAT报告(泄漏嫌疑人、系统概况等)mat_oql_query— 执行OQL查询并返回内联结果mat_run_command— 执行56个内置MAT分析命令(直方图、dominator_tree、path2gc、thread_overview等)mat_index_status— 检查堆转储是否存在MAT索引伪影mat_oql_spec— 返回OQL解析器指导和支持的模式
支持命令 (mat_run_command)
支配者树分析
dominator_tree, show_dominator_tree, immediate_dominators, big_drops_in_dominator_tree
走进GC根源之路
path2gc, merge_shortest_paths, gc_roots
直方图与对象列表
histogram, delta_histogram*, list_objects, group_by_value, duplicate_classes
泄漏检测
leakhunter, leakhunter2, find_leaks, find_leaks2, reference_leak
线索分析
thread_overview, thread_details, thread_stack
收藏分析
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mcp-mat
Headless MCP server for Eclipse MAT using direct java -jar org.eclipse.equinox.launcher_*.jar execution.
Features
mat_healthcheck— Validate MAT launcher and Java runtime availabilitymat_parse_report— Run predefined MAT reports (leak suspects, system overview, etc.)mat_oql_query— Execute OQL queries and return inline resultsmat_run_command— Execute 56 built-in MAT analysis commands (histogram, dominator_tree, path2gc, thread_overview, etc.)mat_index_status— Check whether MAT index artifacts exist for a heap dumpmat_oql_spec— Return OQL parser guidance and supported patterns
Supported Commands (mat_run_command)
Dominator tree analysis
dominator_tree, show_dominator_tree, immediate_dominators, big_drops_in_dominator_tree
Path to GC roots
path2gc, merge_shortest_paths, gc_roots
Histogram & object listing
histogram, delta_histogram*, list_objects, group_by_value, duplicate_classes
Leak detection
leakhunter, leakhunter2, find_leaks, find_leaks2, reference_leak
Thread analysis
thread_overview, thread_details, thread_stack
Collection analysis
collection_fill_ratio, collections_grouped_by_size, array_fill_ratio, arrays_grouped_by_size, hash_entries, map_collision_ratio, extract_list_values, hash_set_values, primitive_arrays_with_a_constant_value
Reference analysis
references_statistics, weak_references_statistics, soft_references_statistics, phantom_references_statistics, finalizer_references_statistics
Finalizer analysis
finalizer_overview, finalizer_thread, finalizer_queue, finalizer_in_processing, finalizer_thread_locals
Retained set
show_retained_set, customized_retained_set
Component & top consumers
component_report, component_report_top, top_consumers, top_consumers_html, pie_biggest_objects
String & memory waste
find_strings, waste_in_char_arrays
Heap info & misc
heap_dump_overview, unreachable_objects, system_properties, class_references, comparison_report*
Eclipse/OSGi specific
bundle_registry, leaking_bundles
Export
export_hprof
* Requires a baseline heap dump (second .hprof file).
OQL mode notes
- This server normalizes client OQL input and wraps it for MAT parse-app command mode.
- You can send OQL with or without outer quotes.
- For class ranking and top consumers, prefer
mat_parse_reportwithorg.eclipse.mat.api:overviewand parseClass_Histogram*.txt. - For object inspection, use simple field-level OQL patterns (
INSTANCEOF,OBJECTS 0x...).
Environment
All environment variables are optional:
MAT_HOMEMAT_LAUNCHERJAVA_PATH(defaultjava)MAT_XMX_MB(default4096)MAT_TIMEOUT_SEC(default1800)MAT_CONFIG_DIR(default/tmp/mat-config)MAT_DATA_DIR(default/tmp/mat-workspace)MAT_DEBUG(defaultfalse)
安装
npx -y mcp-mat配置
{
"mcpServers": {
"mat": {
"command": "npx",
"args": ["-y", "mcp-mat"],
"env": {
"MAT_HOME": "/Applications/MemoryAnalyzer.app/Contents/Eclipse"
}
}
}
}