Cover image
Try Now
2025-03-25

Il s'agit d'un projet d'implémentation d'un serveur MCP (Protocole de contexte modèle basé sur JVM. Le projet vise à fournir une implémentation standardisée de serveur MCP pour la plate-forme JVM, permettant aux modèles d'IA de mieux interagir avec l'écosystème Java.

3 years

Works with Finder

2

Github Watches

7

Github Forks

47

Github Stars

JVM MCP Server

English | 中文

A JVM monitoring MCP server implementation based on Arthas, providing a simple and easy-to-use Python interface for monitoring and analyzing Java processes.

Features

  • Automatic download and management of Arthas tools
  • Support for local and remote Java process monitoring
  • Java process list querying
  • Real-time JVM thread information
  • JVM memory usage monitoring
  • Thread stack trace information
  • Class loading information querying
  • Support for class and method decompilation
  • Method call monitoring
  • Dynamic log level adjustment
  • AI-driven JVM performance analysis

System Requirements

  • Python 3.10+
  • Java Runtime Environment (JRE) 8+
  • Network connection (for downloading Arthas)
  • SSH access to target server (if using remote mode)

Installation and Environment Setup

1. Install uv tool

## linux shell
curl -LsSf https://astral.sh/uv/install.sh | sh
## or install using pip
pip install uv
## or install using pipx (if you have pipx installed)
pipx install uv 
## windows powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Clone the project

git clone https://github.com/xzq-xu/jvm-mcp-server.git
cd jvm-mcp-server

3. Initialize project environment using uv

# Create virtual environment
uv venv
# Sync project dependencies
uv sync

4. Configure environment variables (Optional, for remote connections)

Create a .env file and add the following configurations:

# Linux/Mac
ARTHAS_SSH_HOST=user@remote-host
ARTHAS_SSH_PORT=22  # Optional, default is 22
ARTHAS_SSH_PASSWORD=your-password  # If using password authentication

# Windows PowerShell
$env:ARTHAS_SSH_HOST="user@remote-host"
$env:ARTHAS_SSH_PORT="22"  # Optional, default is 22
$env:ARTHAS_SSH_PASSWORD="your-password"  # If using password authentication

Quick Start

  1. Start the server using uv:
# Start in local mode
uv run jvm-mcp-server

# Start with environment file (if remote connection is configured)
uv run --env-file .env jvm-mcp-server

# Start in a specific directory (if needed)
uv --directory /path/to/project run --env-file .env jvm-mcp-server
  1. Use in Python code:
from jvm_mcp_server import JvmMcpServer

server = JvmMcpServer()
server.run()
  1. Using MCP tools:

Using configuration file:

{
    "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"
        ]
      }
    }
}

Without using configuration file, it will read system environment variables, if not present it will monitor local threads:

{
    "mcpServers": {
      "jvm-mcp-server": {
        "command": "uv",
        "args": [
          "--directory",
          "/path/to/jvm-mcp-server",
          "run",
          "jvm-mcp-server"
        ]
      }
    }
}

Available Tools

Available Tools List

Important Notes

  1. Ensure Java is installed in the runtime environment
  2. Arthas tool will be automatically downloaded on first run (arthas will be downloaded to home directory, can be downloaded in advance and named as arthas-boot.jar)
  3. Requires access permissions to target Java process
  4. Remote mode requires SSH access and appropriate user permissions
  5. Recommended for use in development environment, production use should be carefully evaluated

Feedback

If you encounter any issues, please submit an Issue or Pull Request.

License

MIT License

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • appcypher
  • Serveurs MCP géniaux - une liste organisée de serveurs de protocole de contexte de modèle

  • chongdashu
  • Activer les clients adjoints AI comme Cursor, Windsurf et Claude Desktop pour contrôler le moteur Unreal à travers le langage naturel à l'aide du Protocole de contexte modèle (MCP).

  • wgpsec
  • 一款基于各大企业信息 API 的工具 , 解决在遇到的各种针对国内企业信息收集难题。一键收集控股公司 ICP 备案、 APP 、小程序、微信公众号等信息聚合导出。支持 MCP 接入

    Reviews

    4 (1)
    Avatar
    user_xkSNXCcY
    2025-04-17

    I have been using jvm-mcp-server by xzq-xu and it has greatly enhanced my monitoring capabilities for JVM applications. The tool is extremely user-friendly and seamlessly integrates with my existing setup. I highly recommend it to anyone needing robust performance monitoring. Check it out on GitHub!