Skip to main content
Glama

Bocal gives MCP clients disposable Linux workspaces running locally on your machine. Manage sandboxes with the bocal CLI or connect an MCP client to the local server.

The runtime uses an Alpine Linux AArch64 guest on Unkernel. The verified host platform is Linux x86_64 with Node.js 24 or newer.

Install

npm install --global bocal
bocal image fetch bocal-unkernel-aarch64-v1
bocal doctor

The image is downloaded separately from the Bocal GitHub release. bocal doctor verifies that the local runtime can boot the guest.

Related MCP server: agent-jail-mcp

Connect an MCP client

Configure your MCP client to start Bocal over stdio:

{
  "mcpServers": {
    "bocal": {
      "command": "bocal",
      "args": ["serve", "--stdio"]
    }
  }
}

The local daemon owns sandbox lifetimes, so a sandbox remains available when an MCP client disconnects. An optional loopback HTTP transport is available with bocal serve --http --port 3000 and BOCAL_HTTP_TOKEN; it requires a bearer token, a loopback Host header and JSON POST bodies. The experimental @bocal/browser-worker package boots the pinned Unkernel WebAssembly kernel in a browser worker using browser-side GSP framing.

Manage sandboxes

bocal daemon start
bocal sandbox create
bocal sandbox list
bocal sandbox shell <sandbox-id>
bocal sandbox exec <sandbox-id> <command>

The operator shell is interactive and local to the host-to-guest terminal channel. MCP tools provide sandbox lifecycle, command, job, and file operations.

Security

Bocal is experimental and single-user. It is not designed as a boundary for hostile workloads or multi-tenant use. On Linux, operators can set host_isolation to "required" to fail closed when the hardened worker namespaces and cgroup controls are unavailable. bocal doctor and sandbox_capabilities report the effective mode. Read the security policy before using it with untrusted work.

Build from source

On Linux x86_64 with Node.js 24 or newer and pnpm 11.29.0:

pnpm setup:local

This builds or verifies the pinned guest image, installs the local CLI, and runs bocal doctor. See CONTRIBUTING.md for development commands.

Licenses

Bocal-authored code is MIT-licensed. The npm package's dependency inventory is in docs/licenses/npm/THIRD-PARTY.md. The separately distributed guest image has its own notices and corresponding source requirements in docs/licenses/unkernel/THIRD-PARTY.md.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers