JVM MCP Server

by xzq-xu

87 304 downloads Not rated yet MIT
GitHub

About

This is an implementation project of a JVM-based MCP (Model Context Protocol) server. The project aims to provide a standardized MCP server implementation for the JVM platform, enabling AI models to better interact with the Java ecosystem.

Details

License
MIT

Explore

- Zero Dependencies: Uses only native JDK tools (jps, jstack, jmap, etc.)
- Lightweight: Minimal resource consumption compared to agent-based solutions
- High Compatibility: Works with all Java versions and platforms
- Non-Intrusive: No modifications to target applications required
- Secure: Uses only JDK certified tools and commands
- Remote Monitoring: Support for both local and remote JVM monitoring via SSH

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name JVM MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

A hosted deployment is available on Fronteir AI.

curl -LsSf https://astral.sh/uv/install.sh | sh # Linux/macOS

uv pip install jvm-mcp-server


uv pip install -e .

uv run --env-file .env jvm-mcp-server

uvx run --env-file .env jvm-mcp-server


json
{
"mcpServers": {
"jvm-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/jvm-mcp-server",
"run",
"--env-file",
"/path/to/jvm-mcp-server/.env",
"jvm-mcp-server"
]
}
}
}
```

list_java_processes

List all Java processes

get_thread_info

Get thread information for a specific process

get_jvm_info

Get JVM basic information

get_memory_info

Get memory usage information

get_stack_trace

Get thread stack trace information

get_class_info

Get detailed class information including structure

get_stack_trace_by_method

Get method call path

decompile_class

Decompile class source code

search_method

Search for methods in classes

watch_method

Monitor method invocations

get_logger_info

Get logger information

set_logger_level

Set logger levels

get_dashboard

Get system resource dashboard

get_jcmd_output

Execute JDK jcmd commands

get_jstat_output

Execute JDK jstat commands

JVM-MCP-Server provides a comprehensive set of tools for JVM monitoring and diagnostics:

- list_java_processes: List all Java processes
- get_thread_info: Get thread information for a specific process
- get_jvm_info: Get JVM basic information
- get_memory_info: Get memory usage information
- get_stack_trace: Get thread stack trace information
- get_class_info: Get detailed class information including structure
- get_stack_trace_by_method: Get method call path
- decompile_class: Decompile class source code
- search_method: Search for methods in classes
- watch_method: Monitor method invocations
- get_logger_info: Get logger information
- set_logger_level: Set logger levels
- get_dashboard: Get system resource dashboard
- get_jcmd_output: Execute JDK jcmd commands
- get_jstat_output: Execute JDK jstat commands

For detailed documentation on each tool, see Available Tools.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "jvm mcp server": {
            "jvm-mcp-server": {
                "command": "uv",
                "args": [
                    "pip",
                    "install",
                    "jvm-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "jvm-mcp-server": {
        "command": "uv",
        "args": [
            "pip",
            "install",
            "jvm-mcp-server"
        ]
    }
}

<p align="center">
Python Version
JDK Version
License
</p>

English | 中文

MseeP.ai Security Assessment Badge

A lightweight JVM monitoring and diagnostic MCP (Multi-Agent Communication Protocol) server implementation based on native JDK tools. Provides AI agents with powerful capabilities to monitor and analyze Java applications without requiring third-party tools like Arthas.

<a href="https://glama.ai/mcp/servers/@xzq-xu/jvm-mcp-server">
JVM Server MCP server
</a>

Hosted deployment

A hosted deployment is available on Fronteir AI.

Features

- Zero Dependencies: Uses only native JDK tools (jps, jstack, jmap, etc.)
- Lightweight: Minimal resource consumption compared to agent-based solutions
- High Compatibility: Works with all Java versions and platforms
- Non-Intrusive: No modifications to target applications required
- Secure: Uses only JDK certified tools and commands
- Remote Monitoring: Support for both local and remote JVM monitoring via SSH

Core Capabilities

Basic Monitoring

- Java process listing and identification - JVM basic information retrieval - Memory usage monitoring - Thread information and stack trace analysis - Class loading statistics - Detailed class structure information

Advanced Features

- Method call path analysis - Class decompilation - Method search and inspection - Method invocation monitoring - Logger level management - System resource dashboard

System Requirements

- Python 3.6+
- JDK 8+
- Linux/Unix/Windows OS
- SSH access (for remote monitoring)

Installation

Using uv (Recommended)

```bash

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.

Videos about JVM MCP Server

Relevant YouTube tutorials, setups, and demos