A Model Context Protocol (MCP) server for analyzing Java heap dump files (.hprof). Provides tools that allow AI assistants to analyze Java heap dumps through a standardized MCP interface, backed by the NetBeans Profiler library.
HeapDump .hprof file analysis MCP server using NetBeans Profiler as a backend library
Estrelas
9
Ferramentas
—
Disponibilidade
—
Class Analysis - Browse classes sorted by instance count/size, search by exact name, regex, or BM25 full-text ranking
Instance Analysis - Get instance details with field values, paginate through instances by class, compute retained size (separate tool to isolate costly computation)
References - Get all references to an instance with pagination
GC Root Analysis - View garbage collection roots with pagination
Heap Summary & Properties - Get overview statistics and JVM system properties from the heap dump
OQL Support - Execute Object Query Language queries on the heap
Reflection-based Tool Registration - Tools are automatically generated from @Tool-annotated methods
mvn test -Dtest=HeapDumpMcpTest
mvn test -Dtest=McpClientIntegrationTest
Usage Examples
In tools like Trae, opencode, or Qwen CLI you can point to a .hprof file and ask e.g. "Find possible problems in this heap dump".
Typical Workflow
1. load_heap(file_path="dump.hprof") → Load the dump
2. get_summary() → Overview statistics
3. get_classes_by_max_instances_count() → Top classes by count
4. get_class_by_name(name="com.example.MyLeakyClass") → Inspect a suspicious class
5. get_instances(class_name="com.example.MyLeakyClass", from=0, to=5) → Browse instances
6. get_instance_by_id(id=12345) → Full details of a specific instance
7. get_instance_retained_size(id=12345) → Compute retained size (costly, separate call)
8. get_all_references(id=12345) → Find what holds this instance
Tool Response Format
Most tools return results as newline-separated text. For example:
get_class_by_name:
Name: java.util.HashMap
Instances: 152
Total Size: 24320
Superclass: java.util.AbstractMap
Static Fields:
int DEFAULT_INITIAL_CAPACITY = 16
float loadFactor = 0.75 (Instance ID: 123456789)
Fields:
java.util.HashMap$Node[] table
int size
int threshold
float loadFactor
Reflection-based Tool Factory
Tools are defined via annotations on methods in HeapDumpTools and automatically registered by ToolsFactory:
@Tool(name = "my_tool", title = "My Tool", decription = "Does something")
@Printer(impl = MyPrinter.class)
public String myToolMethod(
@Required("param1") String param1,
@Default(name = "param2", value = "50") int param2) {
// implementation
}
See src/main/java/com/onpositive/analyzer/mcp/reflection/ for annotation definitions.
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Perguntas
Como instalo Heap MCP Nb?
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Heap MCP Nb precisa de uma chave de API?
Este registro não lista nenhuma variável de ambiente obrigatória.
Qual transporte Heap MCP Nb usa?
Heap MCP Nb roda localmente via stdio.
Quando Heap MCP Nb foi verificado pela última vez?
Última verificação: 2026-10-26. HeapDump .hprof file analysis MCP server using NetBeans Profiler as a backend library