Apple Container MCP Server
Provides tools for managing Apple's open-source container CLI and macOS-native containers, including environment checks, system status, container and image lifecycle operations, registry operations, networks, volumes, machines, and commit/clean workflows.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Apple Container MCP Server
The Apple Container MCP Server is a bridge between the Model Context Protocol (MCP) and Apple's open-source container CLI. It enables developers to manage lightweight macOS-native containers seamlessly using natural language via LLM interfaces (like Claude, Cursor, Antigravity, and VSCode).
By acting as an MCP Server, this tool abstracts away the complexity of specific CLI flags, networking mounts, and system-level configurations, letting the LLM inspect, analyze, and automatically run macOS container workflows on your behalf.
The package installs two commands. apple-container-mcp is the MCP server described above. d2c is a standalone Docker-to-Apple-Container command translator for the terminal, with no LLM involved. See d2c ā Docker Command Translator below.
š Prerequisites
Python 3.11+ installed on your machine.
uvPackage Manager: Used for fast environment setup and execution.brew install uvApple Container CLI: Requires container CLI 1.0+; 1.7.1 is recommended and locally tested. Use Apple Silicon with macOS 26 or newer. Version 1.7.1 adds
cpuUtilizationtocontainer stats, enforces acluster-node lifecycle boundary (container listeven with--allhides cluster nodes), supports[dns]defaults in~/.config/container/config.toml, excludes container data volumes from Time Machine snapshots, fixes BuildKit:authoritygRPC headers and build-context handling, ships Kata kernel4.3.1and Containerization0.54.0, and retains all 1.4.1ā1.6.1 security and stability fixes across image loading, Unix sockets, kubeconfig merging, digest-pinned pulls, build-context symlinks, OCI platform/runtime inference, and signal passing.check_environmentreports the full patch version and recommends upgrading older installations. New tools have their own version requirements:clean_containerrequires 1.4.1+, andcommit_containerandrun_container(network_aliases=...)require 1.6.0+. Install via Homebrew, then start the system service:brew install container container system start
Related MCP server: container-mcp
š„ Installation & Setup
You have two options for installing and running the Apple Container MCP server: using uvx to run it directly from GitHub (recommended), or cloning the repository to run it locally.
Both methods require adding the server to your preferred MCP Client's configuration file.
Option A: Direct Execution via uvx (Recommended)
This approach does not require cloning the repository. uvx will automatically fetch, sandbox, and run the latest version of the server. Ensure you have uv installed (brew install uv).
Option B: Clone & Local Environment
Use this approach if you want to inspect or modify the code locally.
git clone https://github.com/joeshirey/AppleContainerMCP.git
cd AppleContainerMCPNote: For Option B, you must replace /path/to/uv with your actual uv path (e.g. /opt/homebrew/bin/uv) and /absolute/path/to/AppleContainerMCP with the directory you cloned into.
Configuration by Tool
Below are the specific instructions for adding the MCP server to major LLM tools. Use either the Option A or Option B snippet.
1. Antigravity (Google)
(For full details, see the AntiGravity MCP install and configuration docs or internal Google documentation).
Open your global MCP settings file (typically ~/.gemini/settings.json) and add:
Option A (uvx):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"uvx",
"--from",
"git+https://github.com/joeshirey/AppleContainerMCP.git",
"apple-container-mcp"
]
}
}
}Option B (Clone):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"/path/to/uv",
"--directory",
"/absolute/path/to/AppleContainerMCP",
"run",
"--quiet",
"apple-container-mcp"
]
}
}
}2. Cursor
(See the Cursor MCP Documentation for more info).
Open Cursor Settings -> Features -> MCP
Click + Add New MCP Server
Choose command type.
Name:
apple-containerCommand:
Option A (
uvx):/usr/bin/env FASTMCP_SHOW_SERVER_BANNER=false uvx --from git+https://github.com/joeshirey/AppleContainerMCP.git apple-container-mcpOption B (Clone):
/usr/bin/env FASTMCP_SHOW_SERVER_BANNER=false /path/to/uv run --directory /absolute/path/to/AppleContainerMCP --quiet apple-container-mcp
3. Claude Desktop
(See the Official MCP Quickstart for full setup instructions).
Open the Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json) and add:
Option A (uvx):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"uvx",
"--from",
"git+https://github.com/joeshirey/AppleContainerMCP.git",
"apple-container-mcp"
]
}
}
}Option B (Clone):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"/path/to/uv",
"--directory",
"/absolute/path/to/AppleContainerMCP",
"run",
"--quiet",
"apple-container-mcp"
]
}
}
}(Restart Claude Desktop after updating).
4. VSCode (via Cline / RooCode)
(See the Cline MCP Documentation for more details).
Open the extension MCP settings file (e.g., ~/.vscode/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json) and add:
Option A (uvx):
{
"mcpServers": {
"apple-container": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"uvx",
"--from",
"git+https://github.com/joeshirey/AppleContainerMCP.git",
"apple-container-mcp"
]
}
}
}Option B (Clone):
{
"mcpServers": {
"apple-container": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"/path/to/uv",
"--directory",
"/absolute/path/to/AppleContainerMCP",
"run",
"--quiet",
"apple-container-mcp"
]
}
}
}5. Gemini CLI
(See the Gemini CLI Documentation for setup details).
Open your Gemini CLI settings file (typically ~/.gemini/settings.json) and add:
Option A (uvx):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"uvx",
"--from",
"git+https://github.com/joeshirey/AppleContainerMCP.git",
"apple-container-mcp"
]
}
}
}Option B (Clone):
{
"mcpServers": {
"apple-container-mcp": {
"command": "/usr/bin/env",
"args": [
"FASTMCP_SHOW_SERVER_BANNER=false",
"/path/to/uv",
"--directory",
"/absolute/path/to/AppleContainerMCP",
"run",
"--quiet",
"apple-container-mcp"
]
}
}
}Local testing
Run the working checkout with the default MCP stdio transport:
uv run apple-container-mcpFor an MCP client that supports Streamable HTTP:
uv run apple-container-mcp --transport streamable-http --port 8765Connect the client to http://127.0.0.1:8765/mcp. The server binds to loopback only;
this URL is an MCP endpoint, not a browser UI. Start with check_environment,
system_status, and list_containers. Stdio remains the default for existing
client configurations.
For repeatable live validation, with the container service already running:
uv run python scripts/smoke_test.pyUse --registry to include HTTP push/pull through a temporary local registry;
this requires working host-to-container networking.
The smoke test creates uniquely named containers, images, a network, and volumes,
then removes those test resources. It pulls Alpine (and Registry when --registry is selected) and starts the
builder, leaving those shared runtime dependencies available afterward. It
never prunes resources or stops the system service.
Registry transport and system status on 1.4.1
pull_image, push_image, run_container, create_machine, and registry_login accept optional
scheme="http" or scheme="https". Omission uses the installed CLI's default:
HTTPS on 1.3+. For a deliberately configured local HTTP registry, pass
scheme="http" explicitly to each operation. HTTPS failures never trigger an
automatic HTTP retry. The setup_private_registry prompt accepts the same option.
system_status preserves the existing outer response and returns the richer
upstream payload under system_status, including client/server, host, paths,
and optional resource counts. Missing counts are not synthesized. On stopped
services it returns status="error" with the upstream status payload;
check_apiserver_status returns status="stopped" for both unregistered and
not running. check_environment.cli_version now includes the patch number.
clean_container(container_id) reclaims unused filesystem space in an already
running container. It does not remove containers or replace prune operations.
Commit and DNS aliases on 1.6.0
commit_container(container_id, reference) saves a running or stopped
container's filesystem as a local image. The image records the container's
process as its entrypoint and command, so pass entrypoint (and
args_override) to run_container to run something else from it.
run_container(network_aliases=[...]) gives a container extra DNS names on its
network (default when network is unset). Exact aliases need two labels
(api.test). A leading-dot alias (.api.test) matches every name below it and
must sit below the container's hostname or one of its exact aliases. Aliases
resolve only under a DNS domain registered with sudo container system dns create.
Other per-attachment options such as MTU go directly in network, for example
network="app-net,mtu=1400"; container network create has no MTU flag.
Stats, cluster lifecycle, and DNS defaults on 1.7.1
stats_container returns each container's StatsReport payload unchanged,
including the additive cpuUtilization field added in 1.7.1 (1.0 equals one
full core; omitted when the second sample fails).
list_containers (container list, including -a / --all) no longer lists
cluster nodes on 1.7.1+, and start_container, stop_container (stop and
kill), and remove_container (delete) report named cluster nodes as not
found. inspect_container, get_logs, exec_in_container, stats_container,
and clean_container still work on named cluster nodes; manage cluster
lifecycles directly with the container cluster CLI plugin.
~/.config/container/config.toml supports a [dns] table (dns,
dns-search, dns-option, dns-domain) for default container DNS settings,
complementing system_property_list. Upstream 1.7.1 also excludes container
data volumes from Time Machine snapshots, fixes BuildKit :authority gRPC
header and build-context regressions, and updates the runtime stack to Kata
kernel 4.3.1 and Containerization 0.54.0.
š¬ 10 Natural Language Prompt Examples
Once the MCP server is configured in your LLM client, you can use natural language to manage your Mac containers instead of typing commands manually. Try prompts like these:
"Can you check if my Apple container system service is currently running?"
"List all of the images I currently have downloaded locally."
"Run a new detached Debian container with 2 CPUs and 4GB of memory."
"What containers are currently running on my machine?"
"Please pull the latest
nginximage for me.""Start an Ubuntu container named 'web-test', expose port 8080:80, and set the ENV variable FOO=bar."
"Stop the container with ID
abc12345safely. If it hangs, force kill it.""Can you fetch the last 50 lines of logs from my 'web-test' container?"
"I need to build an image from the Dockerfile in my current directory and tag it as 'my-app:v1'."
"Clean up my environment by removing all stopped containers."
š Active Capabilities
Tools Exposed
System:
check_apiserver_status,start_system,stop_system,system_status,system_version,system_property_list,system_df,system_logs,check_environmentContainers:
run_container(supports--init-image, rosetta, platform, labels,shm_size, and more),list_containers,start_container,stop_container,remove_container,export_container,commit_container(1.6.0+),inspect_container,exec_in_container,get_logs,prune_containers,stats_container,clean_container(1.4.1+, reclaims filesystem space in a running container and its named volumes)Files:
copy_to_container,copy_from_containerMachines:
create_machine(supports nested virtualization on container 1.1+),run_machine,list_machines,inspect_machine,set_machine,set_default_machine,machine_logs,stop_machine,delete_machineImages:
list_images,pull_image,build_image,check_build_status,list_builds,tag_image,push_image,inspect_image,remove_image,prune_imagesNetworks:
create_network,remove_network,list_networks,inspect_network,prune_networksVolumes:
create_volume,remove_volume,list_volumes,inspect_volume,prune_volumesRegistry:
registry_login,registry_logoutBuilder:
builder_start,builder_stop,builder_status
Prompts Exposed
troubleshoot_container: Guided workflow to inspect and debug a failing container.build_and_run_workflow: Step-by-step guide to build an image from a local project and run it.cleanup_environment: Safely review and prune stopped containers, unused images, volumes, and networks.setup_private_registry: Walk through authenticating with a private container registry.
Resources Exposed
System Status:
apple-container://system/status
š d2c ā Docker Command Translator
This package also installs a second, standalone command: d2c. It takes a Docker CLI invocation and runs the Apple Container equivalent, so muscle memory and existing shell scripts keep working without a rewrite. It has nothing to do with MCP and needs no LLM client ā it is a plain terminal tool.
Usage
d2c [--dry-run] <docker-command> [args...]If you installed via uvx, run it the same way you run the server:
uvx --from git+https://github.com/joeshirey/AppleContainerMCP.git d2c ps -aFrom a local clone, uv sync puts d2c on your path inside the virtualenv. Many people alias it (alias docker=d2c) once they trust the translations.
See the translation before running it
--dry-run prints what would run and exits without touching your system. Use it when you are unsure how a command maps:
$ d2c --dry-run ps -a
[d2c dry-run] docker ps -a
ā container list -a
$ d2c --dry-run rmi nginx
[d2c dry-run] docker rmi nginx
ā container image delete nginx
ā¹ 'rmi' maps to Apple Container's 'image delete' subcommandWithout --dry-run, d2c executes the translated command and exits with that command's exit code, so it drops into scripts and CI cleanly.
What it translates
Thirty-one Docker commands map onto Apple Container equivalents, covering container lifecycle (ps, run, exec, stop, start, kill, rm, logs, inspect, cp, create, export, stats, commit on 1.6+), images (images, pull, push, rmi, tag, build, load, save), registry auth (login, logout), and the network / volume / system / image / builder management groups. Where a name differs enough to be surprising, the translation carries a note explaining the mapping.
The Docker management namespace is stripped automatically, so docker container run ubuntu and docker run ubuntu both resolve to container run ubuntu.
Apple Container 1.3+ defaults to HTTPS for registries. When targeting an explicitly configured HTTP registry, pass --scheme http to the translated operation.
Flags after the command are passed through unchanged. d2c renames commands, not flags ā a Docker flag with no Apple Container counterpart will be rejected by the container CLI rather than caught by d2c.
Commands with no equivalent
Twenty-three Docker commands have no Apple Container counterpart. Rather than failing with a confusing CLI error, d2c refuses them up front and suggests what to do instead:
$ d2c compose up
ā 'docker compose' is not supported by Apple Container.
Hint: No equivalent ā Apple Container has no orchestration layer. Run containers individually with 'container run'.This covers the Swarm family (service, stack, swarm, node, secret, config), image operations Apple Container does not implement (import, history, manifest, search), lifecycle gaps (pause, unpause, restart, rename, attach, wait, port, diff, events, checkpoint), plus compose, context, and plugin (Docker-style docker plugin install/enable/ls management has no counterpart because Apple Container discovers bundled CLI plugins ā build, builder, and cluster ā automatically when container system start is running).
Docker global flags
Global flags that come before the subcommand are handled separately. --debug / -D translates to container --debug. Flags that describe a world Apple Container does not have ā remote daemons (--host / -H), context switching (--context / -c), TLS options, --config, --log-level / -l ā trigger a warning and a confirmation prompt:
$ d2c --host tcp://remote:2376 ps
ā '--host' is not supported by Apple Container.
Apple Container connects to the local system service only ā no remote daemon.
Continue anyway? [y/N]Answering anything but y aborts. The prompt defaults to no and treats a closed stdin as no, so a script that inherits a stale DOCKER_HOST-style flag stops instead of silently running against the wrong target.
Only flags appearing before the first positional argument are treated as global. d2c exec mycontainer bash -c "echo hi" keeps its -c where it belongs.
š Security Model
This server applies several deliberate restrictions to keep LLM-driven container operations safe:
Path validation:
build_image'scontext_pathandrun_container'senv_fileare restricted to paths inside your home directory. The check usesos.path.realpathand a trailing-separator suffix test to prevent prefix-match bypasses (e.g./Users/joevs/Users/joey).copy_to_containerandcopy_from_containerapply the same policy: the HOST path is restricted to your home directory in both directions (copy_to_container'ssourceandcopy_from_container'sdest).Argument blocklist:
run_container'sargs_overrideparameter rejects flags that escalate privilege, weaken isolation, or expose host credentials:--privileged,--cap-add,--cap-drop,--security-opt,--device,--pid,--ipc,--userns,--cgroupns,--no-new-privileges,--kernel/-k,--kernel-arg,--ssh. This is defense in depth rather than the only barrier:args_overrideis appended after the image name, and the CLI treats everything after the image as arguments to the container's init process, not asrunoptions. A blocked flag that slipped through would reach the guest as a command argument, not as a privilege grant. The blocklist stays because that positional guarantee is a CLI implementation detail, not a documented contract.Linux capabilities (Apple Container 0.12+): Container 0.12 promoted
--cap-add/--cap-dropto documented public flags. This MCP deliberately does NOT expose them as tool parameters. Capability selection meaningfully weakens process isolation; if you need it, invokecontainer rundirectly. We may revisit this in a future release with an allowlist mechanism.--kernel,--kernel-arg, andrun's--sshblocked:--kernelloads an arbitrary host filesystem path as a guest kernel.--kernel-arg(added in Apple Container 1.2) appends raw arguments to the guest kernel command line, so a value likeinit=/bin/shsubverts the VM before any container process starts.run's--sshforwards the host SSH agent socket into the running container, letting anything inside use your credentials silently for the container's whole lifetime. All three are blocked fromargs_overrideand none is exposed as a tool parameter.read_only_paths/masked_pathsare additive-only (Apple Container 1.2.1+, EXPERIMENTAL upstream):run_containerexposes these to add paths to the runtime's default read-only/masked lists, which only tightens isolation. The upstream CLI also accepts aNONEsentinel there that clears the defaults instead, widening the container's attack surface ā this tool rejects that value.build_image's--sshis a different, narrower flag: it forwards the host's SSH agent to the build process only (Apple Container 1.2.1+), reachable solely during an explicitRUN --mount=type=sshstep in the Dockerfile ā the same class of deliberate, scoped credential exposure as the existingsecretsparameter. This is unrelated torun's--sshabove, which stays blocked.No shell injection:
subprocess.runis always called with an argument list, never withshell=True.Credential handling:
registry_loginpasses the password viastdin(--password-stdin) so it never appears in process arguments.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Secure Linux sandboxes for AI agents, as MCP tools.
MCP-Native LLM Orchestration Agent
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enables natural language interaction with Kubernetes clusters, allowing management of pods, deployments, namespaces, and cluster resources through conversational queries or API endpoints.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Apple container to manage, build, inspect, and diagnose Linux containers on macOS directly from AI agents.Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to directly access native macOS services, media, system health, and administration tools through a local MCP server.4235 npm2MIT
- FlicenseBqualityDmaintenanceMCP server for natural-language control of local Docker, covering containers, images, volumes, networks, and Compose stacks, plus security scanning and diagnostics.34-