Get the FREE Ultimate OpenClaw Setup Guide →

JMX

A powerful Model Context Protocol (MCP) server that enables AI assistants like Claude Desktop to monitor and manage Java applications through JMX. Provides real-time MBean discovery, attribute management, and natural language JMX operations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio itz4blitz-jmx-mcp java -Xmx512m -Xms256m -Dspring.profiles.active=stdio -Dspring.main.banner-mode=off -Dlogging.level.root=OFF -Dspring.main.log-startup-info=false -jar /path/to/your/jmx-mcp-server-1.0.0.jar \
  --env JAVA_OPTS="-Djava.awt.headless=true"

How to use

The JMX MCP Server provides AI-assisted monitoring and management of Java applications via JMX. It exposes a suite of 12 JMX management tools for Claude Desktop or any MCP-compatible AI client, allowing you to discover MBeans, read and write attributes, invoke operations, and explore domains through natural language queries. The server also surfaces all JMX attributes as MCP resources, enabling AI-driven insights, automated remediation suggestions, and integration with existing Claude Desktop workflows. You can query memory, GC, thread, and runtime metrics, as well as manage JMX connections and discover services across your Java processes. The STDIO transport is optimized for Claude Desktop integration, and the JSON-RPC 2.0 protocol ensures reliable communication with the AI client.

How to install

Prerequisites:

  • Java 17+ (OpenJDK or Oracle JDK)
  • Maven 3.6+ (for building the server)
  • Claude Desktop or any MCP-compatible AI client

Step-by-step installation:

  1. Clone the repository git clone https://github.com/itz4blitz/JMX-MCP.git cd JMX-MCP

  2. Build the server mvn clean package

  3. Run the server locally (example) java -Xmx512m -Xms256m
    -Dspring.profiles.active=stdio
    -Dspring.main.banner-mode=off
    -Dlogging.level.root=OFF
    -Dspring.main.log-startup-info=false
    -jar target/jmx-mcp-server-1.0.0.jar

  4. Configure Claude Desktop to connect Copy the provided example configuration into your Claude Desktop MCP configuration file and adjust the path to the packaged JMX MCP JAR. Restart Claude Desktop after saving.

Notes:

  • Ensure the JAR path in the configuration matches your built artifact name and location.
  • If you run remotely, adjust the Java VM options and network settings accordingly.

Additional notes

Tips and common issues:

  • If you encounter connection problems, verify that the Java process is reachable and that any firewalls allow JMX traffic as configured by your environment.
  • Use the STDIO profile for Claude Desktop integration as recommended in the Quick Start guide.
  • Set appropriate JVM memory flags (-Xmx, -Xms) based on your workload and available system memory.
  • The server exposes all JMX attributes as MCP resources automatically; you can reference them with the jmx:// URI format described in the documentation.
  • For security, leverage the JMX connection management tools to add and manage remote connections and enable proper access validation.

Related MCP Servers

Sponsor this space

Reach thousands of developers