anvil
Provides a sandboxed execution environment by running code and shell commands in ephemeral Docker containers with resource limits, network isolation, and security restrictions.
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., "@anvilrun python 'print(2**10)'"
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.
π¨ anvil
A throwaway Docker sandbox for agents.
Run code or shell commands in a resource-limited, network-isolated, single-use container and get back a structured result β stdout, stderr, exit_code, timed_out, duration_ms. So an agent can verify its work, reproduce a bug, or check output without ever touching the host.
Part of tools-for-agents. Zero npm dependencies β drives the docker CLI directly.
Safe by default
Every run is launched with:
--network noneβ no network unless you opt in (network: "on")--memory 512m --cpus 1 --pids-limit 512β bounded resources--cap-drop ALL --security-opt no-new-privilegesβ minimal privileges--rmephemeral container, work dir is a fresh temp mount, removed aftera hard timeout (default 30s, max 300s) that
docker kills the containeroptional
secure: trueβ read-only rootfs + tmpfs/tmp
Related MCP server: PRIMS β Python Runtime Interpreter MCP Server
CLI
node src/cli.js check # docker version + presets
node src/cli.js run python 'print(2**10)' # β 1024
node src/cli.js run node 'console.log(6*7)' # β 42
echo 'print("hi")' | node src/cli.js run python -
node src/cli.js sh 'apk info 2>/dev/null | head'MCP server (for agents)
{
"mcpServers": {
"anvil": { "command": "node", "args": ["/abs/path/to/anvil/mcp/mcp-server.js"] }
}
}Tools
Tool | Use it to⦠|
| Run a |
| Run a shell command with supplied |
| Docker availability + language presets. |
Example: verify a repo's syntax without copying it
{ "name": "anvil_run_command",
"arguments": { "image": "node:22-alpine", "mount": "/path/to/repo/src",
"cmd": "node --check /repo/core.js && echo OK" } }Result shape
{ "ok": true, "exit_code": 0, "timed_out": false, "duration_ms": 178,
"image": "python:3.12-alpine", "stdout": "...", "stderr": "" }The agent toolkit
anvil is the execute/verify leg of the tools-for-agents toolkit:
π°οΈ agent-hq β coordinate (memory, kanban, dashboard)
π lens β read efficiently (token-budgeted retrieval)
π¨ anvil β run safely (sandboxed execution)
MIT licensed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/tools-for-agents/anvil'
If you have feedback or need assistance with the MCP directory API, please join our Discord server