mcp-mat
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-matrun leak suspect report on /tmp/heapdump.hprof"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: heap-seance
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)MAT_DEBUG_LOG_DIR(default/tmp/mcp-mat-logs)MAT_PRIVACY_MODE(defaultfalse)MAT_OQL_MAX_BYTES(default16384)MAT_RESULT_PREVIEW_LINES(default20)MAT_STDIO_TAIL_CHARS(default4000)
Run
npm install
npm run build
MAT_HOME=/path/to/mat node dist/src/server.jsTest
npm testInstall via npx
No build step required. Install directly from npm:
Claude Code
Add to ~/.claude/settings.json or project .claude/settings.json:
{
"mcpServers": {
"mat": {
"command": "npx",
"args": ["-y", "mcp-mat"],
"env": {
"MAT_HOME": "/Applications/MemoryAnalyzer.app/Contents/Eclipse"
}
}
}
}Codex
codex mcp add \
--env MAT_HOME=/Applications/MemoryAnalyzer.app/Contents/Eclipse \
mat \
npx -y mcp-matInstall in Claude Code (from source)
Add the MCP server to Claude Code settings (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"mat": {
"command": "node",
"args": ["/path/to/mcp-mat/dist/src/server.js"],
"env": {
"MAT_HOME": "/Applications/MemoryAnalyzer.app/Contents/Eclipse"
}
}
}
}Install in Codex (from source)
Build first:
cd /path/to/mcp-mat
npm install
npm run buildAdd MCP server to Codex:
codex mcp add \
--env MAT_HOME=/Applications/MemoryAnalyzer.app/Contents/Eclipse \
mat \
node /path/to/mcp-mat/dist/src/server.jsVerify:
codex mcp list
codex mcp get mat --jsonIf you need to update the entry:
codex mcp remove mat
# then run codex mcp add ... againEquivalent ~/.codex/config.toml entry:
[mcp_servers.mat]
command = "node"
args = ["/path/to/mcp-mat/dist/src/server.js"]
[mcp_servers.mat.env]
MAT_HOME = "/Applications/MemoryAnalyzer.app/Contents/Eclipse"Available Tools
5 toolsmat_healthcheckC
Validate MAT launcher and Java runtime availability.
| Name | Required | Description | Default |
|---|---|---|---|
| mat_home | No | ||
| java_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It states the tool validates, but it does not explain side effects (likely none), required permissions, rate limits, or output format. With zero behavioral context, the AI agent cannot anticipate the tool's impact or constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that communicates the core purpose without extraneous words. While it is very brief, it earns its place by being direct. However, it could be slightly more informative without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description should provide a more complete picture of what the tool returns (e.g., success/failure status, details of validation). It also omits any information about error handling or the scope of validation. The sibling tools suggest a suite of MAT-related operations, but this description does not integrate the health check into that context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning the input schema provides no parameter descriptions. The tool description mentions 'MAT launcher and Java runtime availability,' which hints at the purpose of 'mat_home' and 'java_path,' but does not explicitly define their meaning, expected format, or whether they are required. This leaves significant ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Validate MAT launcher and Java runtime availability.' It uses a specific verb ('validate') and resource ('MAT launcher and Java runtime availability'), and it distinguishes the tool from its siblings (which focus on index status, OQL queries, specifications, and reports). This makes the tool's role in the ecosystem obvious.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or cases where another tool like 'mat_index_status' would be more appropriate. This leaves the AI agent without decision-making support for selecting this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_index_statusB
Report whether MAT index artifacts already exist for a heap dump.
| Name | Required | Description | Default |
|---|---|---|---|
| heap_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It indicates a read-only status check, which is a clear behavioral trait. However, it does not disclose error handling or what happens on invalid input (e.g., nonexistent heap path). This is adequate for a simple tool but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 11 words, front-loading the verb and objective. Every word is meaningful; there is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description should specify the return type or format (e.g., boolean, message). It does not, leaving ambiguity about the report output. This is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has one required parameter 'heap_path' with no description in the schema (0% coverage). The tool description does not explain what 'heap_path' represents (e.g., filesystem path, URL) or any constraints. This provides no value beyond the parameter name itself.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Report whether MAT index artifacts already exist for a heap dump.' It specifies a verb ('Report'), a resource ('MAT index artifacts'), and the object ('heap dump'). This differentiates it from sibling tools like mat_healthcheck or mat_oql_query, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, or any prerequisites or limitations. It does not mention when not to use it or how it relates to other sibling tools. The usage context is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_oql_queryC
Execute a single MAT OQL query and return result artifacts.
| Name | Required | Description | Default |
|---|---|---|---|
| oql | Yes | ||
| limit | No | ||
| unzip | No | ||
| format | No | ||
| xmx_mb | No | ||
| heap_path | Yes | ||
| timeout_sec | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden of disclosing behavioral traits. It only states that it executes a query and returns results, but does not mention potential side effects, auth requirements, rate limits, or error handling expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and front-loaded with the key action. It is concise and contains no filler, though it could be slightly more informative without losing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's 7 parameters, no output schema, and no annotations, the description is insufficient. It does not explain the purpose of OQL, the role of heap_path, or what 'result artifacts' entail, leaving critical gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds no meaning beyond the parameter names. The single sentence does not explain the purpose or effect of any of the 7 parameters (e.g., heap_path, oql, limit, format).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes a single MAT OQL query and returns result artifacts. It uses a specific verb and resource, and the sibling tools suggest different purposes (e.g., healthcheck, spec), but the description does not explicitly distinguish itself from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like mat_oql_spec or mat_healthcheck. There is no mention of prerequisites, when not to use it, or recommended use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_oql_specA
Return MAT OQL parser-mode guidance, supported patterns, and known limitations.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full weight. It implies a read-only, informative operation, but does not detail any behavioral traits such as data source, caching, or error handling. Adequate but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no fluff. Clearly conveys the purpose with front-loaded key terms. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and no output schema, the description covers the purpose well. It specifies what is returned (guidance, patterns, limitations), which is sufficient for a spec tool. Minor improvement would be to mention the format of the output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist in the schema, so schema coverage is 100%. The description adds no param info, which is fine. Baseline score 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns MAT OQL parser-mode guidance, supported patterns, and known limitations, with a specific verb 'Return' and a distinct resource. It differentiates from sibling tools like mat_oql_query (which executes queries) and mat_parse_report.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like mat_oql_query or mat_parse_report. The description lacks context about prerequisites or typical usage scenarios, leaving the agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_parse_reportC
Run a predefined MAT report headlessly and return generated artifacts.
| Name | Required | Description | Default |
|---|---|---|---|
| xmx_mb | No | ||
| options | No | ||
| heap_path | Yes | ||
| report_id | Yes | ||
| timeout_sec | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states 'run headlessly' but does not disclose side effects, authentication needs, resource consumption, or what 'artifacts' are returned. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no redundancy. However, it is under-specified; conciseness is not valued over informativeness. Adequate but not optimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has 5 parameters including nested objects, no output schema, and no annotations. Description fails to explain return value format, parameter meanings, or preconditions. Severely incomplete for this complexity level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and description provides no parameter information. The five parameters (heap_path, report_id, xmx_mb, options, timeout_sec) are completely unexplained. Baseline for low coverage requires compensation, which is absent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'Run' and resource 'predefined MAT report', mentions 'headlessly' and 'return generated artifacts'. It distinguishes from sibling tools like mat_oql_query and mat_healthcheck, but could be more explicit about what a MAT report is.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Does not specify prerequisites, context, or when not to use. Agent must infer usage from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
mat_healthcheck - First observed
mat_index_status - First observed
mat_oql_query - First observed
mat_oql_spec - First observed
mat_parse_report
TDQS
Each tool serves a distinct purpose: environment validation, index checking, OQL query execution, OQL specification guidance, and report parsing. No overlaps or ambiguities exist.
All tool names follow a consistent 'mat_' prefix with snake_case, and each verb clearly indicates the action. The naming pattern is uniform and predictable.
With 5 tools covering essential MAT operations, the count is well-scoped. It is neither too sparse nor bloated for the server's purpose.
Core workflows (health, indexing, OQL queries, reports) are covered. A minor gap is the lack of tools to list or define custom reports, but the surface is otherwise complete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP Server for JFrog, providing tools for development and artifact management.
MCP server to assist with JxBrowser development.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server based on Puppeteer and Chrome DevTools Protocol for advanced browser debugging, performance analysis, and memory detection. It enables users to inspect DOM elements, monitor console errors, capture screenshots, and perform heap snapshot analysis through persistent browser connections.10311MIT
- AlicenseCqualityCmaintenanceMCP server that provides 8 tools for Java memory leak investigation: \- Class histograms, GC pressure snapshots, JFR recordings, heap dumps, MAT leak suspects analysis, async-profiler allocation profiles \- Structured confidence-based verdicts (none/low/medium/high) requiring independent signal corroboration \- Designed for use inside Claude Code with two slash commands84Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for profiling Java applications via JDK utilities (jcmd, jfr, jps). Enables AI assistants to diagnose performance, analyze threads, and inspect JFR recordings without manual CLI usage.266410MIT
- AlicenseNot gradedqualityDmaintenanceHeadless MCP server for IDA Pro enabling on-demand database loading and programmatic reverse engineering workflows via MCP tools.18MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/codelipenghui/mcp-mat'
If you have feedback or need assistance with the MCP directory API, please join our Discord server