Skip to main content

Secure Model Context Protocol server for Rootly APIs with AI SRE capabilities, comprehensive error handling, and input validation

Project description

Rootly MCP Server

PyPI version PyPI - Downloads Python Version Install 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.

Demo GIF

Prerequisites

  • Python 3.12 or higher
  • uv package manager
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  • Rootly API token with appropriate permissions (see below)

API Token Permissions

The MCP server requires a Rootly API token. Choose the appropriate token type based on your needs:

  • Global API Key (Recommended): Full access to all entities across your Rootly instance. Required for organization-wide visibility across teams, schedules, and incidents.
  • Team API Key: Team Admin permissions with full read/edit access to entities owned by that team. Suitable for team-specific workflows.
  • Personal API Key: Inherits the permissions of the user who created it. Works for individual use cases but may have limited visibility.

For full functionality of tools like get_oncall_handoff_summary, get_oncall_shift_metrics, and organization-wide incident search, a Global API Key is recommended.

Installation

Configure your MCP-compatible editor (tested with Cursor) with one of the configurations below. The package will be automatically downloaded and installed when you first open your editor.

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 uvx

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

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>"
      }
    }
  }
}

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
  • Intelligent Incident Analysis: Smart tools that analyze historical incident data
    • find_related_incidents: Uses TF-IDF similarity analysis to find historically similar incidents
    • suggest_solutions: Mines past incident resolutions to recommend actionable solutions
  • MCP Resources: Exposes incident and team data as structured resources for easy AI reference
  • Intelligent Pattern Recognition: Automatically identifies services, error types, and resolution patterns
  • On-Call Health Integration: Detects burnout risk in scheduled responders

On-Call Health Integration

Rootly MCP integrates with On-Call Health to detect burnout risk in scheduled responders.

Setup

Set the ONCALLHEALTH_API_KEY environment variable:

{
  "mcpServers": {
    "rootly": {
      "command": "uvx",
      "args": ["rootly-mcp-server"],
      "env": {
        "ROOTLY_API_TOKEN": "your_rootly_token",
        "ONCALLHEALTH_API_KEY": "och_live_your_key"
      }
    }
  }
}

Usage

check_oncall_burnout_risk(
    start_date="2026-02-09",
    end_date="2026-02-15"
)

Returns at-risk users who are scheduled, recommended safe replacements, and action summaries.

Example Skills

Want to get started quickly? We provide pre-built Claude Code skills that showcase the full power of the Rootly MCP server:

🚨 Rootly Incident Responder

An AI-powered incident response specialist that:

  • Analyzes production incidents with full context
  • Finds similar historical incidents using ML-based similarity matching
  • Suggests solutions based on past successful resolutions
  • Coordinates with on-call teams across timezones
  • Correlates incidents with recent code changes and deployments
  • Creates action items and remediation plans
  • Provides confidence scores and time estimates

Quick Start:

# Copy the skill to your project
mkdir -p .claude/skills
cp examples/skills/rootly-incident-responder.md .claude/skills/

# Then in Claude Code, invoke it:
# @rootly-incident-responder analyze incident #12345

This skill demonstrates a complete incident response workflow using Rootly's intelligent tools combined with GitHub integration for code correlation.

On-Call Shift Metrics

Get on-call shift metrics for any time period, grouped by user, team, or schedule. Includes primary/secondary role tracking, shift counts, hours, and days on-call.

get_oncall_shift_metrics(
    start_date="2025-10-01",
    end_date="2025-10-31",
    group_by="user"
)

On-Call Handoff Summary

Complete handoff: current/next on-call + incidents during shifts.

# All on-call (any timezone)
get_oncall_handoff_summary(
    team_ids="team-1,team-2",
    timezone="America/Los_Angeles"
)

# Regional filter - only show APAC on-call during APAC business hours
get_oncall_handoff_summary(
    timezone="Asia/Tokyo",
    filter_by_region=True
)

Regional filtering shows only people on-call during business hours (9am-5pm) in the specified timezone.

Returns: schedules with current_oncall, next_oncall, and shift_incidents

Shift Incidents

Incidents during a time period, with filtering by severity/status/tags.

get_shift_incidents(
    start_time="2025-10-20T09:00:00Z",
    end_time="2025-10-20T17:00:00Z",
    severity="critical",  # optional
    status="resolved",    # optional
    tags="database,api"   # optional
)

Returns: incidents list + summary (counts, avg resolution time, grouping)

Contributing

See CONTRIBUTING.md for developer setup and guidelines.

Play with it on Postman

Run In Postman

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

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.1.4.tar.gz (6.4 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.1.4-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rootly_mcp_server-2.1.4.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rootly_mcp_server-2.1.4.tar.gz
Algorithm Hash digest
SHA256 3f2a00cb7127b17719d55240a45bb7ed6dca9375453d3e3d955f50a8c37b2e74
MD5 2490ebcc82baedc336c1c21db7c92195
BLAKE2b-256 53b56216780d550c889969e6bf3cb21da0e078aeb2a575f98ddac8677f28fe8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rootly_mcp_server-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a34ab1590cd31e4a36ecdad92ea4e5762963053f077a0c4f2ee16394defe25b4
MD5 fbe9e2bc4e1af4d2d5fccf7cbcb9240a
BLAKE2b-256 1609e2dbf0a0310c373948e0e2bf6d63cde54a898c1c47da14f9ef0d990ed60e

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