tiny-agent-sandbox
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tiny-agent-sandboxrun python code to calculate factorial of 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tiny Agent Sandbox
A small, inspectable Docker-backed sandbox that agents can call as an MCP tool.
It runs Python, JavaScript, or shell snippets in a new container with no network, no host mounts, a read-only root filesystem, a non-root user, dropped capabilities, and hard resource/output limits. Results are returned as structured data for an agent to reason about.
This is a learning and local-development project, not a production multi-tenant security boundary. Docker containers share a kernel. ReadSECURITY.md before using untrusted code.
What the agent sees
The MCP server exposes two tools:
sandbox_status()reports Docker readiness and missing runtime images.run_code(language, code, timeout_seconds)returnsstdout,stderr, exit status, timeout and truncation flags, duration, and the runtime image.
The agent cannot choose an image, command, mount, environment variable, network policy, or Docker flag. Those remain operator-controlled policy.
Related MCP server: dynamic-mcp
Quick start
Prerequisites: Docker, Python 3.11+, and uv.
git clone https://github.com/wesleyzhangwq/tiny-agent-sandbox.git
cd tiny-agent-sandbox
docker pull python:3.12-alpine
docker pull node:22-alpine
docker pull alpine:3.22
uv sync --no-editable
uv run --no-editable tas doctor
uv run --no-editable tas run python -c 'print(sum(range(10)))'Start the MCP server over stdio:
uv run --no-editable tiny-agent-sandboxConnect an MCP client
For clients that accept the common mcpServers JSON shape:
{
"mcpServers": {
"tiny-agent-sandbox": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/wesleyzhangwq/tiny-agent-sandbox",
"tiny-agent-sandbox"
]
}
}
}Pull the three runtime images before starting the client. Tool calls use --pull=never, so an agent
cannot cause an image download.
Example tool input:
{
"language": "python",
"code": "import statistics\nprint(statistics.mean([2, 4, 9]))",
"timeout_seconds": 5
}Example structured result:
{
"language": "python",
"image": "python:3.12-alpine",
"exit_code": 0,
"stdout": "5\n",
"stderr": "",
"timed_out": false,
"output_truncated": false,
"duration_ms": 180
}Default policy
Control | Default |
Network | disabled |
Root filesystem | read-only |
Writable storage | 64 MiB ephemeral |
User | UID/GID 65534 |
Linux capabilities | all dropped |
Privilege escalation | disabled |
Memory / swap | 256 MiB / 256 MiB |
CPU | 1 core |
Processes | 64 |
File descriptors | 64 |
Wall time | 5 seconds default, 30 seconds maximum |
Input / combined output | 64 KiB / 128 KiB |
The fixed policy is assembled in
src/tiny_agent_sandbox/runner.py. Timeout and output overflow
remove the named container rather than merely terminating the Docker client.
Development
uv sync --no-editable --extra dev
uv run --no-editable ruff check .
uv run --no-editable pytest -m "not integration"
docker pull python:3.12-alpine node:22-alpine alpine:3.22
uv run --no-editable pytest -m integrationThe preliminary ecosystem notes and design tradeoffs are in
docs/research.md.
Roadmap
Optional gVisor (
runsc) backend with explicit runtime detection.Digest-pinned, operator-configurable runtime images.
Per-session workspaces with strict size and lifetime limits.
Egress proxy with destination allowlists and audit logs.
Concurrency quotas and OpenTelemetry execution traces.
License
Apache-2.0
Available Tools
2 toolsrun_codeA
Run code without network or host mounts and return bounded stdout, stderr, and status.
The timeout may be 1-30 seconds. Output is truncated at the operator-controlled limit. Images must already exist locally; this tool never pulls an image on the agent's behalf.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| language | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| image | Yes | |
| stderr | Yes | |
| stdout | Yes | |
| language | Yes | |
| exit_code | Yes | |
| timed_out | No | |
| duration_ms | Yes | |
| output_truncated | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full disclosure burden, and it does well: it states no network/host mounts, bounded output with operator-controlled truncation, 1-30 sec timeout, and that images must already exist locally (never auto-pulls). These are genuine behavioral disclosures beyond the schema about constraints, safety, and dependence on pre-existing resources.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short, focused sentences. Each sentence earns its place: first states purpose and return type, second explains timeouts, third explains the image dependency. Zero waste, efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is relatively simple (3 params, 2 required, output schema provided), and the description covers the key behavioral constraints (no network, no mounts, local images, timeout, truncation). It adequately covers the safety and resource-dependence properties the agent would need to know before invoking. The output schema handles return-value documentation, so the description needn't explain that further.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for parameter documentation. The schema covers 3 params (code, language, timeout_seconds) with enum for language. The description mentions timeout range (1-30 sec) and output truncation which contextualizes the timeout_seconds parameter. However, no additional detail is given for what the output schema returns beyond 'stdout, stderr, and status', which is stated. With 0% coverage, some description of parameter semantics is needed; it partially provides it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Run code') plus resource constraints ('without network or host mounts') and return values ('bounded stdout, stderr, and status'). It's clear what the tool does. However, it doesn't explicitly distinguish from its sibling 'sandbox_status', though the purpose is different enough that this is mostly implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains important constraints (no network/host mounts, timeout range 1-30 sec, requires local images) which imply when this code runner is/isn't appropriate. However, there's no explicit when-to-use vs the sibling 'sandbox_status', and no guidance on when NOT to use it or what the sandbox_status tool is for.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sandbox_statusA
Report Docker daemon readiness and any missing allowlisted runtime images.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| images | Yes | |
| missing_images | Yes | |
| server_version | No | |
| daemon_available | Yes | |
| docker_available | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It conveys this is a read-only status operation (reports, doesn't modify). However, it doesn't mention whether it performs any setup actions, caches results, or has delays. The read-only implication is reasonably clear given 'report'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that efficiently conveys the tool's purpose with zero waste. It names both things it reports on (daemon readiness and missing images) without redundancy. This is appropriately concise for a zero-parameter status tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter status check tool with an output schema present, the description is largely complete. It identifies what the tool checks (daemon readiness, missing images). It doesn't describe return value format, but the output schema exists to cover that. Could mention whether readiness implies run_code will succeed, but overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is nothing the description needs to add about parameters. The baseline for 0-parameter tools is 4 per the rubric, and the description correctly contains no parameter-specific information since none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reports Docker daemon readiness and missing allowlisted runtime images. The verb 'report' with specific resources (Docker daemon readiness, runtime images) is specific. It distinguishes itself from run_code by being a status/read tool rather than an execution tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context implies this is a readiness/health check tool—likely to be called before run_code to verify the sandbox environment. However, it doesn't explicitly state when to use it (e.g., 'check before running code') or contrast with alternatives. The usage pattern with run_code is implied but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
run_code - First observed
sandbox_status
TDQS
The two tools serve clearly distinct purposes: run_code executes code while sandbox_status reports environment readiness. There is no meaningful overlap between them, so an agent can easily distinguish which to use.
Both tools follow a consistent verb_noun pattern: run_code and sandbox_status. The naming style is uniform snake_case with clear, descriptive verbs and nouns.
With only 2 tools, the surface feels thin for a sandbox server that presumably supports code execution. A richer surface might include file operations, image management, or environment configuration, but for a narrowly-scoped execution sandbox two tools can be reasonable.
The core execute-and-check lifecycle is covered: run code and check readiness. However, there are notable gaps such as no image listing, no stop/cleanup of sandboxes, and no way to provision or configure runtimes beyond status reporting.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
238+ dev tools via MCP: JSON, QR, PDF, DNS, hash, UUID, code review, JWT, SSL, WHOIS, and more
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.6MIT
- AlicenseBqualityCmaintenanceDynamic MCP server for Node.js enabling runtime tool creation, management, and execution in isolated sandboxes (Docker or Node).8121MIT
- FlicenseNot gradedqualityBmaintenanceEnables secure execution of Python code, SQL queries, and metric fetching through MCP with ephemeral Docker sandboxing.-
- FlicenseNot gradedqualityBmaintenanceProvides MCP tools for managing disposable Docker sandboxes that let AI agents safely execute commands in isolated, ephemeral environments.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wesleyzhangwq/tiny-agent-sandbox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server