Skip to content

MCP Server

KubeManta exposes its read-only Kubernetes tools over the Model Context Protocol so external AI agents — Claude Code, Claude Desktop, Cursor, or your own — can query your cluster through KubeManta's guardrails instead of raw kubectl.

Available on every tier · needs a per-user API key

The MCP server (mcp) is available on every tier, including Free. It is read-only on all of them: the surface is an explicit allowlist of read tools and anything outside it is refused, so no plan can write to your cluster through MCP. A caller sees only the namespaces they are entitled to, and results are redacted before they leave. Authenticate with a per-user API key holding the mcp:read scope — there is no shared secret to configure. See the API reference.


Endpoints

Endpoint Purpose
GET /mcp/tools List the available tools in MCP format (name, description, JSON input schema).
POST /mcp/tools/call Invoke a tool by name with arguments; returns the tool result.

Both require an X-API-Key header carrying a per-user API key, with the mcp:read scope. The key inherits its owner's role, re-read on every request — see the API reference.


What's exposed

Only read-only tools are exposed — the MCP surface can observe and diagnose but cannot mutate the cluster. This includes the same Kubernetes read tools the autonomous agent uses, plus the Mobula retrieval tools (search_entities, get_entity, get_neighbors, get_subgraph, get_findings, get_events, get_logs, get_health).

Every call runs through KubeManta's namespace scope and the same redaction boundary as the rest of the product — the namespace blocklist and AI Guardrails scope apply, and log output is redacted.

Master AI switch

MCP is also gated by the master AI kill-switch in AI Guardrails. With AI disabled, every MCP tool call is refused with 403 (the tool list is still served). Admins can also turn the MCP server off on its own, which refuses both listing and calls with mcp_disabled.


Enabling it

Nothing to install or configure in Helm. On any tier:

  1. Sign in as the user whose role the key should carry, open the account menu → API keys, and create a key with the mcp:read scope. The secret is shown once.
  2. Point your MCP client at https://<your-host>/api/agent/mcp/ and send the key in the X-API-Key header.

Mint the key with only mcp:read: it then reaches nothing but the MCP endpoints, whatever its owner's role, and its owner's role narrows it further. See API reference → what no key can do.


Example

# List tools
curl -s https://kubemanta.example.com/api/agent/mcp/tools \
  -H "X-API-Key: $KUBEMANTA_API_KEY" | jq '.tools[].name'

# Call a tool
curl -s -X POST https://kubemanta.example.com/api/agent/mcp/tools/call \
  -H "X-API-Key: $KUBEMANTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"get_health","arguments":{"namespace":"default"}}' | jq .