mcp-coroot


Namemcp-coroot JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryMCP server for Coroot observability platform
upload_time2025-07-27 07:35:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords apm coroot mcp metrics monitoring observability tracing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MCP Server for Coroot

[![CI](https://github.com/jamesbrink/mcp-coroot/actions/workflows/ci.yml/badge.svg)](https://github.com/jamesbrink/mcp-coroot/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/jamesbrink/mcp-coroot/branch/main/graph/badge.svg)](https://codecov.io/gh/jamesbrink/mcp-coroot)
[![PyPI version](https://badge.fury.io/py/mcp-coroot.svg)](https://badge.fury.io/py/mcp-coroot)
[![Python versions](https://img.shields.io/pypi/pyversions/mcp-coroot.svg)](https://pypi.org/project/mcp-coroot/)

A Model Context Protocol (MCP) server that provides seamless integration with [Coroot](https://coroot.com) observability platform. This server enables MCP clients to monitor applications, analyze performance metrics, examine logs and traces, and manage infrastructure through Coroot's comprehensive API.

## Getting Started

Add this configuration to your MCP client settings:

```json
{
  "mcpServers": {
    "coroot": {
      "command": "uvx",
      "args": ["mcp-coroot"],
      "env": {
        "COROOT_BASE_URL": "http://localhost:8080",
        "COROOT_USERNAME": "admin",
        "COROOT_PASSWORD": "your-password"
      }
    }
  }
}
```

**Using Docker:**
```json
{
  "mcpServers": {
    "coroot": {
      "command": "docker",
      "args": ["run", "--rm", "-i", 
              "-e", "COROOT_BASE_URL=http://localhost:8080",
              "-e", "COROOT_USERNAME=admin",
              "-e", "COROOT_PASSWORD=your-password",
              "jamesbrink/mcp-coroot:latest"]
    }
  }
}
```

**For SSO/MFA users**, use session cookie authentication instead:

```json
{
  "mcpServers": {
    "coroot": {
      "command": "uvx",
      "args": ["mcp-coroot"],
      "env": {
        "COROOT_BASE_URL": "http://localhost:8080",
        "COROOT_SESSION_COOKIE": "your-auth-cookie-value"
      }
    }
  }
}
```

### Environment Variables

- `COROOT_BASE_URL` - Your Coroot instance URL (required)
- `COROOT_USERNAME` - Username for basic authentication
- `COROOT_PASSWORD` - Password for basic authentication
- `COROOT_SESSION_COOKIE` - Session cookie for SSO/MFA users
- `COROOT_API_KEY` - API key (limited to data ingestion only)

That's it! Your MCP client can now interact with your Coroot instance.

## Features

### Core Capabilities
- **Application Monitoring** - Real-time metrics, health checks, and performance analysis
- **Log Analysis** - Search, filter, and analyze application logs with pattern detection
- **Distributed Tracing** - Trace requests across microservices and identify bottlenecks
- **Infrastructure Overview** - Monitor nodes, containers, and system resources
- **Incident Management** - Track and analyze incidents with root cause analysis
- **Performance Profiling** - CPU and memory profiling with flame graphs

### Management Features
- **Project Management** - Create, configure, and manage Coroot projects
- **Integration Configuration** - Set up Prometheus, Slack, PagerDuty, and more
- **Dashboard Customization** - Create and manage custom dashboards
- **Cost Tracking** - Monitor cloud costs with custom pricing rules
- **User & Access Control** - Manage users, roles, and permissions

### Advanced Features
- **AI-Powered RCA** - Automatic root cause analysis for application issues
- **Risk Assessment** - Identify and track infrastructure and application risks
- **Deployment Tracking** - Monitor deployments and their impact
- **SLO Management** - Configure and track Service Level Objectives
- **Database Instrumentation** - Specialized monitoring for databases

## Installation

### Using uvx (Recommended)
```bash
# Install and run directly
uvx mcp-coroot
```

### Using pip
```bash
pip install mcp-coroot
```

### Using Docker
```bash
docker run --rm -i \
  -e COROOT_BASE_URL="http://localhost:8080" \
  -e COROOT_USERNAME="admin" \
  -e COROOT_PASSWORD="your-password" \
  jamesbrink/mcp-coroot:latest
```

### From Source
```bash
git clone https://github.com/jamesbrink/mcp-coroot.git
cd mcp-coroot
uv sync --all-groups
uv run mcp-coroot
```

## Authentication Methods

### Username/Password
Best for users with basic authentication. The server automatically handles login and session management.

### Session Cookie (SSO/MFA)
Required for organizations using:
- Single Sign-On (SAML, OIDC)
- Multi-Factor Authentication (2FA/MFA)
- Advanced authentication workflows

To get your session cookie:
1. Login to Coroot through your browser
2. Open Developer Tools (F12)
3. Go to Application/Storage → Cookies
4. Copy the value of the `auth` cookie

### API Key
Only supports data ingestion endpoints (`/v1/*`). Cannot be used for management APIs.

## Available Tools

The server provides **61 tools** organized into functional categories:

### 🔐 Authentication & Users (5 tools)
- `get_current_user` - Get authenticated user information
- `update_current_user` - Update user profile
- `list_users` - List all users
- `create_user` - Create new users
- `get_roles` - View roles and permissions

### 📊 Project Management (9 tools)
- `list_projects` - List all accessible projects
- `get_project` - Get project details
- `create_project` - Create new project
- `get_project_status` - Check project health
- `update_project_settings` - Update project configuration
- `delete_project` - Delete project
- `list_api_keys` - View API keys
- `create_api_key` - Generate API keys
- `delete_api_key` - Delete API keys

### 🚀 Application Monitoring (3 tools)
- `get_application` - Comprehensive application metrics
- `get_application_logs` - Search and analyze logs
- `get_application_traces` - View distributed traces

### 🌐 Overview & Analysis (5 tools)
- `get_applications_overview` - All applications summary
- `get_nodes_overview` - Infrastructure overview
- `get_traces_overview` - Tracing summary
- `get_deployments_overview` - Deployment history
- `get_risks_overview` - Risk assessment

### 📈 Dashboard Management (5 tools)
- `list_dashboards` - View dashboards
- `create_dashboard` - Create dashboard
- `get_dashboard` - Get dashboard details
- `update_dashboard` - Update dashboard
- `delete_dashboard` - Remove dashboard

### 🔌 Integrations (4 tools)
- `list_integrations` - View integrations
- `configure_integration` - Configure integration
- `test_integration` - Test connectivity
- `delete_integration` - Remove integration

### ⚙️ Configuration (9 tools)
- `list_inspections` - View inspection types
- `get_inspection_config` - Get inspection settings
- `update_inspection_config` - Update inspections
- `get_application_categories` - View categories
- `create_application_category` - Create new category
- `update_application_category` - Update existing category
- `delete_application_category` - Delete category
- `get_custom_applications` - View custom apps
- `update_custom_applications` - Define custom apps

### 🔍 Advanced Features (15 tools)
Including RCA, profiling, cloud pricing, database instrumentation, SSO/AI configuration, and more.

## Example Usage

### Basic Monitoring
```
"Show me all applications in the production project"
"Check the health status of the API service"
"Are there any critical incidents right now?"
```

### Troubleshooting
```
"Search for error logs in the payment service from the last hour"
"Show me slow database queries"
"Analyze the root cause of high latency in the frontend"
```

### Configuration
```
"Set up Slack notifications for critical alerts"
"Create a dashboard for monitoring Redis performance"
"Configure SLO thresholds for the API service"
```

## Development

### Using Test PyPI Version

To use the pre-release version from Test PyPI:

```json
{
  "mcpServers": {
    "coroot": {
      "command": "uvx",
      "args": [
        "--index-url",
        "https://test.pypi.org/simple/",
        "--extra-index-url",
        "https://pypi.org/simple/",
        "mcp-coroot"
      ],
      "env": {
        "COROOT_BASE_URL": "http://localhost:8080",
        "COROOT_USERNAME": "admin",
        "COROOT_PASSWORD": "your-password"
      }
    }
  }
}
```

Note: The `--extra-index-url` is required because Test PyPI doesn't host all dependencies.

### Testing
```bash
# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov

# Run specific tests
uv run pytest tests/test_server.py -v
```

### Code Quality
```bash
# Type checking
uv run mypy src

# Linting
uv run ruff check src tests

# Formatting
uv run ruff format src tests
```

## API Compatibility

This MCP server is compatible with Coroot v1.0+ and implements the full management API surface. For data ingestion endpoints, use the Coroot API directly with your API key.

## Troubleshooting

### Connection Issues
- Verify Coroot is accessible at the configured URL
- Check firewall rules and network connectivity
- Ensure credentials are correct

### Authentication Errors
- Username/password authentication is recommended for automatic login
- Session cookies expire after 7 days of inactivity
- API keys only work for data ingestion, not management APIs

### Large Response Errors
Some endpoints return large datasets. Use time filters:
- `get_application_traces` - Use `from_timestamp` and `to_timestamp`
- `get_application_profiling` - Limit time range to reduce data size

## Contributing

Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Add tests for new functionality
4. Ensure all tests pass
5. Submit a pull request

## License

MIT License - see LICENSE file for details.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-coroot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "James Brink <james@jamesbrink.net>",
    "keywords": "apm, coroot, mcp, metrics, monitoring, observability, tracing",
    "author": null,
    "author_email": "James Brink <james@jamesbrink.net>",
    "download_url": "https://files.pythonhosted.org/packages/04/9a/7091f91d7708fe3b66fc4f70183ec1c20d71eaa529cf8d63944b8b4b6f68/mcp_coroot-0.1.1.tar.gz",
    "platform": null,
    "description": "# MCP Server for Coroot\n\n[![CI](https://github.com/jamesbrink/mcp-coroot/actions/workflows/ci.yml/badge.svg)](https://github.com/jamesbrink/mcp-coroot/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/jamesbrink/mcp-coroot/branch/main/graph/badge.svg)](https://codecov.io/gh/jamesbrink/mcp-coroot)\n[![PyPI version](https://badge.fury.io/py/mcp-coroot.svg)](https://badge.fury.io/py/mcp-coroot)\n[![Python versions](https://img.shields.io/pypi/pyversions/mcp-coroot.svg)](https://pypi.org/project/mcp-coroot/)\n\nA Model Context Protocol (MCP) server that provides seamless integration with [Coroot](https://coroot.com) observability platform. This server enables MCP clients to monitor applications, analyze performance metrics, examine logs and traces, and manage infrastructure through Coroot's comprehensive API.\n\n## Getting Started\n\nAdd this configuration to your MCP client settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"coroot\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-coroot\"],\n      \"env\": {\n        \"COROOT_BASE_URL\": \"http://localhost:8080\",\n        \"COROOT_USERNAME\": \"admin\",\n        \"COROOT_PASSWORD\": \"your-password\"\n      }\n    }\n  }\n}\n```\n\n**Using Docker:**\n```json\n{\n  \"mcpServers\": {\n    \"coroot\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \n              \"-e\", \"COROOT_BASE_URL=http://localhost:8080\",\n              \"-e\", \"COROOT_USERNAME=admin\",\n              \"-e\", \"COROOT_PASSWORD=your-password\",\n              \"jamesbrink/mcp-coroot:latest\"]\n    }\n  }\n}\n```\n\n**For SSO/MFA users**, use session cookie authentication instead:\n\n```json\n{\n  \"mcpServers\": {\n    \"coroot\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-coroot\"],\n      \"env\": {\n        \"COROOT_BASE_URL\": \"http://localhost:8080\",\n        \"COROOT_SESSION_COOKIE\": \"your-auth-cookie-value\"\n      }\n    }\n  }\n}\n```\n\n### Environment Variables\n\n- `COROOT_BASE_URL` - Your Coroot instance URL (required)\n- `COROOT_USERNAME` - Username for basic authentication\n- `COROOT_PASSWORD` - Password for basic authentication\n- `COROOT_SESSION_COOKIE` - Session cookie for SSO/MFA users\n- `COROOT_API_KEY` - API key (limited to data ingestion only)\n\nThat's it! Your MCP client can now interact with your Coroot instance.\n\n## Features\n\n### Core Capabilities\n- **Application Monitoring** - Real-time metrics, health checks, and performance analysis\n- **Log Analysis** - Search, filter, and analyze application logs with pattern detection\n- **Distributed Tracing** - Trace requests across microservices and identify bottlenecks\n- **Infrastructure Overview** - Monitor nodes, containers, and system resources\n- **Incident Management** - Track and analyze incidents with root cause analysis\n- **Performance Profiling** - CPU and memory profiling with flame graphs\n\n### Management Features\n- **Project Management** - Create, configure, and manage Coroot projects\n- **Integration Configuration** - Set up Prometheus, Slack, PagerDuty, and more\n- **Dashboard Customization** - Create and manage custom dashboards\n- **Cost Tracking** - Monitor cloud costs with custom pricing rules\n- **User & Access Control** - Manage users, roles, and permissions\n\n### Advanced Features\n- **AI-Powered RCA** - Automatic root cause analysis for application issues\n- **Risk Assessment** - Identify and track infrastructure and application risks\n- **Deployment Tracking** - Monitor deployments and their impact\n- **SLO Management** - Configure and track Service Level Objectives\n- **Database Instrumentation** - Specialized monitoring for databases\n\n## Installation\n\n### Using uvx (Recommended)\n```bash\n# Install and run directly\nuvx mcp-coroot\n```\n\n### Using pip\n```bash\npip install mcp-coroot\n```\n\n### Using Docker\n```bash\ndocker run --rm -i \\\n  -e COROOT_BASE_URL=\"http://localhost:8080\" \\\n  -e COROOT_USERNAME=\"admin\" \\\n  -e COROOT_PASSWORD=\"your-password\" \\\n  jamesbrink/mcp-coroot:latest\n```\n\n### From Source\n```bash\ngit clone https://github.com/jamesbrink/mcp-coroot.git\ncd mcp-coroot\nuv sync --all-groups\nuv run mcp-coroot\n```\n\n## Authentication Methods\n\n### Username/Password\nBest for users with basic authentication. The server automatically handles login and session management.\n\n### Session Cookie (SSO/MFA)\nRequired for organizations using:\n- Single Sign-On (SAML, OIDC)\n- Multi-Factor Authentication (2FA/MFA)\n- Advanced authentication workflows\n\nTo get your session cookie:\n1. Login to Coroot through your browser\n2. Open Developer Tools (F12)\n3. Go to Application/Storage \u2192 Cookies\n4. Copy the value of the `auth` cookie\n\n### API Key\nOnly supports data ingestion endpoints (`/v1/*`). Cannot be used for management APIs.\n\n## Available Tools\n\nThe server provides **61 tools** organized into functional categories:\n\n### \ud83d\udd10 Authentication & Users (5 tools)\n- `get_current_user` - Get authenticated user information\n- `update_current_user` - Update user profile\n- `list_users` - List all users\n- `create_user` - Create new users\n- `get_roles` - View roles and permissions\n\n### \ud83d\udcca Project Management (9 tools)\n- `list_projects` - List all accessible projects\n- `get_project` - Get project details\n- `create_project` - Create new project\n- `get_project_status` - Check project health\n- `update_project_settings` - Update project configuration\n- `delete_project` - Delete project\n- `list_api_keys` - View API keys\n- `create_api_key` - Generate API keys\n- `delete_api_key` - Delete API keys\n\n### \ud83d\ude80 Application Monitoring (3 tools)\n- `get_application` - Comprehensive application metrics\n- `get_application_logs` - Search and analyze logs\n- `get_application_traces` - View distributed traces\n\n### \ud83c\udf10 Overview & Analysis (5 tools)\n- `get_applications_overview` - All applications summary\n- `get_nodes_overview` - Infrastructure overview\n- `get_traces_overview` - Tracing summary\n- `get_deployments_overview` - Deployment history\n- `get_risks_overview` - Risk assessment\n\n### \ud83d\udcc8 Dashboard Management (5 tools)\n- `list_dashboards` - View dashboards\n- `create_dashboard` - Create dashboard\n- `get_dashboard` - Get dashboard details\n- `update_dashboard` - Update dashboard\n- `delete_dashboard` - Remove dashboard\n\n### \ud83d\udd0c Integrations (4 tools)\n- `list_integrations` - View integrations\n- `configure_integration` - Configure integration\n- `test_integration` - Test connectivity\n- `delete_integration` - Remove integration\n\n### \u2699\ufe0f Configuration (9 tools)\n- `list_inspections` - View inspection types\n- `get_inspection_config` - Get inspection settings\n- `update_inspection_config` - Update inspections\n- `get_application_categories` - View categories\n- `create_application_category` - Create new category\n- `update_application_category` - Update existing category\n- `delete_application_category` - Delete category\n- `get_custom_applications` - View custom apps\n- `update_custom_applications` - Define custom apps\n\n### \ud83d\udd0d Advanced Features (15 tools)\nIncluding RCA, profiling, cloud pricing, database instrumentation, SSO/AI configuration, and more.\n\n## Example Usage\n\n### Basic Monitoring\n```\n\"Show me all applications in the production project\"\n\"Check the health status of the API service\"\n\"Are there any critical incidents right now?\"\n```\n\n### Troubleshooting\n```\n\"Search for error logs in the payment service from the last hour\"\n\"Show me slow database queries\"\n\"Analyze the root cause of high latency in the frontend\"\n```\n\n### Configuration\n```\n\"Set up Slack notifications for critical alerts\"\n\"Create a dashboard for monitoring Redis performance\"\n\"Configure SLO thresholds for the API service\"\n```\n\n## Development\n\n### Using Test PyPI Version\n\nTo use the pre-release version from Test PyPI:\n\n```json\n{\n  \"mcpServers\": {\n    \"coroot\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--index-url\",\n        \"https://test.pypi.org/simple/\",\n        \"--extra-index-url\",\n        \"https://pypi.org/simple/\",\n        \"mcp-coroot\"\n      ],\n      \"env\": {\n        \"COROOT_BASE_URL\": \"http://localhost:8080\",\n        \"COROOT_USERNAME\": \"admin\",\n        \"COROOT_PASSWORD\": \"your-password\"\n      }\n    }\n  }\n}\n```\n\nNote: The `--extra-index-url` is required because Test PyPI doesn't host all dependencies.\n\n### Testing\n```bash\n# Run all tests\nuv run pytest\n\n# Run with coverage\nuv run pytest --cov\n\n# Run specific tests\nuv run pytest tests/test_server.py -v\n```\n\n### Code Quality\n```bash\n# Type checking\nuv run mypy src\n\n# Linting\nuv run ruff check src tests\n\n# Formatting\nuv run ruff format src tests\n```\n\n## API Compatibility\n\nThis MCP server is compatible with Coroot v1.0+ and implements the full management API surface. For data ingestion endpoints, use the Coroot API directly with your API key.\n\n## Troubleshooting\n\n### Connection Issues\n- Verify Coroot is accessible at the configured URL\n- Check firewall rules and network connectivity\n- Ensure credentials are correct\n\n### Authentication Errors\n- Username/password authentication is recommended for automatic login\n- Session cookies expire after 7 days of inactivity\n- API keys only work for data ingestion, not management APIs\n\n### Large Response Errors\nSome endpoints return large datasets. Use time filters:\n- `get_application_traces` - Use `from_timestamp` and `to_timestamp`\n- `get_application_profiling` - Limit time range to reduce data size\n\n## Contributing\n\nContributions are welcome! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Ensure all tests pass\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MCP server for Coroot observability platform",
    "version": "0.1.1",
    "project_urls": {
        "Documentation": "https://github.com/jamesbrink/mcp-coroot#readme",
        "Homepage": "https://github.com/jamesbrink/mcp-coroot",
        "Issues": "https://github.com/jamesbrink/mcp-coroot/issues",
        "Repository": "https://github.com/jamesbrink/mcp-coroot"
    },
    "split_keywords": [
        "apm",
        " coroot",
        " mcp",
        " metrics",
        " monitoring",
        " observability",
        " tracing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9b76f0a45eaabaa091fcb86dac78e2815f63cd8c96976bc570f496880a68a3a5",
                "md5": "40dae46e637152c6fa92a29bfb1ef27b",
                "sha256": "61709ab757fbb7adfaf4c63ae3d95317f076837bc3b443a5ea27c7e1938303aa"
            },
            "downloads": -1,
            "filename": "mcp_coroot-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40dae46e637152c6fa92a29bfb1ef27b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 23672,
            "upload_time": "2025-07-27T07:35:45",
            "upload_time_iso_8601": "2025-07-27T07:35:45.812829Z",
            "url": "https://files.pythonhosted.org/packages/9b/76/f0a45eaabaa091fcb86dac78e2815f63cd8c96976bc570f496880a68a3a5/mcp_coroot-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "049a7091f91d7708fe3b66fc4f70183ec1c20d71eaa529cf8d63944b8b4b6f68",
                "md5": "d594cf88ab446db91527474d360601d1",
                "sha256": "5909f91e7521d1ed9d7963af5528d39a84dbda5a38b39003afde4305fc118f43"
            },
            "downloads": -1,
            "filename": "mcp_coroot-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d594cf88ab446db91527474d360601d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 107486,
            "upload_time": "2025-07-27T07:35:47",
            "upload_time_iso_8601": "2025-07-27T07:35:47.346378Z",
            "url": "https://files.pythonhosted.org/packages/04/9a/7091f91d7708fe3b66fc4f70183ec1c20d71eaa529cf8d63944b8b4b6f68/mcp_coroot-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 07:35:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jamesbrink",
    "github_project": "mcp-coroot#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mcp-coroot"
}
        
Elapsed time: 2.31654s