jvm-mcp-server

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

50
6

JVM MCP Server

English | 中文

This project provides a JVM monitoring MCP server implemented using Arthas, offering a user-friendly Python interface for Java process monitoring and analysis.

Features

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.

System Requirements

It requires Python 3.10+, JRE 8+, a network connection for Arthas download, and SSH access for remote monitoring.

Installation and Environment Setup

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.

Quick Start

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.

Important Notes

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.

Feedback

Submit issues or pull requests for any problems encountered.

License

MIT License

Repository

XZ
xzq-xu

xzq-xu/jvm-mcp-server

Created

March 10, 2025

Updated

March 28, 2025

Language

Python

Category

System Tools