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

# MCP server

> Let external AI agents call Sariva's operational tools over the Model Context Protocol.

Sariva ships an **MCP server** so AI agents — Claude Code, Cursor, or any MCP-capable client — can call its operational tool library directly, the same way a developer calls the REST API. It's a thin wrapper over the same tools the agents use internally, so there's no separate surface to maintain.

## Enable it

MCP is **opt-in** and off by default. The runtime switch is the `MCP_ENABLED` environment variable (truthy values: `true` / `1` / `yes` / `on`), with `MCP_PORT` optionally overriding the default port `8001` — that is what the process reads at startup, however you deploy it. It runs **inside the Sariva platform process on port 8001** (the REST API stays on 8000), over HTTP transport.

**Helm/EKS paths** — set it at install and the chart's ConfigMap carries it into the pod:

```bash theme={null}
--set mcp.enabled=true
```

**Linux VM (Docker) path** — two lines in `.env` plus the port mapping the wizard-emitted compose already carries commented out:

```bash theme={null}
# .env
MCP_ENABLED=true
# MCP_PORT=8001   # optional — 8001 is the default
```

```yaml theme={null}
# docker-compose.yml — uncomment under services.platform.ports:
      - "8001:8001"
```

Then `docker compose up -d` to recreate the container.

## Connect an agent

Point your MCP client at the server's HTTP endpoint and pass your Sariva platform API key. A representative remote-MCP client config:

```json theme={null}
{
  "mcpServers": {
    "sariva": {
      "url": "https://<platform-url>:8001",
      "headers": { "X-API-Key": "sariva_<your-key>" }
    }
  }
}
```

The agent then discovers tools with `tools/list` and invokes them with `tools/call`, per the MCP spec. Every call is logged to Sariva's audit trail with `source: "mcp"` and the calling agent's identity.

> [!NOTE]
>
> Exact client config syntax varies by agent (Claude Code, Cursor, etc.) — the constants are the **HTTP endpoint on port 8001** and the **Sariva platform API key** in the request header. Use the same key you'd use for the REST API.

## What it exposes today

Around **60 tools**, currently focused on **read-only** operations — diagnosis and observability an agent can call freely. Examples by category:

| Category | Example read-only tools |
| - | - |
| Observability | `kafka_get_consumer_lag`, `kafka_get_isr_health` |
| Broker health | `kafka_get_broker_health`, `kafka_get_urp_count` |
| Private networking | `cc_get_privatelink_status`, `cc_diagnose_network_connectivity` |
| Field-Level Encryption | `cc_get_fle_key_status` |
| Flink | `flink_get_job_health`, `flink_get_backpressure_metrics` |
| Managed connectors | `cc_get_managed_connector_status` |
| Tableflow / Iceberg | `cc_get_tableflow_sync_status`, `cc_diagnose_tableflow_lag` |
| Incident diagnosis | `runbook_execute_diagnosis`, `runbook_get_recommendations` |
| Client onboarding | `cc_validate_client_connectivity`, `cc_check_acl_coverage` |

`runbook_execute_diagnosis` is the standout — an agent calls it and gets back a **structured diagnosis with root-cause ranking and remediation steps**, not just raw metrics. The full, current list is the server's manifest, discoverable via `tools/list`.

## Safety classes & approvals

Every tool carries a machine-readable **safety class**, so an agent knows what's safe to call without a human:

| Class | Approval |
| - | - |
| `READ_ONLY` | Never |
| `REVERSIBLE_WRITE` | No (logged) |
| `IRREVERSIBLE_WRITE` | Always |
| `DESTRUCTIVE` | Always + human confirmation |

Write and destructive tools (for example `cc_rotate_fle_key`) return `PENDING_APPROVAL` plus a callback URL — a human approves via Slack or REST before anything runs. **Today the exposed surface is the read-only set**; broader write/destructive exposure, with its approval-gate workflow, lands in a later release.

## Example call

Conceptually, a `tools/call` for consumer lag:

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "kafka_get_consumer_lag",
    "arguments": { "cluster_id": "prod-cc-1", "consumer_group": "payments-consumer-grp" }
  }
}
```

Returns the lag for that group (or all groups if `consumer_group` is omitted) — read-only, no side effects.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.