Arthas MCP Server
通用的 Arthas 代理 MCP Server,支持多实例管理。
功能特性
- 支持多个 Arthas 实例管理
- 统一的命令执行接口
- 安全的 Token 认证
- 环境变量配置支持
- 完整的审计日志
安装
pip install arthas-mcp-server
配置
在用户目录下创建配置文件 ~/.arthas-mcp/config.json:
{
"instances": [
{
"name": "shop-frontend-daily",
"url": "https://your-domain.com/internal/arthas",
"token": "${ARTHAS_TOKEN_DAILY}",
"description": "Shop Frontend Daily Environment"
}
]
}
支持环境变量替换,格式为 ${ENV_VAR_NAME}。
使用方法
1. 启动 MCP Server
arthas-mcp
2. 在 Claude Desktop 中配置
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"arthas": {
"command": "arthas-mcp"
}
}
}
3. 可用工具
arthas_list_instances: 列出所有配置的 Arthas 实例arthas_execute: 在指定实例上执行 Arthas 命令
示例
列出所有实例:
arthas_list_instances
执行命令:
arthas_execute(
instance_name="shop-frontend-daily",
command="dashboard",
operator="claude"
)
支持的 Arthas 命令
- dashboard: 系统实时数据面板
- thread: 线程信息
- jvm: JVM 信息
- memory: 内存信息
- watch: 方法执行观测
- trace: 方法调用路径追踪
- stack: 方法调用堆栈
- tt: 时间隧道记录
- monitor: 方法执行监控
- jad: 反编译类
- sc: 查找类
- sm: 查找方法
许可证
MIT License
Metadata
Release files for arthas-mcp-server 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arthas_mcp_server-1.0.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arthas_mcp_server-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / arthas_mcp_server-1.0.1.tar.gz
| Download URL | arthas_mcp_server-1.0.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9901885ee5dfec5047c39739eb7336e1340b1f469e6d258dc30cd5f2bc14634
|
|
BLAKE2b-256 checksum How to use checksums |
334b26e199b2936b0ede06628b6215470898589077d97642085f66199ecb2865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / arthas_mcp_server-1.0.1-py3-none-any.whl
| Download URL | arthas_mcp_server-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e6ff45610727e2fba1286cab9a3f41157c64495f77763b1ed33fd61798e4f6e
|
|
BLAKE2b-256 checksum How to use checksums |
6c859371dad13238ae6f69292d6c26241dc5de5ee0e758b001e68d45b3e9e766
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|