Metadata-Version: 2.4
Name: glowroot-mcp-server
Version: 0.1.0
Summary: MCP Server para análise de traces do Glowroot
Author-email: Iago Mauricio <iagomauricio7@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/iagomauricio/glowroot-mcp
Project-URL: Repository, https://github.com/iagomauricio/glowroot-mcp
Project-URL: Issues, https://github.com/iagomauricio/glowroot-mcp/issues
Keywords: mcp,glowroot,traces,monitoring,java,apm,model-context-protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Dynamic: license-file

# Glowroot MCP Server

An MCP (Model Context Protocol) server that enables AI assistants to analyze Java application traces captured by [Glowroot](https://glowroot.org), an open-source APM tool.

## Features

- **list_recent_errors** — List recent errors within a time window
- **analyze_trace** — Deep-dive into a specific trace with execution tree and stack traces
- **find_timeout_errors** — Find timeout-related errors (SocketTimeoutException, etc.)
- **analyze_error_patterns** — Group errors by transaction and identify the most affected
- **get_error_by_message** — Search errors by message text (e.g. "NullPointerException")

## Installation

```bash
pipx install glowroot-mcp-server
```

Or with pip:

```bash
pip install glowroot-mcp-server
```

## Configuration

Set environment variables or create a `.env` file:

```env
GLOWROOT_URL=http://localhost:4000
GLOWROOT_AGENT_ID=
```

| Variable | Description | Default |
|---|---|---|
| `GLOWROOT_URL` | Base URL of the Glowroot instance | `http://localhost:4000` |
| `GLOWROOT_AGENT_ID` | Agent ID for multi-agent setups | empty (single agent) |

## Usage

### As a standalone server

```bash
glowroot-mcp
```

### With Claude Desktop / Kiro

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "glowroot": {
      "command": "glowroot-mcp",
      "env": {
        "GLOWROOT_URL": "http://localhost:4000",
        "GLOWROOT_AGENT_ID": ""
      }
    }
  }
}
```


### With pipx

If installed via `pipx`, the `glowroot-mcp` command is available globally:

```json
{
  "mcpServers": {
    "glowroot": {
      "command": "glowroot-mcp",
      "env": {
        "GLOWROOT_URL": "http://localhost:4000"
      }
    }
  }
}
```

## Requirements

- Python 3.10+
- A running [Glowroot](https://glowroot.org) instance monitoring your Java application

## License

MIT
