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.
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:
-
Clone the repository git clone https://github.com/itz4blitz/JMX-MCP.git cd JMX-MCP
-
Build the server mvn clean package
-
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 -
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
jadx-ai
Plugin for JADX to integrate MCP server
mcp -tree-sitter
MCP Server for Tree-sitter
mcp_server_filesystem
MCP File System Server: A secure Model Context Protocol server that provides file operations for AI assistants. Enables Claude and other assistants to safely read, write, and list files in a designated project directory with robust path validation and security controls.
taskflow
A task management Model Context Protocol (MCP) server that helps AI assistants break down user requests into manageable tasks with subtasks, dependencies, and notes. Enforces a structured workflow with user approval steps.
mongo
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
mcp-coroot
MCP server for Coroot observability platform - integrate monitoring, troubleshooting, and configuration tools with AI agents