Kilntainers MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/Kiln-AI/Kilntainers
cd Kilntainers

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add kilntainers -- node "<FULL_PATH_TO_KILNTAINERS>/dist/index.js"

Replace <FULL_PATH_TO_KILNTAINERS>/dist/index.js with the actual folder you prepared in step 1.

README.md

Give Every Agent an Ephemeral Linux Sandbox β€” via MCP

</a>

Give Every Agent an Ephemeral Linux Sandbox β€” via MCP

Kilntainers is an MCP server that gives LLM agents isolated Linux sandboxes for executing shell commands.

  • 🧰 Multiple backends: Containers (Docker, Podman), cloud-hosted micro-VMs (Modal, E2B), and WebAssembly sandboxes (WASM BusyBox, or any WASM module).
  • 🏝️ Isolated per agent: Every agent gets its own dedicated sandbox β€” no shared state, no cross-contamination.
  • 🧹 Ephemeral: Sandboxes live for the duration of the MCP session, then are shut down and cleaned up automatically.
  • πŸ”’ Secure by design: The agent communicates with the sandbox over MCP β€” it doesn’t run inside it. No agent API keys, code, or prompts are exposed to the sandbox.
  • πŸ”Œ Simple MCP interface: A single MCP tool, sandbox_exec, lets your agent run any Linux command.
  • πŸ“ˆ Scalable: Scale from a few agents on your laptop to thousands running in parallel in the cloud.

Why Kilntainers?

Agents are already excellent at using terminals, and can save thousands of tokens by leveraging common Linux utilities like grep, find, jq, awk, etc. However giving an agent access to the host OS is a security nightmare, and running thousands of parallel agents on a service is painful. Kilntainers gives every agent its own isolated, ephemeral sandbox.

Quick Start

Install and run from CLI:

# install
uv tool install kilntainers
# starts with defaults: stdio MCP server, Docker, and Debian-slim (see options below)
kilntainers

Add to your MCP client (Claude, Cursor, etc.):

{
  "mcpServers": {
    "kilntainers": {
      "command": "kilntainers"
    }
  }
}

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   MCP   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  LLM Agent  │◄───────►│  Kilntainers │◄────►│  Sandboxes              β”‚
β”‚  (client)   β”‚         β”‚  MCP Server  β”‚      β”‚  - Docker/Podman        β”‚
β”‚             β”‚         β”‚              β”‚      β”‚  - Cloud VM (Modal,E2B) β”‚
β”‚             β”‚         β”‚              β”‚      β”‚  - WASM Sandbox         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. An MCP client connects to Kilntainers
  2. On the first sandbox_exec call, Kilntainers creates an isolated sandbox. Each connection gets its own independent sandbox.
  3. Commands run inside the sandbox; stdout, stderr, and exit code are returned
  4. When the session ends, the sandbox is destroyed and resources are cleaned up.

Security: The agent communicates with the sandbox over MCP β€” it doesn't run inside it. This is intentional: agents often need secrets (API keys, system prompts, code), and those should never be exposed inside a sandbox where a prompt injection could exfiltrate them.

Agent Isolation & Sandbox Lifecycle: Each MCP connection starts its own isolated sandbox. In streaming HTTP mode, a single MCP server can host many sandboxes in parallel, and exec calls are routed to the sandbox associated with that connection. In stdio mode, the server runs a single sandbox per process. When a connection closes, its sandbox is shut down and deleted.

Backend Examples

See the CLI Reference for all arguments.

Docker and Podman (default)

Local containers via Docker or Podman. Any OCI image works.

kilntainers                                     # Docker + debian-slim (defaults)
kilntainers --image alpine --engine podman      # Podman + Alpine
kilntainers --image node:22 --network           # Node.js with networking

Cloud Containers & VMs

Modal.com

Hosted containers with sub-second startup via Modal.com. Scales to thousands of parallel sandboxes. Supports GPUs.

kilntain

Tools (1)

sandbox_execExecutes a Linux command within an isolated, ephemeral sandbox environment.

Configuration

claude_desktop_config.json
{"mcpServers": {"kilntainers": {"command": "kilntainers"}}}

Try it

β†’List all files in the current directory to see what is available.
β†’Use grep to search for the string 'TODO' in all files in the current directory.
β†’Run a python script to calculate the first 100 prime numbers.
β†’Check the disk usage of the current environment using the df command.

Frequently Asked Questions

What are the key features of Kilntainers?

Isolated Linux sandboxes per agent session. Support for multiple backends including Docker, Podman, and WASM. Ephemeral lifecycle with automatic cleanup after session termination. Secure design preventing agent secret exposure to the sandbox. Scalable architecture for parallel agent execution.

What can I use Kilntainers for?

Running untrusted code or shell commands safely without exposing host system secrets. Executing Linux utilities like grep, find, and jq to process data efficiently. Scaling parallel agent tasks in cloud environments using Modal or E2B. Providing a clean, reproducible Linux environment for agent-based development tasks.

How do I install Kilntainers?

Install Kilntainers by running: uv tool install kilntainers

What MCP clients work with Kilntainers?

Kilntainers works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Kilntainers docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare