JVM MCP Server
@xzq-xu
关于 JVM MCP Server
This is an implementation project of a JVM-based MCP (Model Context Protocol) server. The project aims to provide a standardized MCP server implementation for the JVM platform, enabling AI models to better interact with the Java ecosystem.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"jvm-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"jvm-mcp-server"
]
}
}
}工具
15List all Java processes
Get thread information for a specific process
Get JVM basic information
Get memory usage information
Get thread stack trace information
Get detailed class information including structure
Get method call path
Decompile class source code
Search for methods in classes
Monitor method invocations
Get logger information
Set logger levels
Get system resource dashboard
Execute JDK jcmd commands
Execute JDK jstat commands
概览
What is JVM MCP Server?
A lightweight JVM monitoring and diagnostic MCP (Multi-Agent Communication Protocol) server that uses native JDK tools (jps, jstack, jmap, etc.) to monitor and analyze Java applications. It requires no third-party tools like Arthas and is designed for AI agents to access JVM metrics and diagnostics in a non‑intrusive way.
How to use JVM MCP Server?
Install with pip install jvm-mcp-server or uv pip install jvm-mcp-server. Start the server locally with uv run jvm-mcp-server or via Python using JvmMcpServer().run(). For remote JVMs, set SSH environment variables (e.g., SSH_HOST, SSH_PORT) and run with --env-file .env. Integrate with an MCP client by adding a configuration entry using the uv command and the jvm-mcp-server tool name.
Key features of JVM MCP Server
- Zero external dependencies – uses only native JDK tools
- Lightweight and minimal resource consumption
- Non‑intrusive: no modifications to target applications
- Supports both local and remote JVM monitoring via SSH
- Provides advanced diagnostics: method tracing, decompilation, logger control
Use cases of JVM MCP Server
- Real‑time monitoring of Java process memory, threads, and class loading
- Diagnosing performance issues by analyzing thread dumps and stack traces
- Searching and inspecting class structures and method call paths
- Managing logger levels across running Java applications
- Automating JVM diagnostics in CI/CD or AI‑assisted operations
FAQ from JVM MCP Server
What are the runtime requirements?
Python 3.6+ and JDK 8+ are required. The server runs on Linux, Unix, and Windows.
Does JVM MCP Server rely on any third‑party agent or library?
No. It uses only native JDK commands (jps, jstack, jmap, jinfo, jcmd, jstat) and requires no additional agents or tools like Arthas.
How do I handle permission errors when connecting to a JVM process?
Some commands (jstack, jmap, jcmd) require sufficient permissions. Run the server with sudo, or as the same user as the target Java process, or add -XX:+AllowRedefinitionToAddDeleteMethods to the JVM arguments. In Docker, use --privileged or mount /proc.
Can it monitor remote JVMs?
Yes. Set the SSH_HOST, SSH_PORT, SSH_USER, and either SSH_PASSWORD or SSH_KEY environment variables to enable remote monitoring via SSH.
What transport protocol does JVM MCP Server use?
It exposes its functionality through the FastMCP protocol, which is compatible with the Model Context Protocol (MCP) standard for AI agent communication.
其他 分类下的更多 MCP 服务器
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
ghidraMCP
LaurieWiredMCP Server for Ghidra
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Awesome Mlops
visengerA curated list of references for MLOps
评论