declaw mcp wraps any stdio-based MCP server in a Declaw sandbox.
Add declaw mcp -- before your existing server command in your MCP
client config and the server runs inside a Firecracker microVM with:
- Network deny-all by default — outbound traffic is blocked unless
you explicitly allowlist domains with
--network-allow. - Filesystem isolation — the server cannot read your host files
(
~/.ssh,~/.aws,.env, etc.). - Environment forwarding — pass only the credentials the server
needs with
--env. - File upload — send local files into the sandbox with
--file. - Automatic cleanup — the sandbox is destroyed when the MCP client disconnects (stdin closes).
Why sandbox MCP servers?
MCP servers run with the same permissions as your IDE. A malicious or compromised server can:- Read credentials from
~/.ssh/,~/.aws/,~/.npmrc,.env - Exfiltrate data to external endpoints
- Modify files on your machine
- Access cloud metadata services
declaw mcp eliminates these risks by running the server in an
ephemeral microVM that has no access to your host filesystem or network.
Quick start
Prefix your MCP server command withdeclaw mcp --:
Client configuration
Configure your MCP client to usedeclaw as the command. The --
separator separates Declaw flags from the MCP server command.
- Cursor
- Claude Desktop
- Claude Code
- Windsurf
Edit
~/.cursor/mcp.json:CLI flags
| Flag | Short | Description |
|---|---|---|
--template | -t | Sandbox template (default: mcp-server — includes Node.js + Python) |
--timeout | Sandbox timeout in seconds (default: 3600 / 1 hour) | |
--env | -e | Forward environment variable into sandbox (KEY or KEY=VAL, repeatable) |
--file | -f | Upload local file into sandbox (LOCAL_PATH:REMOTE_PATH, repeatable, max 100 MB) |
--network-allow | Allowed outbound domains (comma-separated). Without this flag, all outbound traffic is blocked. | |
--verbose | -v | Print diagnostic logs to stderr |
Environment forwarding
Use--env KEY to forward a variable from your shell environment into
the sandbox. The MCP client’s env block sets variables in the
process that launches declaw, and --env passes them through to the
sandboxed server.
--env KEY=VAL:
Network allowlist
Without--network-allow, all outbound traffic is blocked (deny-all)
and an informational message is printed to stderr:
[declaw] network: deny-all (use --network-allow to permit outbound hosts).
Specify only the domains the server needs:
File upload
Upload local files into the sandbox before the server starts. Useful for single-file MCP servers (e.g. FastMCP scripts):LOCAL_PATH:REMOTE_PATH. The flag is repeatable for
multiple files. Maximum file size is 100 MB.
How it works
declaw mcp creates a Firecracker microVM, starts your MCP server
command inside it via stdio, and bridges stdin/stdout
between your MCP client and the sandboxed process:
- Sandbox creation — boots a microVM with the
mcp-servertemplate (Node.js + Python pre-installed). - File upload — if
--fileflags are present, files are uploaded before the server starts. - Stdio bridge — the CLI starts the server command via the stdio API and pipes local stdin/stdout to the remote process. MCP JSON-RPC messages flow transparently.
- Network enforcement — all outbound traffic is blocked by default.
--network-allowadds domain-level exceptions via the L7 TCP proxy. - Cleanup — when the MCP client disconnects (stdin closes), the CLI terminates the sandbox.
Examples
GitHub MCP server with scoped network access
Custom FastMCP server (single file)
Filesystem MCP server (no network needed)
Verbose mode for debugging
Next steps
- CLI overview — install the CLI, authenticate, and explore all commands
- Network policies — domain allowlists, IP/CIDR rules, enforcement details
- Stdio — the transport layer
declaw mcpuses under the hood - Security overview — PII scanning, prompt injection defense, audit logging
- Cookbook: MCP server in sandbox — run MCP servers via the SDK