MCP JVM Diagnostics

by dmitriusan

Not rated
GitHub

About

JVM diagnostics MCP server for thread dump and GC log analysis. Detects deadlocks, lock contention, and GC pressure. Runs via npx on Node.js — no JVM or Docker required.

Details

Author
dmitriusan
Categories
Developer Tools, Other, Infrastructure

Setup

Install MCP JVM Diagnostics in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/dmitriusan/mcp-jvm-diagnostics

Follow the installation instructions in the repository README, then restart your MCP client.

JVM diagnostics MCP server for thread dump and GC log analysis. Detects deadlocks, lock contention, and GC pressure. Runs via npx on Node.js — no JVM or Docker required.

A Model Context Protocol (MCP) server that gives AI assistants the ability to analyze JVM thread dumps and GC logs. It detects deadlocks, identifies lock contention hotspots, analyzes garbage collection pressure, and recommends JVM tuning parameters.

JVM diagnostic MCP servers exist (TDA, jfr-mcp, Arthas) — but they're allJava-based, requiring a JVM runtime just to diagnose JVM problems. This tool runs onNode.jsvianpx— no JVM, no Docker, no SSH.

It analyzesofflineartifacts (thread dumps, GC logs, heap histograms) rather than requiring a running JVM. Paste a thread dump or GC log and get instant analysis.

- 6 MCP toolsfor comprehensive JVM diagnostics
- Thread dump analysis— deadlock detection, contention hotspots, thread state breakdown
- GC log analysis— pause statistics, heap trends, memory leak detection
- Heap histogram analysis— memory leak candidates, classloader leaks, finalization issues
- JFR summary— Java Flight Recorder file analysis
- Unified diagnosis— cross-correlates thread and GC data
- SupportsG1, ZGC, Parallel, Serial, and Shenandoah GC formats
- No external dependencies— works on local text input, no API keys needed

Generate exportable diagnostic reports (HTML + PDF)with a Pro license key.

- Full JVM thread dump analysis report with actionable recommendations
- PDF export for sharing with your team
- Priority support

Pro license key activates thegenerate_reportMCP tool in mcp-jvm-diagnostics.

Add to~/.claude/claude_desktop_config.json:

{ "mcpServers": { "jvm-diagnostics": { "command": "npx", "args": ["-y", "mcp-jvm-diagnostics"] } } }

No environment variables needed — this tool works on text input you provide.

Try these prompts in Claude (paste your JVM output):
- "Analyze this thread dump: [paste jstack output]"— Detects deadlocks, contention hotspots, and thread state breakdown
- "Analyze this GC log: [paste GC log]"— Shows pause statistics, heap trends, and tuning recommendations
- "Compare these heap histograms to find memory leaks: BEFORE: [paste] AFTER: [paste]"— Identifies growing classes, classloader leaks, and finalizer issues

Parse a JVM thread dump and analyze thread states, detect deadlocks, and identify lock contention.

- thread_dump— The full thread dump text (fromjstack <pid>,kill -3, or VisualVM)

Example prompt:"Analyze this thread dump and tell me if there are any deadlocks"

Parse a GC log and analyze garbage collection patterns, pause times, and memory pressure.

- gc_log— The GC log text (from-Xlog:gcor-verbose:gc)

Example prompt:"Analyze this GC log and tell me if there are any performance issues"

Parsejmap -histooutput and detect memory leak candidates, object creation hotspots, and classloader leaks.

- histo— The jmap -histo output text (fromjmap -histo <pid>orjmap -histo:live <pid>)

Example prompt:"Analyze this heap histogram and tell me if there are any memory leak candidates"

Unified JVM diagnosis combining thread dump and GC log analysis for comprehensive root cause analysis.

- thread_dump(optional) — Thread dump text
- gc_log(optional) — GC log text

Example prompt:"I have both a thread dump and GC log from the same time — diagnose what's wrong"

Compare twojmap -histosnapshots taken at different times to detect memory growth patterns and leak candidates.

- before— The first (earlier) jmap -histo output
- after— The second (later) jmap -histo output

Example prompt:"Compare these two heap histograms and tell me what's growing"

- Classes with growing instance/byte counts (leak candidates)
- New classes that appeared between snapshots
- Classes that disappeared (GC'd or unloaded)
- Overall heap growth rate
- Classloader leaks and finalizer queue growth

# Using jstack jstack <pid> > thread-dump.txt # Using kill signal (Linux/Mac) kill -3 <pid> # Using jcmd jcmd <pid> Thread.print > thread-dump.txt

Add these JVM flags to your application:

# Java 9+ (unified logging) -Xlog:gc:file=gc.log:time,level,tags # Java 8 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log

- Clone the repo
- npm install
- npm run build
- npm test

- Text input only: Thread dumps, GC logs, and heap histograms must be provided as text. The server cannot attach to a running JVM or capture data automatically.
- Java 9+ GC logs: The GC log parser is optimized for unified logging format (-Xlog:gc*). Legacy-verbose:gcformat (Java 8) has basic support but may miss some events.
- Shenandoah GC: Limited support. G1, ZGC, Parallel, and Serial are fully supported.
- Virtual threads (Java 21+): Thread dump parser handles virtual threads but analysis recommendations are tuned for platform threads.
- Heap histo comparison: Requires standardjmap -histoorjcmd GC.class_histogramformat. Custom formats or truncated output may not parse correctly.
- Deadlock detection: Detects monitor-based deadlocks. ReentrantLock deadlocks may not be detected if lock addresses are not visible in the thread dump.
- No historical analysis: Each analysis is a point-in-time snapshot. For trend analysis, compare multiple snapshots manually.
- HotSpot/OpenJDK only: Parser targets HotSpot/OpenJDK thread dump format. GraalVM native-image or Eclipse OpenJ9 dumps may parse incompletely.
- Classloader leak detection: Heap analysis flags growing ClassLoader instances but cannot definitively prove a leak without memory profiler data.

- mcp-db-analyzer— PostgreSQL/MySQL/SQLite schema analysis
-
mcp-spring-boot-actuator— Spring Boot health, metrics, and bean analysis
-
mcp-redis-diagnostics— Redis memory, slowlog, and client diagnostics
-
mcp-migration-advisor— Flyway/Liquibase migration risk analysis

This MCP server is no longer maintained or distributed. The Corporation has pivoted to Apify marketplace actors. Seeirrationalwayson Apifyandirrcorp/bzp-poland-tendersfor current Corporation work.

The npm package has been unpublished. The repository is archived for historical reference only.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

AI-powered live runtime debugging with Lightrun production context.

Analyze your MCP setup: measure token cost per tool, find bloated schemas, detect duplicates, and get optimization tips to reclaim your context window.

MCP server for .NET runtime diagnostics — memory, GC, threads, and more.

MCP server for .NET runtime diagnostics — memory, GC, threads, and more.

Reticle intercepts, visualizes, and profiles JSON-RPC traffic between your LLM and MCP servers in real-time, with zero latency overhead. Stop debugging blind. Start seeing everything.

Turn natural language into powerful Perfetto trace analysis. Quickly explain jank, diagnose ANRs, spot CPU hot threads, uncover lock contention, and find memory leaks.

Diagnoses token waste in Claude Code sessions with 6 anomaly types and severity scoring. Fully local.

Allows AI assistants to remotely drive the JetBrains debugger via MCP, including breakpoints, stepping, and variable inspection.

A server for monitoring and analyzing Java Virtual Machine (JVM) processes using Arthas, with a Python interface.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.