k8s-agent-sandbox-mcp

k8s-agent-sandbox-mcp is a skill for Claude Code, Codex from kubernetes-sigs/agent-sandbox. It costs 46 tokens per session (1,279 once invoked), scanned B, original, Apache-2.0.

An MCP server skill for creating and managing temporary Kubernetes sandboxes. Kubernetes is a system for running workloads in containers, and an MCP server exposes these operations to an agent.

In plain words
What is it for?
Use it to create a sandbox, run commands, read or write files, keep state between commands, and terminate the sandbox.
Why use it?
It provides an isolated place to run code, untrusted scripts, or parallel jobs while keeping a sandbox available for several commands. It must be secured because it can execute commands and access files with the Kubernetes service account's permissions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

Agent Sandbox is a Kubernetes extension for managing isolated, stateful workloads that run as single long-lived containers with stable identities and persistent storage. It is intended for AI agent runtimes, reinforcement-learning workloads, and other applications that do not fit ordinary stateless deployments. Its catalogue skills and instructions support operating these sandbox workloads.

kubernetes-sigs/agent-sandbox · 3,750 stars · on GitHub · agent-sandbox.sigs.k8s.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kubernetes-sigs/agent-sandbox/skill
Any agent
npx skills add kubernetes-sigs/agent-sandbox --skill skill
Clone the repo
git clone --depth 1 https://github.com/kubernetes-sigs/agent-sandbox

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k8s-agent-sandbox-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/kubernetes-sigs/agent-sandbox/skill.svg)](https://agentmods.dev/skills/kubernetes-sigs/agent-sandbox/skill)
Your own site
<a href="https://agentmods.dev/skills/kubernetes-sigs/agent-sandbox/skill"><img src="https://agentmods.dev/badge/skills/kubernetes-sigs/agent-sandbox/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,279 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01279
Opus 5 $0.00023 $0.00639
Sonnet 5 $0.00009 $0.00256
Haiku 4.5 $0.00005 $0.00128

Measured yesterday against content hash 14f330980995, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

k8s-agent-sandbox-mcp scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

> **⚠️ SECURITY WARNING:** This MCP server does not have built-in authentication. It exposes tools that can create sandboxes, execute arbitrary commands, and read or write files using the permissions of its Kubernetes se

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. Tool Call: `execute_command(sandbox_claim_name="sbx-12345", namespace="default", command="python -c 'import requests; print(requests.get(\"https://example.com\").status_code)'")`
clients/integrations/mcp-server/skill/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kubernetes Agent Sandbox Manager (MCP)

⚠️ SECURITY WARNING: This MCP server does not have built-in authentication. It exposes tools that can create sandboxes, execute arbitrary commands, and read or write files using the permissions of its Kubernetes service account. Before proceeding, ensure that the server is strictly isolated on a private network or secured behind an authenticating proxy.

Use this skill when a task requires running code, executing untrusted scripts, or performing heavy parallel workloads in an isolated Kubernetes environment. This skill connects to the official kubernetes-sigs/agent-sandbox MCP server. It can be configured using mcp-config.json in this skill's directory.

Architecture & State

Unlike basic shell execution, this sandbox is stateful. When you create a sandbox, a persistent Kubernetes Pod is provisioned and identified by a sandbox_claim_name. You can run multiple sequential commands against the same sandbox_claim_name (e.g., install a package, then run a script). You must retain the sandbox_claim_name value in context for the lifetime of the task.

Available MCP Tools

  • create_sandbox

    • Arguments: warmpool (string), namespace (string), sandbox_ready_timeout (int, optional), labels (dict[string, string], optional), shutdown_after_seconds (int, optional, defaults to 300 — the sandbox self-deletes after 5 minutes unless raised), pod_labels (dict[string, string], optional), pod_annotations (dict[string, string], optional).
    • Returns: JSON object with sandbox_claim_name.
    • Purpose: Create a new sandbox.
  • execute_command

    • Arguments: sandbox_claim_name (string), namespace (string), command (string — shell command or python inline script), timeout (int — seconds before the command times out, optional).
    • Returns: JSON object containing stdout, stderr, and exit_code, or JSON with an error field.
    • Purpose: Executes commands inside the provisioned sandbox.

Read the full file on GitHub · 72 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 72 lines · 46 tokens per session scan B 14f330980995

Subscribe to this mod's changes

k8s-agent-sandbox-mcp is a skill published in the GitHub repository kubernetes-sigs/agent-sandbox (3,750 stars, last pushed yesterday), licensed Apache-2.0. It adds 46 tokens to every session and 1,279 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

troubleshoot-sandbox

Troubleshoot OpenSandbox issues by running diagnostics (logs, inspect, events, summary) via CLI or HTTP API to diagnose sandbox failures like OOM, crash, image pull errors, network problems, etc.

opensandbox-group/OpenSandbox · 48 tokens

langbot-deploy

Deploy and configure a LangBot instance — Docker / Docker Compose, Kubernetes, the config.yaml model, the Box sandbox runtime, the plugin runtime, and the global API key. Use when installing, deploying, upgrading, or configuring LangBot in production or self-hosted environments. Triggers on "deploy langbot", "langbot…

langbot-app/LangBot · 104 tokens

timoni

Use when deploying applications to Kubernetes with Timoni. Covers installing and upgrading module instances from OCI registries, composing multi-app deployments with bundles, injecting values from clusters or CI with runtimes, targeting multiple clusters, and authoring, testing, signing and publishing modules with CUE.

stefanprodan/timoni · 59 tokens

deployment

Deploy Memoria with Docker Compose or Kubernetes. Environment variables, multi-instance setup, security. Use when deploying or configuring Memoria.

matrixorigin/memoria · 28 tokens

nvca-self-managed-install

Install or validate the NVCA Operator chart against a self-managed NVCF control plane from the native monorepo. Use when the control plane comes from deploy/stacks/self-managed and NVCA must be installed with stack-derived image repository settings.

NVIDIA/nvcf · 55 tokens

image-pull-debug

Diagnose container image pull failures (ErrImagePull / ImagePullBackOff). Checks pod status, containerd logs, and events to identify root cause.

scitix/siclaw · 36 tokens