
Arthas MCP 服务器是一款基于 MCP 的 Java 应用诊断工具包,设计用于 LLM 集成。它与阿里巴巴 Arthas 集成,使 AI 助手能够分析和诊断 Java 应用。
概览
Arthas MCP 服务器是一款基于 MCP 的 Java 应用诊断工具包,设计用于 LLM 集成。它与阿里巴巴 Arthas 集成,使 AI 助手能够分析和诊断 Java 应用。 - 通过支持LLM的工具进行智能诊断 - 实时监控:JVM、线程、内存 - 性能分析:CPU使用率、调用追踪、瓶颈 - 运行时操作:动态类/方法工具 - 示例 - connect_arthas:连接Arthas WebConsole - get_connection_status:获取当前状态 - disconnect_arthas:断开连接 - get_jvm_info:JVM信息 - get_thread_info:线程状态和性能 - get_memory_info:内存使用和GC - execute_arthas_command:运行自定义Arthas命令 - analyze_performance:性能分析 - trace_method_calls:方法调用追踪 macOS: ~/.cursor/mcp.json Windows: C:\Users{username}.cursor\mcp.json 有多种部署方式:连接模式或代理模式。
概述(AI 翻译)
Java 诊断 MCP 服务器
概述
Arthas MCP 服务器是一款基于 MCP 的 Java 应用诊断工具包,设计用于 LLM 集成。它与阿里巴巴 Arthas 集成,使 AI 助手能够分析和诊断 Java 应用。
特色
- 通过支持LLM的工具进行智能诊断
- 实时监控:JVM、线程、内存
- 性能分析:CPU 使用率、呼叫追踪、瓶颈
- 运行时操作:动态类/方法工具
- 例如。
快速启动
安装
跑
MCP工具
- connect_arthas:连接Arthas WebConsole
- get_connection_status:获取当前状态
- disconnect_arthas:断开连接
- get_jvm_info:JVM信息
- get_thread_info:线程状态与性能
- get_memory_info:内存使用与GC
- execute_arthas_command:运行自定义 Arthas 命令
- analyze_performance:绩效分析
- trace_method_calls:方法调用追踪
配置
添加到光标 / Claude 代码
macOS: ~/.cursor/mcp.json
窗口:C:\Users\{username}\.cursor\mcp.json
开始,阿尔萨斯
有多种部署方式:连接模式或代理模式。
本页由 AI 翻译,技术细节请以原文为准。
README
Arthas MCP Server
Java diagnostics MCP server
Overview
Arthas MCP Server is an MCP-based diagnostic toolkit for Java applications, designed for LLM integration. It integrates with Alibaba Arthas so AI assistants can analyze and diagnose Java apps.
Features
- Intelligent diagnostics via LLM-friendly tools
- Real-time monitoring: JVM, threads, memory
- Performance analysis: CPU usage, call tracing, bottlenecks
- Runtime operations: dynamic class/method tools
- exmaple
Quick Start
Install
uv sync
Run
python main.py
MCP Tools
- connect_arthas: connect to Arthas WebConsole
- get_connection_status: get current status
- disconnect_arthas: disconnect
- get_jvm_info: JVM info
- get_thread_info: thread status and performance
- get_memory_info: memory usage and GC
- execute_arthas_command: run custom Arthas command
- analyze_performance: performance analysis
- trace_method_calls: method call tracing
Config
Add to Cursor / Claude Code
macOS: ~/.cursor/mcp.json
Windows: C:\Users\{username}\.cursor\mcp.json
{
"mcpServers": {
"arthas": {
"command": "uv",
"args": ["--directory", "F:\\path\\to\\arthas_mcp_server", "run", "python", "main.py"],
"env": { "ARTHAS_URL": "http://localhost:8563" }
}
}
}
Start Arthas
There are multiple deployment methods: either attach mode or agent mode. Both approaches ultimately result in listening for HTTP requests (Arthas commands) on port 8563.
Project Structure
arthas_mcp_server/
├── src/
│ ├── __init__.py
│ ├── models.py
│ ├── server.py
│ └── client.py
├── main.py
├── pyproject.toml
└── README.md
Development
uv sync --extra dev
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"arthas": {
"command": "uv",
"args": ["--directory", "F:\\path\\to\\arthas_mcp_server", "run", "python", "main.py"],
"env": { "ARTHAS_URL": "http://localhost:8563" }
}
}
}