MCP.so
ログイン

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.

基本情報

カテゴリ

その他

ライセンス

MIT

ランタイム

python

トランスポート

stdio

公開者

xzq-xu

投稿者

li v

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "jvm-mcp-server": {
      "command": "uv",
      "args": [
        "pip",
        "install",
        "jvm-mcp-server"
      ]
    }
  }
}

ツール

15

List 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.

コメント

「その他」の他のコンテンツ