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.
Pro + a per-user API key
The MCP server is a Pro feature (mcp). Authenticate with a per-user API key
created in Admin → Users — there is no shared secret to configure. The old
security.apiKey Helm value was removed; 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, and a licensed mcp feature. The key inherits its owner's role, re-read on every request — see the API reference.
What's exposed¶
Only read-only tools are listed (_MCP_READ_TOOLS) — 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 _scrub redaction — the namespace blocklist and AI Guardrails scope apply, and log output is redacted.
Master AI switch
MCP AI tools are also gated by the master AI kill-switch in AI Guardrails. With AI disabled, AI-backed MCP tools return the hard 403; the read-only K8s/graph tools remain available.
Enabling it¶
Nothing to install or configure in Helm. On a Pro license:
- Create a key in Admin → Users — pick the user whose role the key should carry, then API keys → Create. The secret is shown once.
- Point your MCP client at
https://<your-host>/api/agent/mcp/and send the key in theX-API-Keyheader.
Give the key to a viewer account unless the agent genuinely needs more: MCP itself is read-only, but the same key would carry admin rights on other endpoints if its owner is an admin. See API reference → what a key cannot 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 .
Related¶
- AI Copilot + Mobula — the same retrieval inside KubeManta
- Security Model — API-key auth
- AI Guardrails — the scope and kill-switch MCP obeys