Skip to main content
Glama

Sprachen: English | 简体中文

Ein MCP-Server, der Alibaba Arthas in Claude Code, Cursor, Codex und jeden anderen MCP-fähigen KI-Assistenten einbindet. Er scannt lokale JVMs alle 15 Sekunden, filtert IDE-/Build-Daemons heraus, hängt Arthas automatisch an und stellt sofort einsatzbereite Diagnosewerkzeuge bereit — du kannst deinen Agenten also einfach fragen: "Warum ist der Bestelldienst langsam?" – und er kann thread, trace, watch und ognl auf dem laufenden Prozess ausführen.

AI agent ──stdio/HTTP──> arthas-mcp ──auto-attach──> Arthas agent ──> your JVM
                             ▲
                    jps discovery every 15s

Vergleich

arthas-mcp (dieses Projekt)

Offiziell arthas-mcp-server

Community-Wrapper

Einrichtung

Zero-Config — einfach starten

Java-Modul, das in der Ziel-JVM läuft

Arthas WebConsole manuell starten, dann eine URL angeben

Ziel-Erkennung

Automatisch (jps-Scan + Blacklist)

Keine (es ist die Anwendung)

Manuell

Sprache

Node (kein Java-Code zu pflegen)

Java

variiert

Ideal für

Debugging jedes lokalen Dienstes aus deinem Editor

Prozessinterne, produktionsgehostete Diagnosen

Schnelle Einmalaktionen

Related MCP server: Arthas MCP Server

Funktionen

  • Zero-Config-Erkennung — findet Geschäfts-JVMs über jps und überspringt IntelliJ-/Gradle-/Maven-/Language-Server-Daemons über eine eingebaute Blacklist

  • Automatisches Anhängen und Wiederanhängen — startet arthas-boot pro Prozess aus einem verwalteten Port-Pool und hängt wieder an, wenn ein Agent abbricht

  • Synchrone und asynchrone Befehlsausführung — kurze Befehle (version, sc, sm, ognl) werden direkt beantwortet; langlaufende (trace, watch, monitor) streamen über pull_results und können unterbrochen werden

  • stdio- und HTTP-Modi — eine Instanz pro Client-Sitzung (stdio) oder ein gemeinsamer langlaufender Dienst (--http) mit /mcp + /healthz

  • Freundliche Ausgabe — die Ergebnisse von Arthas-Jobs werden zu sauberem Text zusammengefasst, den ein LLM direkt lesen kann

  • Plattformübergreifend — macOS, Linux und Windows (betriebssystemspezifische Prozess-Introspektion: /proc, ps, PowerShel CIM)

Unterstützte Plattformen

Plattform

Status

macOS

Linux

Windows

✅ (erfordert JDK jps/java im PATH)

Voraussetzungen: Node ≥ 18, ein JDK (für jps und java) und Arthas — automatisch unter ~/.arthas/lib erkannt (d. h. es ist bereits installiert, wenn du arthas-boot schon einmal ausgeführt hast), oder setze ARTHAS_BOOT_JAR auf arthas-boot.jar. Alle Abhängigkeiten sind kostenlos und Open Source.

Installation

Ohne Installation ausführen (empfohlen)

npx -y github:x0c/arthas-mcp --version

Global installieren

npm install -g github:x0c/arthas-mcp
arthas-mcp --version

Gleiche Befehle unter macOS, Linux und Windows. Sobald das Paket im npm-Registry veröffentlicht ist, verkürzen sich beide zu npx -y arthas-mcp / npm install -g arthas-mcp.

Aus dem Quellcode

git clone https://github.com/x0c/arthas-mcp.git
cd arthas-mcp && npm install
node cli/arthas-mcp.mjs --version

MCP-Client konfigurieren

Claude Code:

claude mcp add arthas -- npx -y github:x0c/arthas-mcp

Cursor / jeder Client, der einen mcpServers-JSON-Block liest:

{
  "mcpServers": {
    "arthas": {
      "command": "npx",
      "args": ["-y", "github:x0c/arthas-mcp"]
    }
  }
}

Geteilter Daemon-Modus (eine Instanz für alle Clients):

{
  "mcpServers": {
    "arthas": {
      "command": "npx",
      "args": ["-y", "github:x0c/arthas-mcp", "--http"],
      "url": "http://127.0.0.1:8580/mcp"
    }
  }
}

Verwendung

Starte deinen Java-Dienst, warte ein paar Sekunden und frage dann den Agenten — oder rufe die Tools selbst auf:

Tool

Zweck

list_agents

Zeigt erkannte Dienste und ihren Online-Status — zuerst aufrufen

exec

Führt einen kurzen Arthas-Befehl synchron aus (version, sc, sm, ognl …)

async_exec

Reicht einen langlaufenden Befehl ein (trace, watch, monitor) und gibt sessionId / consumerId zurück

pull_results

Ruft Ergebnisse eines async_exec ab

interrupt_job

Stoppt einen laufenden Trace-/Watch-/Monitor-Job

Beispielsitzung:

You:  why is the order service slow?
Agent: (list_agents) → order-service is online on port 18501
       (exec order-service "thread -n 3")     → hottest threads
       (async_exec order-service "trace *OrderService create") → submits trace
       (pull_results …)                       → shows the slow call chain

Konfiguration

Reihenfolge: CLI-Argumente > Umgebungsvariablen > ~/.config/arthas-mcp/config.json > Standardwerte.

Quelle

Beschreibung

config.json

host, port, scanInterval, attachTimeout, requestTimeout, portMin/portMax, stripPrefixes (Liste der Präfixe, die aus abgeleiteten Dienst-IDs entfernt werden)

aliases.json

Ordnet einen erkannten Dienstnamen einer verständlicheren Agenten-ID zu

ARTHAS_MCP_PORT / ARTHAS_MCP_HOST

Bindeadresse des HTTP-Modus

ARTHAS_MCP_CONFIG_DIR

Verschiebt das gesamte Konfigurationsverzeichnis

ARTHAS_BOOT_JAR

Expliziter Pfad zu arthas-boot.jar

--scan-interval <ms>

JVM-Scanintervall (Standard: 15000)

FAQ

Warum nicht der offizielle arthas-mcp-server? Sie lösen unterschiedliche Probleme: Der offizielle ist ein prozessinternes Java-Modul für produktionsgehostete Diagnosen, dieses Projekt ist ein lokaler Wrapper, der beliebige JVMs erkennt und an sie andockt, ohne die Anwendung zu berühren. Beide können nebeneinander existieren.

Verändert es meine Anwendung? Es hängt den Arthas-Agenten an die laufende JVM an (wie wenn man arthas-boot von Hand ausführt) — kein Neustart, keine Codeänderung. Stoppe das Tool oder führe stop aus, um die Verbindung zu trennen.

Ist es sicher, ein LLM auf die Produktion zu richten? Es gibt dem Agenten dieselben Möglichkeiten, die Arthas hat (einschließlich Watch auf Bytecode-Ebene). Richte es auf lokale/Dev-JVMs aus und beschränke dich in der Produktion auf Lesezugriffe.

Lizenz

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Сonnects to live JVMs via JDWP protocol, enabling LLM agents to autonomously debug Java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stacks with auto-resolved object fields, evaluate methods, set variable values, and diagnose issues like deadlocks and hung queries.
    28
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to debug Java applications using JDB, supporting breakpoints, stepping, expression evaluation, thread analysis, and more.
    3
    Apache 2.0
  • F
    license
    Not graded
    quality
    A
    maintenance
    Bridges agentic coding tools and live Java runtime behavior through a lightweight sidecar agent. Attaches directly to a running JVM to provide bytecode-level runtime signals for probe-verified inspection and deterministic debugging.
    2

View all related MCP servers

Related MCP Connectors

  • Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.

  • Live browser debugging for AI assistants — DOM, console, network via MCP.

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/x0c/arthas-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server