Rootly MCP Server

Rootly MCP Server

Seamlessly integrate Rootly incident management into MCP-compatible editors.

36
Stars
15
Forks
36
Watchers
1
Issues
Rootly MCP Server provides an MCP-compliant server to access and manage Rootly's incident management API from within editors like Cursor, Windsurf, and Claude. It enables context-rich workflows and tool generation based on Rootly’s OpenAPI specification, allowing users to resolve incidents directly within their development environment. The server supports flexible authentication and dynamic resource generation while ensuring smart pagination to optimize editor context windows.

Key Features

MCP protocol server for Rootly’s API
Dynamic tool generation from Rootly OpenAPI spec
Supports multiple authentication methods (global, team, personal API keys)
Smart pagination to prevent context overflows
Configurable environment variables
Seamless integration with editors like Cursor, Windsurf, and Claude
Direct editor-based incident resolution
Hosted and self-hosted deployment options
Customizable access control and paths
Automated setup and installation via PyPI or direct connection

Use Cases

Resolving production incidents directly from code editors
Integrating Rootly incidents and on-call workflows with development tools
Generating incident reports and handoff summaries within IDEs
Enabling organization-wide visibility into incident status for developers
Facilitating on-call shift management seamlessly during coding sessions
Automating access to Rootly resources using standardized protocols
Extending incident response capabilities to non-Rootly interfaces
Customizing incident response tools for team-specific workflows
Providing context-enriched incident metrics and summaries to engineers
Accelerating remediation workflows through editor-native tools

README

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
    bash
    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

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

With uvx

json
{
  "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:

json
{
  "mcpServers": {
    "rootly": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/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:

json
{
  "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

Available Tools

Alerts

  • listIncidentAlerts
  • listAlerts
  • attachAlert
  • createAlert

Environments

  • listEnvironments
  • createEnvironment

Functionalities

  • listFunctionalities
  • createFunctionality

Workflows

  • listWorkflows
  • createWorkflow

Incidents

  • listIncidentActionItems
  • createIncidentActionItem
  • listIncident_Types
  • createIncidentType
  • search_incidents
  • find_related_incidents
  • suggest_solutions

On-Call

  • get_oncall_shift_metrics
  • get_oncall_handoff_summary
  • get_shift_incidents

Services & Severities

  • listServices
  • createService
  • listSeverities
  • createSeverity

Teams & Users

  • listTeams
  • createTeam
  • listUsers
  • getCurrentUser

Meta

  • list_endpoints

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: Controls 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.

Smart Analysis Tools

The MCP server includes intelligent tools that analyze historical incident data to provide actionable insights:

find_related_incidents

Finds historically similar incidents using text similarity analysis:

find_related_incidents(incident_id="12345", similarity_threshold=0.15, max_results=5)
  • Input: Incident ID, similarity threshold (0.0-1.0), max results
  • Output: Similar incidents with confidence scores, matched services, and resolution times
  • Use Case: Get context from past incidents to understand patterns and solutions

suggest_solutions

Recommends solutions by analyzing how similar incidents were resolved:

suggest_solutions(incident_id="12345", max_solutions=3)
# OR for new incidents:
suggest_solutions(incident_title="Payment API errors", incident_description="Users getting 500 errors during checkout")
  • Input: Either incident ID OR title/description text
  • Output: Actionable solution recommendations with confidence scores and time estimates
  • Use Case: Get intelligent suggestions based on successful past resolutions

How It Works

  • Text Similarity: Uses TF-IDF vectorization and cosine similarity (scikit-learn)
  • Service Detection: Automatically identifies affected services from incident text
  • Pattern Recognition: Finds common error types, resolution patterns, and time estimates
  • Fallback Mode: Works without ML libraries using keyword-based similarity
  • Solution Mining: Extracts actionable steps from resolution summaries

Data Requirements

For optimal results, ensure your Rootly incidents have descriptive:

  • Titles: Clear, specific incident descriptions
  • Summaries: Detailed resolution steps when closing incidents
  • Service Tags: Proper service identification

Example good resolution summary: "Restarted auth-service, cleared Redis cache, and increased connection pool from 10 to 50"

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.

python
# 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.

python
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)

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:

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

2. Install Dependencies

Install all project dependencies:

bash
uv pip install .

To add new dependencies during development:

bash
uv pip install <package>

3. Set Up Git Hooks (Recommended for Contributors)

Install pre-commit hooks to automatically run linting and tests before commits:

bash
./scripts/setup-hooks.sh

This ensures code quality by running:

  • Ruff linting
  • Pyright type checking
  • Unit tests

4. Verify Installation

The server should now be ready to use with your MCP-compatible editor.

For developers: Additional testing tools are available in the tests/ directory.

Star History

Star History Chart

Repository Owner

Rootly-AI-Labs
Rootly-AI-Labs

Organization

Repository Details

Language Python
Default Branch main
Size 6,978 KB
Contributors 7
License Apache License 2.0
MCP Verified Nov 12, 2025

Programming Languages

Python
98.48%
Shell
1.25%
Dockerfile
0.27%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Server for TheHive

    MCP Server for TheHive

    Connect AI-powered automation tools to TheHive incident response platform via MCP.

    MCP Server for TheHive enables AI models and automation clients to interact with TheHive incident response platform using the Model Context Protocol. It provides tools to retrieve and analyze security alerts, manage cases, and automate incident response operations. The server facilitates seamless integration by exposing these functionalities over the standardized MCP protocol through stdio communication. It offers both pre-compiled binaries and a source build option with flexible configuration for connecting to TheHive instances.

    • 11
    • MCP
    • gbrigandi/mcp-server-thehive
  • Biel.ai MCP Server

    Biel.ai MCP Server

    Seamlessly connect IDEs to your company’s product documentation using an MCP server.

    Biel.ai MCP Server enables AI tools such as Cursor, VS Code, and Claude Desktop to access and utilize a company’s product documentation and knowledge base through the Model Context Protocol. It provides a hosted RAG layer that makes documentation searchable and usable, supporting real-time, context-rich completion and answers for developers. The server can be used as a hosted solution or self-hosted locally or via Docker for advanced customization.

    • 2
    • MCP
    • TechDocsStudio/biel-mcp
  • GXtract MCP Server

    GXtract MCP Server

    MCP server for seamless GroundX platform integration with modern editors.

    GXtract MCP Server implements the Model Context Protocol (MCP) to facilitate direct integration between the GroundX document understanding platform and editors such as VS Code. It offers tools for document search, querying, and semantic object explanations, leveraging Python 3.12+ and FastMCP v2 for high performance. The system includes an in-memory cache to boost efficiency and reduce API calls, with support for both stdio and HTTP transport layers for maximum flexibility.

    • 1
    • MCP
    • sascharo/gxtract
  • MCP Swagger Server (mss)

    MCP Swagger Server (mss)

    Seamlessly convert OpenAPI/Swagger specs into Model Context Protocol tools for AI integration.

    MCP Swagger Server converts OpenAPI/Swagger API specifications into Model Context Protocol (MCP) compatible tools, enabling REST APIs to become directly callable by AI systems. It supports zero-configuration conversion, multiple transport protocols (SSE, Streamable, Stdio), and secure API access through Bearer Token authentication. The tool offers an interactive command-line interface and configuration options to filter operations, customize transports, and manage API security. Its modular structure includes OpenAPI parsing, web UI, and backend services.

    • 38
    • MCP
    • zaizaizhao/mcp-swagger-server
  • GitHub Repos Manager MCP Server

    GitHub Repos Manager MCP Server

    Token-based, high-performance GitHub automation for MCP clients.

    GitHub Repos Manager MCP Server offers a comprehensive Model Context Protocol (MCP) server for managing GitHub repositories via direct API integration. It enables MCP clients such as Claude Desktop, Roo Code, and Cursor to automate GitHub workflows using just a personal access token, without the need for Docker. With 89 tools, users can handle repository management, issue tracking, collaboration, and advanced configuration with fine-grained control. The server is optimized for simplicity, security, and powerful automation through flexible tool management and granular access permissions.

    • 13
    • MCP
    • kurdin/github-repos-manager-mcp
  • Webvizio MCP Server

    Webvizio MCP Server

    Bridge between Webvizio feedback and AI coding agents via the Model Context Protocol

    Webvizio MCP Server is a TypeScript-based server implementing the Model Context Protocol to securely and efficiently interface with the Webvizio API. It transforms web page feedback and bug reports into structured, actionable developer tasks, providing AI coding agents with comprehensive task context and data. It offers methods to fetch project and task details, retrieve logs and screenshots, and manage task statuses. The server standardizes communication between Webvizio and AI agent clients, facilitating automated issue resolution.

    • 4
    • MCP
    • Webvizio/mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results