container-mcp
Allows AI agents to manage, build, inspect, and diagnose Linux containers on macOS using Apple's container CLI.
Click on "Deploy 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., "@container-mcpList all my running containers"
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.
container-mcp
MCP server for Apple container ā manage, build, inspect, and diagnose Linux containers on macOS directly from AI agents like Claude Desktop, Claude Code, and Cursor.
Built on Apple's container CLI for native Linux container support on Apple Silicon Macs.
Prerequisites
macOS 26+ (Tahoe) on Apple Silicon (M1/M2/M3/M4)
Apple container CLI installed ā github.com/apple/container
Node.js 18+
Related MCP server: macos-control-mcp
Installation
npm install -g container-mcpYou can run the server directly via npx using the published npm package:
npx -y @arxndev/container-mcpOr, if you prefer to build from source:
Configuration
For Claude Desktop
Add this to your claude_desktop_config.json file:
{
"mcpServers": {
"container-mcp": {
"command": "npx",
"args": [
"-y",
"@arxndev/container-mcp"
]
}
}
}Claude Code
claude mcp add container-mcp -- npx -y container-mcpCursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"container": {
"command": "npx",
"args": ["-y", "container-mcp"]
}
}
}Environment Variables
Variable | Default | Description |
|
| Path to the container CLI binary |
|
| Log level: |
|
| Restricts host paths for volume mounts and file copies. Paths outside this root are rejected. |
|
| Restricts the build context path for |
Tool Reference
š³ Container Lifecycle (14 tools)
Tool | Description | Key Parameters |
| List all containers |
|
| Create & run a new container |
|
| Stop running containers |
|
| Start stopped containers |
|
| Remove containers |
|
| Get detailed container info |
|
| Execute command in container |
|
| Commit container to new image |
|
| Copy file/dir from host to container |
|
| Copy file/dir from container to host |
|
| Wait for container stop, get exit code |
|
| Rename an existing container |
|
| Pause processes in containers |
|
| Unpause processes in containers |
|
š¦ Image Management (7 tools)
Tool | Description | Key Parameters |
| List local images |
|
| Pull image from registry |
|
| Build image from Dockerfile |
|
| Remove images |
|
| Get detailed image info |
|
| Tag an existing local image |
|
| Push image to registry |
|
š Logs & Monitoring (3 tools)
Tool | Description | Key Parameters |
| Get container logs |
|
| Get CPU/memory/network stats |
|
| List processes in container |
|
š¾ Volumes (3 tools)
Tool | Description | Key Parameters |
| List all volumes |
|
| Create a new volume |
|
| Remove volumes |
|
š Networks (3 tools)
Tool | Description | Key Parameters |
| Create a container network |
|
| Remove one or more networks |
|
| List all networks |
|
āļø System (2 tools)
Tool | Description | Key Parameters |
| Get system info & version | ā |
| Remove all unused resources |
|
š¤ AI-Powered Diagnostics (2 tools)
Tool | Description | Key Parameters |
| Analyze logs & inspect data for issues |
|
| Human-readable container summary |
|
Example Prompts
Here are natural language prompts you can use with Claude or any MCP-compatible AI:
"List all my running containers"
"Run an nginx container named web-server on port 8080"
"Why is my database container crashing?"
"Show me the logs from the api container"
"Pull the latest Ubuntu image and run a container with it"
"What's the memory usage of all running containers?"
"Explain what the postgres container is doing"
"Build a Docker image from the current directory and tag it myapp:latest"
"Stop all containers and clean up unused images"
"Diagnose why the redis container keeps restarting"Development
Setup
git clone https://github.com/your-org/container-mcp.git
cd container-mcp
npm installBuild
npm run buildTest
npm test
npm run test:coverageRun locally
npm run devContributing
Fork the repository
Create a feature branch:
git checkout -b feature/my-featureWrite code and tests
Ensure tests pass:
npm testEnsure the build works:
npm run buildSubmit a Pull Request
Code Style
TypeScript strict mode
ESM modules
Prettier + ESLint for formatting
Zod schemas for all input validation
JSDoc comments on all exported functions
Architecture
container-mcp
āāā MCP Server (stdio transport)
ā āāā Container Tools (8) āā container CLI
ā āāā Image Tools (5) āāāāāā container CLI
ā āāā Log Tools (3) āāāāāāāā container CLI
ā āāā Volume Tools (3) āāāāā container CLI
ā āāā Network Tools (1) āāāā container CLI
ā āāā System Tools (2) āāāāā container CLI
ā āāā AI Tools (2) āāāāāāāā combines multiple CLI calls
ā āāā diagnose_container ā logs + inspect ā pattern analysis
ā āāā explain_container ā inspect + stats + top ā summary
āāā Utilities
āāā CLI Executor (execa, safe args)
āāā Output Parsers (JSON, table)
āāā Logger (structured, stderr)License
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Hosting for AI agents: your AI client deploys Docker apps to live HTTPS URLs over MCP.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server and CLI for iOS development ā build, test, automate, and diagnose from any AI agent or terminal.1MIT
- AlicenseBqualityDmaintenanceMCP server that enables AI to fully control macOS ā mouse, keyboard, terminal, screenshots, window management, UI element detection, and provides AI-optimized information reporting.3617 npmMIT
- FlicenseNot gradedqualityCmaintenanceA self-hosted, VNC-backed MCP server that enables AI agents to control a dedicated macOS user session remotely, without disturbing the console user.-
- AlicenseNot gradedqualityAmaintenanceAn MCP server that gives AI agents real OS-level control of macOS, enabling them to click real buttons, type real keys, and observe rendered screens just like a human would.1MIT