This repository provides a JVM monitoring MCP server based on Arthas, offering a Python interface for analyzing Java processes locally or remotely. It supports real-time thread and memory monitoring, along
This project provides a JVM monitoring MCP server implemented using Arthas, offering a user-friendly Python interface for Java process monitoring and analysis.
Key features include automatic Arthas tool management, support for local and remote Java process monitoring, Java process listing, real-time JVM thread information, memory usage monitoring, thread stack trace retrieval, class loading information, class/method decompilation, method call monitoring, dynamic log level adjustment, and AI-driven performance analysis.
It requires Python 3.10+, JRE 8+, a network connection for Arthas download, and SSH access for remote monitoring.
The setup involves installing the uv
tool, cloning the repository, initializing the environment using uv venv
and uv sync
, and optionally configuring environment variables in a .env
file for remote connections.
Start the server using uv run jvm-mcp-server
(with or without .env
). Use the JvmMcpServer
class in Python code. MCP tools can be used with or without a configuration file, defaulting to local thread monitoring if environment variables are absent.
Java installation is mandatory. Arthas downloads automatically on the first run. Access permissions to the target Java process are required. Remote mode needs SSH access. It's recommended for development environments, with careful evaluation needed for production use.
Submit issues or pull requests for any problems encountered.
xzq-xu/jvm-mcp-server
March 10, 2025
March 28, 2025
Python