arthas-mcp
言語: English | 简体中文
Alibaba Arthas を Claude Code、Cursor、Codex、その他の MCP 対応 AI アシスタントに橋渡しする MCP サーバーです。ローカル JVM を 15秒ごとにスキャンし、IDE/ビルドデーモンを除外して、Arthas を自動的にアタッチし、すぐ使える診断ツールを公開します。エージェントに 「注文サービスが遅いのはなぜ?」 と質問するだけで、実行中のプロセスに対して thread、trace、watch、ognl を実行できます。
AI agent ──stdio/HTTP──> arthas-mcp ──auto-attach──> Arthas agent ──> your JVM
▲
jps discovery every 15s他のツールとの比較
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
特徴
ゼロ設定の検出 —
jpsでビジネス JVM を検出し、組み込みブラックリストで IntelliJ / Gradle / Maven / language-server のデーモンを除外します自動アタッチ&再アタッチ — 管理されたポートプールでプロセスごとに
arthas-bootを起動し、エージェントが切断されたら再アタッチします同期+非同期のコマンド実行 — 短時間のコマンド(
version、sc、sm、ognl)は直接返し、長時間実行のもの(trace、watch、monitor)はpull_resultsでストリーミングし、中断できますstdio と HTTP モード — クライアントセッションごとに1インスタンス(stdio)、または共有の常駐サービス(
--http)で/mcp+/healthzを提供わかりやすい出力 — Arthas のジョブ結果を、LLM が直接読めるクリーンなテキストにまとめます
クロスプラットフォーム — macOS、Linux、Windows(OSごとのプロセス検査:
/proc、ps、PowerShell CIM)
対応プラットフォーム
Platform | Status |
macOS | ✅ |
Linux | ✅ |
Windows | ✅ (requires JDK |
必要条件: Node ≥ 18、JDK(jps と java 用)、および Arthas — ~/.arthas/lib から自動検出されます(つまり、以前に arthas-boot を実行したことがあればすでにインストールされています)。または ARTHAS_BOOT_JAR で arthas-boot.jar を指定します。依存関係はすべて無料のオープンソースです。
インストール
インストールせずに実行(推奨)
npx -y github:x0c/arthas-mcp --versionグローバルインストール
npm install -g github:x0c/arthas-mcp
arthas-mcp --versionmacOS、Linux、Windows で同じコマンドです。npm レジストリに公開されると、どちらも
npx -y arthas-mcp/npm install -g arthas-mcpに短縮されます。
ソースから
git clone https://github.com/x0c/arthas-mcp.git
cd arthas-mcp && npm install
node cli/arthas-mcp.mjs --versionMCP クライアントを設定する
Claude Code:
claude mcp add arthas -- npx -y github:x0c/arthas-mcpCursor / mcpServers JSON ブロックを読み取る任意のクライアント:
{
"mcpServers": {
"arthas": {
"command": "npx",
"args": ["-y", "github:x0c/arthas-mcp"]
}
}
}共有デーモンモード(全クライアントで1つのインスタンス):
{
"mcpServers": {
"arthas": {
"command": "npx",
"args": ["-y", "github:x0c/arthas-mcp", "--http"],
"url": "http://127.0.0.1:8580/mcp"
}
}
}使い方
Java サービスを起動し、数秒待ってからエージェントに質問するか、自分でツールを呼び出します:
Tool | Purpose |
| 検出したサービスとそのオンライン状態を一覧表示 — 最初に呼び出してください |
| 短時間の Arthas コマンドを同期的に実行( |
| 長時間実行のコマンド( |
|
|
| 実行中の trace/watch/monitor ジョブを停止 |
セッション例:
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設定
優先順位: CLI 引数 > 環境変数 > ~/.config/arthas-mcp/config.json > デフォルト。
Source | What |
|
|
| 検出されたサービス名を、より親しみやすいエージェント ID にマップする |
| HTTP モードのバインドアドレス |
| 設定ディレクトリ全体を移動 |
|
|
| JVM スキャン間隔(デフォルト 15000) |
FAQ
公式の arthas-mcp-server ではなく、なぜこれを使うのか? これらは異なる問題を解決します。公式版は本番ホストでの診断用のインプロセス Java モジュールであり、このプロジェクトはアプリに触れずに 任意の JVM を検出してアタッチするローカルサイドのラッパーです。両者は共存できます。
アプリケーションを変更しますか? 実行中の JVM に Arthas エージェントをアタッチするだけです(手動で arthas-boot を実行するのと同じ)。再起動もコード変更もありません。ツールを停止するか stop を実行するとデタッチします。
本番環境に LLM を向けても安全ですか? エージェントに Arthas と同じ能力(バイトコードレベルの watch を含む)を与えます。ローカル/開発 JVM に向けて、本番では読み取り専用の判断を使用してください。
ライセンス
This server cannot be installed
Maintenance
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
- AlicenseBqualityCmaintenanceС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.281MIT
- AlicenseNot gradedqualityCmaintenanceJava diagnostics MCP server for LLM integration with Alibaba Arthas, enabling analysis and diagnosis of Java applications.56MIT

karellen-jdb-mcpofficial
AlicenseNot gradedqualityDmaintenanceEnables LLMs to debug Java applications using JDB, supporting breakpoints, stepping, expression evaluation, thread analysis, and more.3Apache 2.0- FlicenseNot gradedqualityAmaintenanceBridges 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
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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