# Container Host AIops

> Container Host AIops is an open-source MCP server for cloud and infrastructure. Governed AI-ops for Docker, Portainer and Podman hosts with RCA and guarded writes. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Repository:** https://github.com/aiops-tools/container-host-aiops
- **MCP Registry name:** io.github.AIops-tools/container-host-aiops
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Aimed at single container hosts rather than orchestrators, it reaches Docker over a local unix socket or TCP, Portainer through its API key, and Podman through its rootful or rootless service socket. A local socket needs no secret, since file permissions are the boundary. The README says it was exercised against a live Docker Engine 27.5.1 daemon, while the Portainer and Podman paths are covered by mocks only.

Three flagship analyses do the diagnosis. `restart_loop_rca` flags crash-looping containers and maps exit codes such as 137, 143, 139 and 127 to a likely cause with a log tail. `resource_pressure_analysis` compares CPU and memory use to configured limits and marks containers near (80% or more) or over. `image_and_volume_bloat` totals dangling images, volumes and build cache into prune candidates.

The tool has 38 tools, 29 of them reads. Writes include stop, start, restart, update limits, remove and prune, each with a `dry_run` preview that lists what would go. It records every call in an audit database and captures before-state, with an undo for stop and start and for limit changes. It does not decide whether a write is allowed; the account or socket permissions do. The author states it is not affiliated with Docker or Portainer.

## Features

- **Restart-loop RCA:** Maps container exit codes to likely causes and shows a log tail.
- **Resource pressure:** Flags containers near or over CPU and memory limits with a recommendation.
- **Bloat analysis:** Totals dangling images, volumes and build cache with reclaimable bytes.
- **Three platforms:** Docker, Portainer and Podman through one set of tools.
- **Dry-run previews:** Write tools preview what a prune or removal would affect.
- **Audit and undo:** Every call is logged and reversible writes record an inverse.

## Good for

- Find out why a container keeps restarting
- Spot containers close to their memory limit
- Reclaim disk from dangling images and volumes
- Roll up Compose stacks and their health
- Restart or stop a container with an audit record

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add container-host-aiops -- uvx container-host-aiops
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add container-host-aiops -- uvx container-host-aiops
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.container-host-aiops]
command = "uvx"
args = ["container-host-aiops"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user container-host-aiops uvx -- container-host-aiops

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "container-host-aiops": {
      "command": "uvx",
      "args": [
        "container-host-aiops"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 17 tools deletes data and 3 change data; 9 names don't say. From the server's own tool labels and tool names; not verified by us.

- `restart_loop_rca`: Flags crash-looping containers and maps exit codes to causes
- `resource_pressure_analysis`: Compares CPU and memory use with limits
- `image_and_volume_bloat`: Totals dangling images, volumes and build cache
- `list_containers` (name suggests: reads): Lists containers
- `inspect_container` (name suggests: reads): Inspects one container
- `container_logs`: Reads container logs
- `container_stats`: Reads container stats
- `list_compose_stacks` (name suggests: reads): Rolls up Compose stacks with health
- `list_pods` (name suggests: reads): Lists Podman pods
- `remove_container` (name suggests: deletes): Removes a container
- `prune_images`: Prunes images
- `prune_volumes`: Prunes volumes
- `recreate_stack`: Recreates a Portainer stack
- `restart_container`: Restarts a container
- `stop_container` (name suggests: changes): Stops a container
- `start_container` (name suggests: changes): Starts a container
- `update_container` (name suggests: changes): Updates container limits

## FAQ

### Which platforms does Container Host AIops support?

Docker Engine, Portainer and Podman, selected by a per-target `platform` field.

### How many tools are there?

38: 29 reads and 9 writes.

### Is Portainer tested live?

The README says only Docker was exercised against a live daemon; Portainer and Podman have mock tests.

### Does Container Host AIops need a secret for Docker?

Not for a local socket; Portainer uses an API token stored in an encrypted file.

### Which writes are irreversible?

`remove_container`, `prune_images`, `prune_volumes` and `recreate_stack` capture before-state but have no undo.

### Is Container Host AIops free?

Yes. Container Host AIops is open source, so you can use and self-host it for free.

### How do I add Container Host AIops to Claude Code?

Run this command in your terminal: claude mcp add container-host-aiops -- uvx container-host-aiops

### What are the best alternatives to Container Host AIops?

The closest alternatives to Container Host AIops are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/container-host-aiops
