Course
Give your AI a permanent memory of your business. A course for people who use ChatGPT or Claude daily.Compound Context
cloudPythonApache-2.0

About Rootly-MCP-server

This tool links your AI assistant to your Rootly account so you can manage incidents and schedules from your editor. Search past outages, check on-call shifts, find similar problems, and get proven fixes without switching apps.

Tools (101)

check_oncall_health_risk

Checks on-call health risk and detects workload health risk in scheduled responders.

check_responder_availability

Checks the availability of on-call responders.

create_override_recommendation

Creates an override recommendation for on-call schedules.

find_related_incidents

Uses TF-IDF similarity analysis to find historically similar incidents.

getIncident

Retrieve a single incident for direct verification, including PIR-related fields.

get_alert_by_short_id

Retrieves an alert by its short ID.

get_oncall_handoff_summary

Provides complete handoff summary: current/next on-call + incidents during shifts.

get_oncall_schedule_summary

Gets summary information for on-call schedules.

get_oncall_shift_metrics

Gets on-call shift metrics grouped by user, team, or schedule.

get_server_version

Retrieves the current server version.

get_shift_incidents

Lists incidents during a specified time period with optional severity, status, and tag filters.

list_endpoints

Lists available API endpoints.

list_shifts

Lists on-call shifts.

search_incidents

Searches for incidents based on query parameters.

suggest_solutions

Mines past incident resolutions to recommend actionable solutions.

updateIncident

Scoped incident update tool for summary and retrospective_progress_status.

attachAlert

Attaches an alert to an entity.

createAlert

Creates a new alert.

createEnvironment

Creates a new environment.

createEscalationLevel

Creates a new escalation level.

createEscalationLevelPaths

Creates paths for an escalation level.

createEscalationPath

Creates a new escalation path.

createEscalationPolicy

Creates a new escalation policy.

createFunctionality

Creates a new functionality.

createIncidentActionItem

Creates a new incident action item.

createIncidentType

Creates a new incident type.

createOnCallRole

Creates a new on-call role.

createOnCallShadow

Creates a new on-call shadow.

createOverrideShift

Creates an override shift.

createSchedule

Creates a new on-call schedule.

createScheduleRotation

Creates a schedule rotation.

createScheduleRotationActiveDay

Creates an active day for a schedule rotation.

createScheduleRotationUser

Creates a user assignment for a schedule rotation.

createService

Creates a new service.

createSeverity

Creates a new severity level.

createTeam

Creates a new team.

createWorkflow

Creates a new workflow.

deleteEscalationLevel

Deletes an escalation level.

deleteEscalationPath

Deletes an escalation path.

deleteEscalationPolicy

Deletes an escalation policy.

deleteSchedule

Deletes a schedule.

deleteScheduleRotation

Deletes a schedule rotation.

getAlert

Retrieves a specific alert.

getCurrentUser

Retrieves the current authenticated user.

getEnvironment

Retrieves a specific environment.

getEscalationLevel

Retrieves a specific escalation level.

getEscalationPath

Retrieves a specific escalation path.

getEscalationPolicy

Retrieves a specific escalation policy.

getFunctionality

Retrieves a specific functionality.

getIncidentType

Retrieves a specific incident type.

getOnCallRole

Retrieves a specific on-call role.

getOnCallShadow

Retrieves a specific on-call shadow.

getOverrideShift

Retrieves a specific override shift.

getSchedule

Retrieves a specific schedule.

getScheduleRotation

Retrieves a specific schedule rotation.

getScheduleShifts

Retrieves shifts for a schedule.

getService

Retrieves a specific service.

getSeverity

Retrieves a specific severity.

getTeam

Retrieves a specific team.

getUser

Retrieves a specific user.

getWorkflow

Retrieves a specific workflow.

listAlerts

Lists all alerts.

listEnvironments

Lists all environments.

listEscalationLevels

Lists all escalation levels.

listEscalationLevelsPaths

Lists paths for escalation levels.

listEscalationPaths

Lists all escalation paths.

listEscalationPolicies

Lists all escalation policies.

listFunctionalities

Lists all functionalities.

listIncidentActionItems

Lists incident action items.

listIncidentAlerts

Lists alerts associated with an incident.

listIncident_Types

Lists all incident types.

listOnCallRoles

Lists all on-call roles.

listOnCallShadows

Lists all on-call shadows.

listOverrideShifts

Lists all override shifts.

listScheduleRotationActiveDays

Lists active days for schedule rotations.

listScheduleRotationUsers

Lists users for schedule rotations.

listScheduleRotations

Lists all schedule rotations.

listSchedules

Lists all schedules.

listServices

Lists all services.

listSeverities

Lists all severities.

listShifts

Lists all shifts.

listTeams

Lists all teams.

listUsers

Lists all users.

listWorkflows

Lists all workflows.

updateAlert

Updates an existing alert.

updateEnvironment

Updates an existing environment.

updateEscalationLevel

Updates an existing escalation level.

updateEscalationPath

Updates an existing escalation path.

updateEscalationPolicy

Updates an existing escalation policy.

updateFunctionality

Updates an existing functionality.

updateIncidentType

Updates an existing incident type.

updateOnCallRole

Updates an existing on-call role.

updateOnCallShadow

Updates an existing on-call shadow.

updateOverrideShift

Updates an existing override shift.

updateSchedule

Updates an existing schedule.

updateScheduleRotation

Updates an existing schedule rotation.

updateService

Updates an existing service.

updateSeverity

Updates an existing severity.

updateTeam

Updates an existing team.

updateUser

Updates an existing user.

updateWorkflow

Updates an existing workflow.

README

<!-- mcp-name: com.rootly/mcp-server -->

Rootly MCP Server

PyPI version PyPI - Downloads Python Version Install MCP Server

An MCP server for the Rootly API for Cursor, Windsurf, Claude, and other MCP clients.

Demo GIF

Quick Start

Use the hosted MCP server. No local installation required.

Hosted Transport Options

  • Streamable HTTP (recommended): https://mcp.rootly.com/mcp
  • SSE (fallback): https://mcp.rootly.com/sse
  • Code Mode: https://mcp.rootly.com/mcp-codemode

General Remote Setup

Default remote config (HTTP streamable):

{
  "mcpServers": {
    "rootly": {
      "url": "https://mcp.rootly.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_ROOTLY_API_TOKEN"
      }
    }
  }
}

SSE fallback:

{
  "mcpServers": {
    "rootly": {
      "url": "https://mcp.rootly.com/sse",
      "headers": {
        "Authorization": "Bearer YOUR_ROOTLY_API_TOKEN"
      }
    }
  }
}

Code Mode:

{
  "mcpServers": {
    "rootly": {
      "url": "https://mcp.rootly.com/mcp-codemode",
      "headers": {
        "Authorization": "Bearer YOUR_ROOTLY_API_TOKEN"
      }
    }
  }
}

Agent Setup

<details> <summary><strong>Claude Code</strong></summary> <br>

Streamable HTTP

claude mcp add --transport http rootly https://mcp.rootly.com/mcp \
  --header "Authorization: Bearer YOUR_ROOTLY_API_TOKEN"

Code Mode:

claude mcp add rootly-codemode --transport http https://mcp.rootly.com/mcp-codemode \
  --header "Authorization: Bearer YOUR_ROOTLY_API_TOKEN"

SSE fallback:

claude mcp add --transport sse rootly-sse https://mcp.rootly.com/sse \
  --header "Authorization: Bearer YOUR_ROOTLY_API_TOKEN"

Manual Configuration

Create .mcp.json in your project root:

{
  "mcpServers": {
    "rootly": {
      "type": "sse",
      "url": "https://mcp.rootly.com/sse",
      "headers": {
        "Authorization": "Bearer YOUR_ROOTLY_API_TOKEN"
      }
    }
  }
}

Restart Claude Code after updating the config.

</details> <details> <summary><strong>Gemini CLI</strong></summary> <br>

Install the extension:

gemini extensions install https://github.com/Rootly-AI-Labs/Rootly-MCP-server

Or configure manually in ~/.gemini/settings.json:

{
  "mcpServers": {
    "rootly": {
      "command": "uvx",
      "args": ["--from", "rootly-mcp-server", "rootly-mcp-server"],
      "env": {
        "ROOTLY_API_TOKEN": "<YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}
</details> <details> <summary><strong>Cursor</strong></summary> <br>

Add to .cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "rootly": {
      "url": "https://mcp.rootly.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}
</details> <details> <summary><strong>Windsurf</strong></summary> <br>

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "rootly": {
      "serverUrl": "https://mcp.rootly.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_ROOTLY_API_TOKEN>"
      }
    }
  }
}
</details> <details> <summary><strong>Codex</strong></summary> <br>

Add to ~/.codex/config.toml:

[mcp_servers.rootly]
url = "https://mcp.rootly.com/mcp"
bearer_token_env_var = "ROOTLY_API_TOKEN"
</details> <details> <summary><strong>Claude Desktop</strong></summary> <br>

Add to claude_desktop_config.json:

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

Rootly CLI

Standalone CLI for incidents, alerts, services, and on-call operations.

Install via Homebrew:

brew install rootlyhq/tap/rootly-cli

Or via Go:

go install github.com/rootlyhq/rootly-cli/cmd/rootly@latest

For more details, see the Rootly CLI repository.

Alternative Installation (Local)

Run the MCP server locally if you do not want to use the hosted service.

Prerequisites

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

API Token Types

Choose the token type based on the access you need:

  • Global API Key: Full access across the Rootly instance. Best for organization-wide visibility.
  • Team API Key: Access limited to entities owned by that team.
  • Personal API Key: Access matches the user who created it.

A Global API Key is recommended for tools like get_oncall_handoff_summary, get_oncall_shift_metrics, and org-wide incident search.

With uv

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

Self-Hosted Transport Options

Choose one transport per server process:

  • Streamable HTTP endpoint path: /mcp
  • SSE endpoint path: /sse
  • Code Mode (experimental) endpoint path: /mcp-codemode in hosted dual-transport mode

Example Docker run (Streamable HTTP):

docker run -p 8000:8000 \
  -e ROOTLY_TRANSPORT=streamable-http \
  -e ROOTLY_API_TOKEN=<YOUR_ROOTLY_API_TOKEN> \
  rootly-mcp-server

Example Docker run (SSE):

docker run -p 8000:8000 \
  -e ROOTLY_TRANSPORT=sse \
  -e ROOTLY_API_TOKEN=<YOUR_ROOTLY_API_TOKEN> \
  rootly-mcp-server

Example Docker run (Dual transport + Code Mode):

docker run -p 8000:8000 \
  -e ROOTLY_TRANSPORT=both \
  -e ROOTLY_API_TOKEN=<YOUR_ROOTLY_API_TOKEN> \
  rootly-mcp-server

With uvx

{
  "mcpServers": {
    "rootly": {
      "command": "uvx",
      "args": [
        "--from",
        "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
  • 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 workload health risk in scheduled responders

Supported Tools

The default server configuration exposes 101 tools.

Custom Agentic Tools

  • check_oncall_health_risk
  • check_responder_availability
  • create_override_recommendation
  • find_related_incidents
  • getIncident - retrieve a single incident for direct verification, including PIR-related fields
  • get_alert_by_short_id
  • get_oncall_handoff_summary
  • get_oncall_schedule_summary
  • get_oncall_shift_metrics
  • get_server_version
  • get_shift_incidents
  • list_endpoints
  • list_shifts
  • search_incidents
  • suggest_solutions
  • updateIncident - scoped incident update tool for summary and retrospective_progress_status

OpenAPI-Generated Tools

attachAlert
createAlert
createEnvironment
createEscalationLevel
createEscalationLevelPaths
createEscalationPath
createEscalationPolicy
createFunctionality
createIncidentActionItem
createIncidentType
createOnCallRole
createOnCallShadow
createOverrideShift
createSchedule
createScheduleRotation
createScheduleRotationActiveDay
createScheduleRotationUser
createService
createSeverity
createTeam
createWorkflow
deleteEscalationLevel
deleteEscalationPath
deleteEscalationPolicy
deleteSchedule
deleteScheduleRotation
getAlert
getCurrentUser
getEnvironment
getEscalationLevel
getEscalationPath
getEscalationPolicy
getFunctionality
getIncidentType
getOnCallRole
getOnCallShadow
getOverrideShift
getSchedule
getScheduleRotation
getScheduleShifts
getService
getSeverity
getTeam
getUser
getWorkflow
listAlerts
listEnvironments
listEscalationLevels
listEscalationLevelsPaths
listEscalationPaths
listEscalationPolicies
listFunctionalities
listIncidentActionItems
listIncidentAlerts
listIncident_Types
listOnCallRoles
listOnCallShadows
listOverrideShifts
listScheduleRotationActiveDays
listScheduleRotationUsers
listScheduleRotations
listSchedules
listServices
listSeverities
listShifts
listTeams
listUsers
listWorkflows
updateAlert
updateEnvironment
updateEscalationLevel
updateEscalationPath
updateEscalationPolicy
updateFunctionality
updateIncidentType
updateOnCallRole
updateOnCallShadow
updateOverrideShift
updateSchedule
updateScheduleRotation
updateService
updateSeverity
updateTeam
updateUser
updateWorkflow

Delete operations are intentionally scoped to screenshot coverage paths: deleteSchedule, deleteScheduleRotation, deleteEscalationPolicy, deleteEscalationPath, deleteEscalationLevel.

On-Call Health Integration

Integrates with On-Call Health to detect workload health 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_health_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

Pre-built Claude Code skills:

🚨 Rootly Incident Responder

This skill:

  • 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

It demonstrates a full incident response workflow using Rootly tools and GitHub context.

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

<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">

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