> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drdroid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DrDroid MCP Server

> Connect your AI tools to DrDroid via the Model Context Protocol

DrDroid exposes an MCP (Model Context Protocol) server that lets you connect AI tools like Claude Desktop, Cursor, Windsurf, and other MCP-compatible clients directly to your DrDroid account.

## Quick Start

### 1. Get your API Key

Go to **Settings > Proxy Tokens, API Keys & MCP** in your DrDroid dashboard and create an API key.

### 2. Configure your MCP client

Add DrDroid as an MCP server in your client's configuration:

```json theme={null}
{
  "mcpServers": {
    "drdroid": {
      "url": "https://aiops.drdroid.io/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json theme={null}
{
  "mcpServers": {
    "drdroid": {
      "url": "https://aiops.drdroid.io/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

**Cursor** (Settings > MCP Servers > Add):

* URL: `https://aiops.drdroid.io/mcp/`
* Authentication: Bearer token with your API key

### 3. Start using it

Once connected, you can ask your AI tool things like:

* "Show me critical alerts from the last 24 hours"
* "What services are in my catalog?"
* "Find dashboards related to redis"
* "Create a runbook for handling database failovers"
* "List my recent investigations"
* "Show me all alert definitions and their sample alerts"
* "Create an alert definition for Sentry timeout errors"
* "List my auto-investigation rules"
* "Create an auto-investigation rule for critical Sentry alerts"

## Available Tools

### Read Tools

| Tool                      | Description                                                                            | Key Parameters                                               |
| ------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **search\_alerts**        | Search alerts across all tools and channels with severity, source, and time breakdowns | `query`, `severity`, `sources`, `tags`, `duration`           |
| **search\_resources**     | Search dashboards, services, infra across all connected platforms                      | `query`, `doc_types`, `platforms`, `category`                |
| **get\_service\_catalog** | List services with owners, dependencies, and metadata                                  | `search`, `limit`                                            |
| **list\_investigations**  | View recent AI investigations with status                                              | `search`, `limit`, `offset`                                  |
| **list\_runbooks**        | List runbooks and wiki documents                                                       | `search`, `source`, `include_skills`, `include_repo_context` |

### Write Tools

| Tool                | Description                                | Key Parameters                                                                            |
| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------- |
| **update\_service** | Update a service catalog entry             | `service_id`, `service_name`, `type`, `upstream`, `downstream`, `notes`, `repository_url` |
| **create\_runbook** | Create a new runbook with markdown content | `title`, `content`, `when_to_use`                                                         |
| **update\_runbook** | Update or archive an existing runbook      | `runbook_id`, `title`, `content`, `when_to_use`, `active`                                 |

### Configuration Tools (read-only)

| Tool                                 | Description                                                              | Key Parameters                                           |
| ------------------------------------ | ------------------------------------------------------------------------ | -------------------------------------------------------- |
| **view\_alert\_definitions**         | List/get alert definitions with sample alerts and DSL setup instructions | `action` (list/get), `definition_id`, `search`, `source` |
| **view\_auto\_investigation\_rules** | List/get auto-investigation rules with filter summaries                  | `action` (list/get), `rule_id`, `enabled_only`           |

### Configuration Tools (write)

| Tool                                   | Description                                 | Key Parameters                                                                                  |
| -------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **manage\_alert\_definitions**         | Create, update, or delete alert definitions | `action` (create/update/delete), `definition_id`, `name`, `definition_rule`, `priority`, `tags` |
| **manage\_auto\_investigation\_rules** | Create or update auto-investigation rules   | `action` (create/update), `rule_id`, `name`, `model_key`, `filters`, `enabled`                  |

## Tool Details

### search\_alerts

Search and analyze alerts from your connected monitoring tools.

```
Parameters:
  query          - Text search across alert titles and content
  severity       - Filter by severity (comma-separated: critical,high,medium,low)
  sources        - Filter by alert source (comma-separated)
  tags           - Filter by tags (comma-separated)
  duration       - Time range shorthand: "24h", "7d", "4w"
  start_time     - ISO timestamp for custom range start
  end_time       - ISO timestamp for custom range end
  limit          - Max results (default: 50, max: 200)
```

Returns matching alerts with `severity_counts`, `source_counts`, `channel_counts`, and `hourly_counts` breakdowns. Use this for alert insights and trend analysis.

### search\_resources

Search across all indexed resources from your connected platforms.

```
Parameters:
  query          - Text search query
  doc_types      - Comma-separated: dashboard, panel, service, infra_component,
                   runbook, repo_context, memory, communication, alert_rule,
                   mcp_asset, metric
  platforms      - Comma-separated: grafana, datadog, kubernetes, newrelic, sentry, etc.
  category       - Filter infra components by category (e.g. "compute")
  limit          - Max results (default: 20, max: 100)
```

### get\_service\_catalog

List all services in your DrDroid service catalog.

```
Parameters:
  search         - Filter services by name
  limit          - Max results (default: 100, max: 500)
```

Returns services with `type`, `upstream`/`downstream` dependencies, `notes`, `repository_url`, and `created_by`.

### update\_service

Update fields on an existing service catalog entry.

```
Parameters:
  service_id     - (required) ID of the service to update
  service_name   - New service name
  type           - Service type: service, database, queue, cache, external, etc.
  upstream       - List of upstream service names
  downstream     - List of downstream service names
  notes          - Free-text notes
  repository_url - Repository URL
```

### list\_runbooks

List runbooks and wiki documents. By default excludes internal skills and repo context docs.

```
Parameters:
  search                - Filter by title/path
  source                - Filter by source: confluence_cloud, bitbucket, mcp, etc.
  include_skills        - Include agent skill docs (default: false)
  include_repo_context  - Include repo context docs (default: false)
  limit                 - Max results (default: 20, max: 100)
```

### create\_runbook

Create a new runbook/wiki document.

```
Parameters:
  title          - (required) Runbook title
  content        - (required) Markdown content
  when_to_use    - Description of when this runbook should be used
```

### update\_runbook

Update or archive an existing runbook.

```
Parameters:
  runbook_id     - (required) ID of the runbook to update
  title          - New title
  content        - New markdown content
  when_to_use    - Updated usage description
  active         - Set to false to archive the runbook
```

### view\_alert\_definitions

View alert definitions — the grouping rules that classify incoming alerts into named categories.

```
Parameters:
  action               - (required) "list" or "get"
  definition_id        - Required for get
  search               - Filter by name (list only)
  source               - Filter by source (list only)
  sample_alerts_limit  - Number of sample alerts to return (get only, default: 5)
```

The `get` action returns sample recent alerts that matched the definition, plus setup instructions.

### manage\_alert\_definitions

Create, update, or delete alert definitions.

```
Parameters:
  action           - (required) "create", "update", or "delete"
  definition_id    - Required for update/delete
  name             - Definition name (required for create)
  definition_rule  - DSL rule (required for create). Must start with alert.source="<source>"
  priority         - 0=Highest, 1=Default, -1=Lowest (catch-all)
  runbook_id       - Attach a runbook for investigation context
  notes            - Free-text notes
  tags             - List of key:value strings (e.g. ["team:backend"])
```

**DSL Rule Syntax** (for `definition_rule`):

```
alert.source="sentry" and alert.text contains "timeout"
alert.source="datadog" and alert.title contains "CPU"
alert.source="pagerduty" and alert.labels.env="production"
alert.source="sentry" and alert.labels.keys contains "service"
alert.source="slack" and alert.channel_name="#alerts-prod"
```

### view\_auto\_investigation\_rules

View auto-investigation rules — controls which alerts automatically trigger AI investigations.

```
Parameters:
  action       - (required) "list" or "get"
  rule_id      - Required for get (UUID string)
  enabled_only - Only return enabled rules (list only)
```

### manage\_auto\_investigation\_rules

Create or update auto-investigation rules.

```
Parameters:
  action                - (required) "create" or "update"
  rule_id               - Required for update (UUID string)
  name                  - Rule name (required for create)
  model_key             - AI model: "sonnet-4.6" or "kimi-2.5" (required for create)
  filters               - JSON string of filter array (see syntax below)
  description           - Optional description
  runbook_id            - Attach a runbook for investigation context
  max_triggers_per_hour - Per-rule rate limit
  enabled               - Enable/disable the rule
```

**Filter Syntax** (JSON array):

```json theme={null}
[
  {"field": "source", "operator": "equals", "value": "sentry"},
  {"field": "severity", "operator": "in", "values": ["critical", "high"]},
  {"field": "alert_definition", "operator": "equals", "value": "42"},
  {"field": "label_key", "operator": "contains", "value": "env"}
]
```

Available fields: `alert_definition`, `service`, `source`, `severity`, `label_key`, `label_value`, `tags`.
Available operators: `equals`, `not equals`, `in`, `contains`, `exists`, `not exists`, `is null`, `is not null`.

Note: filters are immutable after creation. To change filters, create a new rule.

## Authentication

All requests require a valid API key passed as a Bearer token. API keys are scoped to your DrDroid account — each key can only access data belonging to its associated account.

Generate API keys from **Settings > Proxy Tokens, API Keys & MCP** in your DrDroid dashboard.

## Transport

The MCP server uses **Streamable HTTP** transport (the current MCP standard), operating in stateless mode. Each request is independent — no session management required.

**Endpoint:** `https://aiops.drdroid.io/mcp/`
