Metadata-Version: 2.4
Name: iflow-mcp_toby1123yjh-arthas-mcp-server
Version: 0.1.0
Summary: Java Performance Analysis & Diagnostics - LLM-powered MCP Server for real-time monitoring, memory analysis, thread profiling, and system optimization
Project-URL: Homepage, https://github.com/arthas-mcp/arthas-mcp-server
Project-URL: Repository, https://github.com/arthas-mcp/arthas-mcp-server
Project-URL: Issues, https://github.com/arthas-mcp/arthas-mcp-server/issues
Author-email: Arthas MCP Team <team@arthas-mcp.com>
License: MIT
Keywords: analysis,arthas,diagnostics,java,llm,mcp,monitoring,optimization,performance,profiling
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Requires-Dist: aiofiles>=23.1.0
Requires-Dist: fastmcp>=2.11.3
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.11.7
Requires-Dist: uvicorn>=0.35.0
Requires-Dist: websockets>=12.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: isort>=5.12.0; extra == 'dev'
Requires-Dist: mypy>=1.5.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Arthas MCP Server

[![中文](https://img.shields.io/badge/lang-中文-blue.svg)](README.zh-CN.md)

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 
![示例图片](./usecase/case1.jpg)

## Quick Start


### Install
```bash
uv sync
```

### Run
```bash
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`

```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

```bash
uv sync --extra dev
```
