# Connect Docker to Claude – containers and logs via MCP | XenMCP

> Check the containers, logs, CPU and memory of your Docker host in plain language – with an open-source agent that can only read.

[Catalog](https://xenmcp.com/catalog/) / Docker

# Connect Docker to Claude

In beta

Ask Claude why a container restarted, what is in its logs and how much memory it uses – without SSH and without `docker logs`.

Your address for Claude `https://docker-acme.xenmcp.com/mcp`

[Register interest](https://xenmcp.com/waitlist/?server=docker)

You run the **XenMCP Docker agent** on your Docker host: a small open-source program (MIT) that can only read. It sees your containers, their state, logs, CPU and memory, and the events of the last days.

The agent runs behind your own reverse proxy (nginx, Caddy or Traefik) and answers only XenMCP. In XenMCP you add it in one step: the panel makes the key and shows the ready `docker run` command.

No Grafana or Loki needed: the agent reads the logs Docker itself keeps.

## What you can ask Claude

- Which containers are running, and which one crashed in the last 24 hours?
- Why did `api` restart last night? Show me the errors before it.
- Search the `worker` logs for “timeout” in the last hour.
- Which container uses the most memory?
- Is the health check of `db` green, and when did it last fail?

## Typical tools

## What you need to connect

- A Docker host where you may start a container
- A reverse proxy with HTTPS and an address for it, e.g. `https://docker-agent.your-company.com/mcp`
- The command from the XenMCP panel (with its key)

## Security

- Read-only in the code: the agent sends Docker only a short list of GET requests and refuses everything else before it reaches Docker. The code is open and tested.
- It never shows environment variables or start arguments – that is where passwords usually are.
- It answers only with the right key and only XenMCP’s fixed IP address.
- Hide containers with the label `xenmcp.hide=true` or a list of allowed names.
- Logs can contain personal data. What a tool returns goes to your AI client – hide what is not needed.
- XenMCP’s call log keeps only tool, status and duration – no logs.

## Good to know

The agent is open source (MIT): [github.com/xenMCP/docker-agent](https://github.com/xenMCP/docker-agent). Root on your host stays with you – XenMCP only holds a key to an agent that can read.

## Built on

We use the open server [XenMCP Docker agent](https://github.com/xenMCP/docker-agent) (MIT), build the image ourselves from a pinned version and review the tool descriptions before release.

## Frequently asked questions

**How far back do the logs go?**

As far as Docker keeps them: with the default `json-file` driver everything since the container was created, unless you set `max-size`/`max-file`. A recreated container starts with an empty log. For longer history: Grafana with Loki.

**Can Claude stop or restart containers?**

No. The agent has no such tool, and it does not send Docker anything outside its read list.

**Do I need a domain?**

Yes, an HTTPS address through your reverse proxy. Examples for nginx, Caddy and Traefik are in the agent’s guide.

**Does it work with Docker Compose and Portainer?**

Yes, the agent reads all containers on the host however they were started and shows their compose project.

## More servers

- [Grafana In beta Ask about the logs, metrics and dashboards of your own Grafana in plain language – from Claude on the web, on your phone or in your IDE. XenMCP runs the official Grafana MCP server for you in Germany.](https://xenmcp.com/catalog/grafana/)
- [Elasticsearch In beta Search the logs and data in your self-hosted Elasticsearch in plain language – from Claude on the web, on your phone or in your IDE.](https://xenmcp.com/catalog/elasticsearch/)

## Connect Docker to Claude?

Sign up and confirm your email. Servers marked “In beta” you can connect right after your invitation; for planned ones your interest decides the order.

[Join the beta](https://xenmcp.com/waitlist/?server=docker)

---

Source: https://xenmcp.com/catalog/docker/ (English, updated 2026-11-09)
Other languages: Deutsch: https://xenmcp.com/de/katalog/docker/index.html.md
