Run container
run_containerRun containerized applications in isolated VMs on Mac. Supports detached execution or waiting for output, with configurable resources, ports, mounts, and environment variables.
Instructions
Run a container inside its own lightweight VM. By default runs detached and returns the container ID. Pass wait: true to run to completion and return the container's output (10 minute limit). Mount sources must be inside the allowed host paths. Default CPU/memory limits are applied unless overridden.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image": "<image>"
},
"name": "run_container"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables | |
| cpus | No | CPU limit, e.g. '4' | |
| name | No | Optional container name | |
| wait | No | Run to completion and return the container's output instead of its ID (10 minute limit) | |
| image | Yes | Image reference, e.g. alpine:latest | |
| ports | No | Publish container ports to the host | |
| memory | No | Memory limit, e.g. '4g' | |
| mounts | No | ||
| command | No | Command and arguments to run | |
| network | No | Allow outbound network access (default: denied unless CONTAINER_MCP_ALLOW_NETWORK is set) | |
| workdir | No | Working directory inside the container |