mcp-mat

MCP.Pizza Chef: codelipenghui

This server lets you run Eclipse Memory Analyzer Tool (MAT) commands on Java heap dumps directly from your AI app. You can detect memory leaks, run detailed reports, execute custom queries, and explore memory usage without opening MAT manually. It works with MCP clients like Claude Code or Codex, requiring you to have Java and MAT installed on your computer. Setup is simple by adding a config snippet to your app's settings.

Coding
Other

Use This MCP server To

Analyze Java heap dumps to detect memory leaks Run built-in memory analysis reports on heap dumps Execute custom OQL queries to inspect objects Check status of MAT index files for heap dumps View thread and collection memory usage details Export heap dump data for further analysis Get summaries of top memory consumers and waste

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 availability
  • mat_parse_report — Run predefined MAT reports (leak suspects, system overview, etc.)
  • mat_oql_query — Execute OQL queries and return inline results
  • mat_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 dump
  • mat_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

mcp-mat FAQ

Can I use this to analyze Java heap dumps for memory leaks?
Yes — mcp-mat runs Eclipse MAT commands to find leaks, analyze memory, and run queries on heap dumps.
Can I run custom queries to inspect Java objects in heap dumps?
Yes — it supports OQL queries with guidance to help you write them.
Which apps can I use this with?
It works with MCP-compatible clients like Claude Code and Codex that support adding custom MCP servers.
Do I need to install Java or Eclipse MAT separately?
Yes — you must have Java and Eclipse Memory Analyzer (MAT) installed and set the MAT_HOME path.
How hard is it to set up?
Setup involves pasting a config snippet to add the server to your app, so it's copy-paste-config difficulty.
Do I need an API key or account?
No API key or account is needed, just the proper environment setup with Java and MAT.