The platform MCP server includes a transparent Kubernetes API proxy and a command execution endpoint. Together, they let agents read pod logs, list resources, inspect deployments, discover CRDs, and run commands — all through the sameDocumentation Index
Fetch the complete documentation index at: https://docs.cnap.tech/llms.txt
Use this file to discover all available pages before exploring further.
cnap.request() interface.
These endpoints are accessed through the Platform MCP server’s
execute tool. The agent writes JavaScript that calls cnap.request().Kube API Proxy
GET /v1/clusters/{id}/kube/{path} proxies any request to the cluster’s Kubernetes API server. The path after /kube/ is forwarded directly, along with query parameters.
Pod Logs
Fetch pod logs as plain text — no streaming, no SSE, just the log output:List Resources
List pods, deployments, configmaps, services, or any Kubernetes resource:API Discovery
Agents can discover cluster-specific APIs — including — by fetching the Kubernetes OpenAPI spec:Supported Methods
The proxy supports all HTTP methods (GET, POST, PUT, PATCH, DELETE), so agents can also create and modify resources when needed.
Command Execution
POST /v1/clusters/{id}/exec runs a command in a pod container and returns the result as JSON:
Request Body
| Field | Type | Description |
|---|---|---|
namespace | string | Kubernetes namespace |
pod | string | Pod name |
container | string | Container name within the pod |
command | string[] | Command and arguments |
Response
| Field | Type | Description |
|---|---|---|
stdout | string | Standard output |
stderr | string | Standard error |
exit_code | number | Exit code (0 = success) |
Exec is non-interactive (no TTY, no stdin) with a 30-second timeout. For interactive shells, use the dashboard terminal.
Security
- Authentication is handled server-side — agents cannot read or set the
Authorizationheader - Authorization checks workspace membership before proxying any request
- All code runs in a sandboxed V8 isolate with no access to the filesystem, network, or Node.js APIs
- The kube proxy has a 30-second timeout per request
- Exec commands have a 30-second timeout and are non-interactive
Related
Code Mode in Action
See how agents compose complex operations in a single call
Platform MCP
The MCP server that provides these endpoints