MCP server for Podman and Docker container runtimes
## Podman MCP Server: Rootless Container Management The **Podman MCP Server** integrates the daemonless container engine into Google Antigravity, enabling developers to manage containers, pods, and images without requiring root privileges or a running daemon. ### Why Podman MCP? - **Rootless containers** - Run containers without root privileges - **Daemonless** - No background daemon required - **Pod support** - Native pod concepts similar to Kubernetes - **Docker compatible** - Drop-in replacement for Docker commands - **Systemd integration** - Generate systemd unit files for containers ### Key Features #### 1. Container Management ```python # Run container rootlessly container = await mcp.call("podman", "run", { "image": "docker.io/library/nginx:latest", "name": "web-server", "ports": ["8080:80"], "detach": True, "userns": "keep-id" }) print(f"Container: {container[\"Id\"]}") # Execute command in container output = await mcp.call("podman", "exec", { "container": "web-server", "command": ["nginx", "-t"] }) ``` #### 2. Pod Management ```python # Create pod (similar to Kubernetes) pod = await mcp.call("podman", "pod_create", { "name": "web-pod", "ports": ["8080:80", "8443:443"] }) # Add containers to pod await mcp.call("podman", "run", { "image": "nginx:latest", "name": "nginx", "pod": "web-pod" }) await mcp.call("podman", "run", { "image": "redis:latest", "name": "cache", "pod": "web-pod" }) ``` #### 3. Image Management ```python # Build image image = await mcp.call("podman", "build", { "context": "/app", "tag": "myapp:latest", "file": "Containerfile" }) # Push to registry await mcp.call("podman", "push", { "image": "myapp:latest", "destination": "registry.example.com/myapp:latest" }) # List images images = await mcp.call("podman", "images", { "filter": "reference=myapp" }) ``` #### 4. Systemd Integration ```python # Generate systemd unit unit = await mcp.call("podman", "generate_systemd", { "container": "web-server", "restart_policy": "always", "time": 10 }) print(f"Unit file:\\n{unit}") # Install as user service await mcp.call("podman", "install_systemd_unit", { "container": "web-server", "user": True }) ``` ### Configuration ```json { "mcpServers": { "podman": { "command": "npx", "args": ["-y", "@anthropic/mcp-podman"], "env": { "CONTAINER_HOST": "unix:///run/user/1000/podman/podman.sock" } } } } ``` ### Use Cases **Rootless Development**: Run containers without elevated privileges. **Pod Workflows**: Work with pod concepts before deploying to Kubernetes. **Systemd Services**: Deploy containers as managed systemd services. **CI/CD Pipelines**: Build and push images in restricted environments. The Podman MCP Server enables secure, rootless container management.
{
"mcpServers": {
"podman": {
"mcpServers": {
"podman": {
"args": [
"podman-mcp-server"
],
"command": "uvx"
}
}
}
}
}