# javaperf

An MCP server for Java profiling through jcmd, jfr, and jps. Use it to inspect threads, memory, GC, and JFR recordings.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 10
- Author: theSharque
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/theSharque/mcp-jperf
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/javaperf

## What it does

javaperf gives an AI agent access to JDK profiling utilities and tools for inspecting live Java processes. It can start and stop JFR recordings, read CPU profiles, and summarize network, file, memory, and garbage-collection activity.

Its MCP tools cover deadlock checks, thread snapshots, heap histograms, heap dumps, JVM details, compiler queues, code cache, and native memory. JFR analysis includes method traces, allocation data, GC efficiency, CPU bottlenecks, and call frequency.

The server requires Node.js v18+ and JDK 8u262+ or 11+ with JFR support. It discovers `jps`, `jcmd`, and `jfr` through `JAVA_HOME` or `which java`; set `JAVA_HOME` explicitly when `jps` cannot be found.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add javaperf -- npx -y javaperf
```

### Codex

**Platform CLI**
```bash
codex mcp add javaperf -- npx -y javaperf
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "javaperf": {
            "command": "npx",
            "args": [
                "-y",
                "javaperf"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "javaperf": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "javaperf"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add javaperf npx -y javaperf
```

## When to use it
- list running Java processes and their PIDs
- capture a JFR profile for a chosen duration
- inspect CPU, memory, GC, and I/O behaviour
- detect Java-level deadlocks and lock waits
- track growth across heap histograms

## Example prompts
- List the running Java processes and show their PIDs.
- Capture a 60-second JFR profile for process 1234.
- Analyze `recordings/new_profile.jfr` for CPU hotspots and GC behaviour.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
