container-mcp
Allows AI agents to manage, build, inspect, and diagnose Linux containers on macOS using Apple's container CLI.
Click on "Install 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: xcforge
Installation
npm install -g container-mcpOr run directly with npx:
npx container-mcpConfiguration
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"container": {
"command": "npx",
"args": ["-y", "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: |
Tool Reference
🐳 Container Lifecycle (8 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 |
|
📦 Image Management (5 tools)
Tool | Description | Key Parameters |
| List local images |
|
| Pull image from registry |
|
| Build image from Dockerfile |
|
| Remove images |
|
| Get detailed image info |
|
📋 Logs & Monitoring (3 tools)
Tool | Description | Key Parameters |
| Get container logs |
|
| Get CPU/memory/network stats |
|
| List processes in container |
|
💾 Volumes & Networks (4 tools)
Tool | Description | Key Parameters |
| List all volumes |
|
| Create a new volume |
|
| Remove volumes |
|
| 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 & state to diagnose 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ARXNDEV/linux-mcp-server-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server