
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server and CLI toolkit for investigating Java memory leaks using jcmd, jmap, jstat, JFR, Eclipse MAT and async-profiler.
Heap Seance is cataloged as an MCP server attributed to segfaultsorcerer. An MCP server and CLI toolkit for investigating Java memory leaks using jcmd, jmap, jstat, JFR, Eclipse MAT and async-profiler. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Heap Seance are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It reports none, low, medium and high, where high requires histogram, GC and MAT/JFR signals together.
Yes, it also offers a CLI that can run scan or deep modes directly.
Histogram, GC and MAT analysis work fully on Java 8 targets, but JFR is skipped due to format incompatibility.
README.md · 908ec5d8ff92 · 采集于 2026-11-13 12:13:34 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
Summoning retained objects from the heap — so you can interrogate what refuses to die.
An MCP server + CLI toolkit that channels the spirits of jcmd, jmap, jstat, jfr, Eclipse MAT, and async-profiler into a structured leak investigation workflow — designed to run inside Claude Code.
2 slash commands. 8 MCP tools. Conservative by default.
How It Works • Quick Start • MCP Tools • Workflow • Prerequisites • Contributing
Heap Seance follows a two-stage escalation model. No deep forensics unless the evidence demands it.
/leak-scan /leak-deep
| |
v v
3x class histogram (all of scan, plus)
+ GC pressure snapshot JFR recording
| heap dump
v MAT leak suspects
monotonic growth? async-profiler alloc profile
old-gen pressure? |
| v
+--- both true? -----> auto-escalate to deep
|
+--- otherwise ------> verdict + next steps
Confidence is earned, not assumed. high requires at least two independent strong signals. A single growing class is watch. Growth plus GC pressure is suspicious. Add a MAT dominator or JFR correlation and you get probable_memory_leak.
Requires uv, Python 3.10+, and a JDK 17+ for tooling (the target app can run any Java version).
git clone https://github.com/your-org/heap-seance.git
.mcp.json to your Java projectIn the project you want to investigate, create a .mcp.json:
{
"mcpServers": {
"heap-seance": {
"command": "uv",
"args": ["run", "--directory", "/path/to/heap-seance", "python", "-m", "heap_seance_mcp.server"],
"env": {
"JAVA_HOME": "/path/to/jdk-17",
"MAT_BIN": "/path/to/ParseHeapDump.sh",
"ASYNC_PROFILER_BIN": "/path/to/asprof"
}
}
}
}
--directory points to where you cloned Heap Seance. uv run handles the virtual environment and dependencies automatically. ASYNC_PROFILER_BIN is optional — if missing, deep mode continues with JFR + MAT.
Copy the .claude/commands/ folder into your Java project so the /leak-scan and /leak-deep slash commands are available:
cp -r /path/to/heap-seance/.claude/commands/ .claude/commands/
/leak-scan my-service # conservative scan
/leak-deep 12345 # full forensics by PID
Heap Seance resolves the target process, collects evidence, and returns a structured verdict.
| Tool | What it does |
|---|---|
java_list_processes() | Discover running JVMs via jcmd -l |
java_class_histogram(pid) | Snapshot live object counts per class |
java_gc_snapshot(pid) | Sample jstat -gcutil over time |
java_jfr_start(pid) | Capture a JFR recording |
java_jfr_summary(jfr_file) | Summarize JFR event types and counts |
java_heap_dump(pid) | Full heap dump (.hprof) |
java_mat_suspects(heap_dump) | Run MAT leak suspects analysis |
java_async_alloc_profile(pid) | Allocation flame graph via async-profiler |
Every tool returns the same unified schema:
{
"status": "ok | warn | error",
"evidence": ["..."],
"metrics": {},
"confidence": "none | low | medium | high",
"next_recommended_action": "...",
"raw_artifact_path": "..."
}
/leak-scan <name-or-pid> — takes the first histogram snapshot.Confidence, Key Evidence, Suspect Types./leak-deep <name-or-pid> if the scan flags growth, or if you want full forensics regardless./leak-scan again to confirm the signal drops..jfr, .hprof, and MAT reports are saved for team review./leak-scan returns: Verdict, Confidence, Key Evidence, Suspect Types, Artifacts, Next Steps.
/leak-deep goes further: Verdict, Confidence, Root Holder Hypothesis (who retains the growing objects and via which field/chain), Supporting Evidence, Artifacts, Remediation Hypotheses (concrete fix suggestions), Verification Plan.
| Confidence | What it means | Signals required |
|---|---|---|
none | No leak evidence | — |
low | Weak growth, no GC pressure | histogram only |
medium | Growth + GC is losing | histogram + GC pressure |
high | Probable leak, corroborated | histogram + GC + MAT/JFR |
Tooling JDK (required):
jcmd, jmap, jstat — set via JAVA_HOME in .mcp.jsonDeep forensics (for /leak-deep):
ParseHeapDump.sh / .bat) — required for deep modeOptional tools:
jfr CLI — used for JFR summary if available, falls back to jcmd JFR.view otherwise. JFR is skipped entirely for Java 8 targets (incompatible format).Check your setup:
./scripts/check_prereqs.sh # macOS / Linux
scripts\check_prereqs.bat # Windows
Set these in your .mcp.json env block (recommended) or as shell variables:
| Variable | Required | Description |
|---|---|---|
JAVA_HOME | recommended | JDK 17+ installation path — $JAVA_HOME/bin is searched first for jcmd, jmap, jstat, jfr. Also used to launch MAT with the correct Java version. |
MAT_BIN | for deep mode | Path to ParseHeapDump.sh (macOS/Linux) or .bat (Windows) |
ASYNC_PROFILER_BIN | optional | Path to async-profiler binary — tie-breaker evidence, deep mode works without it |
HEAP_SEANCE_ARTIFACT_DIR | optional | Where .jfr, .hprof, and reports are saved (default: system temp dir) |
MCP_TRANSPORT | optional | Transport protocol: stdio (default), sse, or streamable-http |
MCP_HOST | optional | Bind address for SSE/HTTP transport (default: 0.0.0.0) |
MCP_PORT | optional | Port for SSE/HTTP transport (default: 8000) |
CLI flags --sse and --streamable-http can be used instead of MCP_TRANSPORT.
See .mcp.json.example for a full config template.
ParseHeapDump.bat. async-profiler is optional — if missing, deep mode continues with JFR + MAT. Locale-specific decimal separators (comma vs dot) in jstat output are handled automatically.JAVA_HOME, so it works even if the system default Java is too old for MAT.uv run heap-seance --mode scan --match your-app
uv run heap-seance --mode deep --pid 12345 --output json
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
python3 -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
pip install -e .
heap-seance --mode scan --match your-app
python3 -m unittest discover -s tests -p "test_*.py"
Example Java scenarios for validation live in examples/java-scenarios/ — a real leak, a bounded cache (no leak), and a burst allocator (no leak).
Contributions welcome! See CONTRIBUTING.md for guidelines on adding tools, signals, and skills.
This project is dual-licensed under either of
at your option.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Heap Seance from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/heap-seance)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.