Summoning retained objects from the heap — so you can interrogate what refuses to die.
Highlights
- 8 MCP tools —
jcmd,jmap,jstat,jfr, heap dump, MAT leak suspects, async-profiler allocation profiles - 2 slash commands —
/leak-scan(conservative) and/leak-deep(full forensics) - Two-stage escalation — deep forensics only when both monotonic growth and GC pressure are detected
- Confidence model —
none→low→medium→high, requiring independent signal corroboration forhigh - Interactive sampling — prompts you to exercise the suspect behavior between histogram snapshots
Compatibility
- Java 8+ targets — JFR gracefully skipped for Java 8 (v0.9 format), histogram + GC + MAT work fully
- Windows — locale-aware
jstatparsing (comma decimals),.exeresolution viaJAVA_HOME, MAT.batsupport - JAVA_HOME — used for JDK tool resolution and MAT launch, so MAT works even if system Java is too old
Quick Start
git clone https://github.com/SegfaultSorcerer/heap-seance.gitAdd .mcp.json to your Java project, copy .claude/commands/, and run /leak-scan <your-app>. See the README for full setup.
Requirements
- Python 3.10+
- uv (recommended) or pip
- JDK 17+ for tooling
- Eclipse MAT CLI for deep mode
- async-profiler (optional)