Skip to main content

A Model Context Protocol server for Rootly APIs using OpenAPI spec

Project description

Rootly MCP Server

An MCP server for the Rootly API that integrates seamlessly with MCP-compatible editors like Cursor, Windsurf, and Claude. Resolve production incidents in under a minute without leaving your IDE.

Install MCP Server

Demo GIF

Prerequisites

  • Python 3.12 or higher
  • uv package manager
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  • Rootly API token

Installation

Install via our PyPi package or by cloning this repository.

Configure your MCP-compatible editor (tested with Cursor and Windsurf) with the following:

With uv

{
  "mcpServers": {
    "rootly": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "rootly-mcp-server",
        "rootly-mcp-server",
      ],      
      "env": {
        "ROOTLY_API_TOKEN": "<YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}

With uv-tool-uvx

{
  "mcpServers": {
    "rootly": {
      "command": "uvx",
      "args": [
        "--from",
        "rootly-mcp-server",
        "rootly-mcp-server",
      ],      
      "env": {
        "ROOTLY_API_TOKEN": "<YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}

To customize allowed_paths and access additional Rootly API paths, clone the repository and use this configuration:

{
  "mcpServers": {
    "rootly": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/rootly-mcp-server",
        "rootly-mcp-server"
      ],
      "env": {
        "ROOTLY_API_TOKEN": "<YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}

Features

  • Dynamic Tool Generation: Automatically creates MCP resources from Rootly's OpenAPI (Swagger) specification
  • Smart Pagination: Defaults to 10 items per request for incident endpoints to prevent context window overflow
  • API Filtering: Limits exposed API endpoints for security and performance

Whitelisted Endpoints

By default, the following Rootly API endpoints are exposed to the AI agent (see allowed_paths in src/rootly_mcp_server/server.py):

/v1/incidents
/v1/incidents/{incident_id}/alerts
/v1/alerts
/v1/alerts/{alert_id}
/v1/severities
/v1/severities/{severity_id}
/v1/teams
/v1/teams/{team_id}
/v1/services
/v1/services/{service_id}
/v1/functionalities
/v1/functionalities/{functionality_id}
/v1/incident_types
/v1/incident_types/{incident_type_id}
/v1/incident_action_items
/v1/incident_action_items/{incident_action_item_id}
/v1/incidents/{incident_id}/action_items
/v1/workflows
/v1/workflows/{workflow_id}
/v1/workflow_runs
/v1/workflow_runs/{workflow_run_id}
/v1/environments
/v1/environments/{environment_id}
/v1/users
/v1/users/{user_id}
/v1/users/me
/v1/status_pages
/v1/status_pages/{status_page_id}

Why Path Limiting?

We limit exposed API paths for two key reasons:

  1. Context Management: Rootly's comprehensive API can overwhelm AI agents, affecting their ability to perform simple tasks effectively
  2. Security: Control which information and actions are accessible through the MCP server

To expose additional paths, modify the allowed_paths variable in src/rootly_mcp_server/server.py.

About Rootly AI Labs

This project was developed by Rootly AI Labs, where we're building the future of system reliability and operational excellence. As an open-source incubator, we share ideas, experiment, and rapidly prototype solutions that benefit the entire community. Rootly AI logo

Developer Setup & Troubleshooting

Prerequisites

  • Python 3.12 or higher
  • uv for dependency management

1. Set Up Virtual Environment

Create and activate a virtual environment:

uv venv .venv
source .venv/bin/activate  # Always activate before running scripts

2. Install Dependencies

Install all project dependencies:

uv pip install .

To add new dependencies during development:

uv pip install <package>

3. Verify Installation

Run the test client to ensure everything is configured correctly:

python test_mcp_client.py

Connect to Hosted MCP Server

Alternatively, connect directly to our hosted MCP server:

{
  "mcpServers": {
    "rootly": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.rootly.com/sse",
        "--header",
        "Authorization:${ROOTLY_AUTH_HEADER}"
      ],
      "env": {
        "ROOTLY_AUTH_HEADER": "Bearer <YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rootly_mcp_server-2.0.4.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rootly_mcp_server-2.0.4-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file rootly_mcp_server-2.0.4.tar.gz.

File metadata

  • Download URL: rootly_mcp_server-2.0.4.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for rootly_mcp_server-2.0.4.tar.gz
Algorithm Hash digest
SHA256 6add8168d61abe822dad6295a4c3f66dd6b8e86e0edba6a52ec0aba60094a8b0
MD5 bd71e2807a82ce2c90a45c0ac906d4ec
BLAKE2b-256 b6e7d5fde8a61656f992fe4e7a3cc806c170ae46f4090ed312cb0f551c1ae18b

See more details on using hashes here.

File details

Details for the file rootly_mcp_server-2.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for rootly_mcp_server-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 27aafa08f4ad5f8cc1314d94b56fc1f68b7eeca909a67eedccbd3989b2c6ce7c
MD5 2124a4c16a89ad1087f633eb3377c034
BLAKE2b-256 4672aaecfa14881b61b4f6740eda0f4d93bc7ac4cb4061c695cde14bada8e277

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page