Skip to main content
Glama

Languages: English | 简体中文

An MCP server that bridges Alibaba Arthas into Claude Code, Cursor, Codex and any other MCP-capable AI assistant. It scans local JVMs every 15 seconds, filters out IDE/build daemons, attaches Arthas automatically, and exposes ready-to-use diagnostic tools — so you can just ask your agent "why is the order service slow?" and it can run thread, trace, watch and ognl on the live process.

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

How it compares

arthas-mcp (this project)

Official arthas-mcp-server

Community wrappers

Setup

Zero config — just start it

Java module running inside the target JVM

Start Arthas WebConsole manually, then point a URL

Target discovery

Automatic (jps scan + blacklist)

None (it is the app)

Manual

Language

Node (no Java code to maintain)

Java

varies

Best for

Debugging any local service from your editor

In-process, production-hosted diagnostics

Quick one-offs

Related MCP server: Arthas MCP Server

Features

  • Zero-config discovery — finds business JVMs via jps, skips IntelliJ / Gradle / Maven / language-server daemons via a built-in blacklist

  • Auto attach & reattach — starts arthas-boot per process on a managed port pool, and reattaches when an agent drops

  • Sync + async command execution — short commands (version, sc, sm, ognl) return directly; long-running ones (trace, watch, monitor) stream via pull_results and can be interrupted

  • stdio and HTTP modes — one instance per client session (stdio), or a shared long-running service (--http) with /mcp + /healthz

  • Friendly output — Arthas job results are collapsed into clean text an LLM can read directly

  • Cross-platform — macOS, Linux and Windows (per-OS process introspection: /proc, ps, PowerShell CIM)

Supported platforms

Platform

Status

macOS

Linux

Windows

✅ (requires JDK jps/java on PATH)

Requirements: Node ≥ 18, a JDK (for jps and java), and Arthas — auto-detected from ~/.arthas/lib (i.e. it is already installed if you have run arthas-boot before), or point ARTHAS_BOOT_JAR at arthas-boot.jar. All dependencies are free and open source.

Install

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

Install globally

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

Same commands on macOS, Linux and Windows. Once published to the npm registry, both shorten to npx -y arthas-mcp / npm install -g arthas-mcp.

From source

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

Configure your MCP client

Claude Code:

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

Cursor / any client that reads an mcpServers JSON block:

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

Shared daemon mode (one instance for all clients):

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

Usage

Start your Java service, wait a few seconds, then ask the agent — or call the tools yourself:

Tool

Purpose

list_agents

List discovered services and their online status — call this first

exec

Run a short Arthas command synchronously (version, sc, sm, ognl …)

async_exec

Submit a long-running command (trace, watch, monitor), returns sessionId / consumerId

pull_results

Poll results of an async_exec

interrupt_job

Stop a running trace/watch/monitor job

Example session:

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

Configuration

Precedence: CLI args > environment variables > ~/.config/arthas-mcp/config.json > defaults.

Source

What

config.json

host, port, scanInterval, attachTimeout, requestTimeout, portMin/portMax, stripPrefixes (list of prefixes stripped from derived service ids)

aliases.json

Map a detected service name to a friendlier agent id

ARTHAS_MCP_PORT / ARTHAS_MCP_HOST

HTTP mode bind address

ARTHAS_MCP_CONFIG_DIR

Move the whole config directory

ARTHAS_BOOT_JAR

Explicit path to arthas-boot.jar

--scan-interval <ms>

JVM scan interval (default 15000)

FAQ

Why not the official arthas-mcp-server? They solve different problems: the official one is an in-process Java module for production-hosted diagnostics, this project is a local-side wrapper that discovers and attaches to any JVM without touching the app. They can coexist.

Does it modify my application? It attaches the Arthas agent to the running JVM (like running arthas-boot by hand) — no restart, no code change. Stop the tool or run stop to detach.

Is it safe to point an LLM at production? It gives the agent the same power Arthas has (including bytecode-level watch). Point it at local/dev JVMs, and use read-only judgement in production.

License

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