English | 中文 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. - Zero Dependencies: Uses only native JDK tools (jps, jstack, jmap, etc.) - Lightweight: Minimal resource consumption
Add this skill
npx mdskills install xzq-xu/jvm-mcp-serverComprehensive JVM monitoring MCP server with extensive toolset and excellent documentation
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.
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh # Linux/macOS
# or
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
# Install the package
uv pip install jvm-mcp-server
pip install jvm-mcp-server
# Clone the repository
git clone https://github.com/your-repo/jvm-mcp-server.git
cd jvm-mcp-server
# Using uv (recommended)
uv venv # Create virtual environment
uv sync # Install dependencies
# Or install in development mode
uv pip install -e .
# Local mode
uv run jvm-mcp-server
# Using environment variables file for remote mode
uv run --env-file .env jvm-mcp-server
# In specific directory
uv --directory /path/to/project run --env-file .env jvm-mcp-server
# Local mode
uvx run jvm-mcp-server
# With environment variables
uvx run --env-file .env jvm-mcp-server
from jvm_mcp_server import JvmMcpServer
# Local mode
server = JvmMcpServer()
server.run()
# Remote mode (via environment variables)
# Set SSH_HOST, SSH_PORT, SSH_USER, SSH_PASSWORD or SSH_KEY
import os
os.environ['SSH_HOST'] = 'user@remote-host'
os.environ['SSH_PORT'] = '22'
server = JvmMcpServer()
server.run()
{
"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"
]
}
}
}
JVM-MCP-Server provides a comprehensive set of tools for JVM monitoring and diagnostics:
list_java_processes: List all Java processesget_thread_info: Get thread information for a specific processget_jvm_info: Get JVM basic informationget_memory_info: Get memory usage informationget_stack_trace: Get thread stack trace informationget_class_info: Get detailed class information including structureget_stack_trace_by_method: Get method call pathdecompile_class: Decompile class source codesearch_method: Search for methods in classeswatch_method: Monitor method invocationsget_logger_info: Get logger informationset_logger_level: Set logger levelsget_dashboard: Get system resource dashboardget_jcmd_output: Execute JDK jcmd commandsget_jstat_output: Execute JDK jstat commandsFor detailed documentation on each tool, see Available Tools.
JVM-MCP-Server is built on a modular architecture:
BaseCommand: Abstract base class for all commandsCommandExecutor: Interface for command execution (local and remote)OutputFormatter: Interface for formatting command outputJvmMcpServer: Main server class that registers all toolsThe project is in active development. See Native_TODO.md for current progress.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Install via CLI
npx mdskills install xzq-xu/jvm-mcp-serverJVM MCP Server is a free, open-source AI agent skill. English | 中文 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. - Zero Dependencies: Uses only native JDK tools (jps, jstack, jmap, etc.) - Lightweight: Minimal resource consumption
Install JVM MCP Server with a single command:
npx mdskills install xzq-xu/jvm-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
JVM MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.