XenMCP Docker agent — Claude Code MCP server: what it does
XenMCP Docker agent — an MCP server for Claude Code and Cursor that reads container state and logs via a read-only Docker interface. Runs on the host for infrastructure monitoring through AI clients.
MIT ★ 4 updated 2026-11-10
Open on GitHubWhat XenMCP Docker agent does
The agent connects to the Docker socket in read-only mode to return system info, container lists, metrics, and event histories without modifying the host. It restricts actions to a fixed set of HTTP GET endpoints and blocks any attempt to start, stop, or execute commands inside containers.
HTTP deployment requires an XENMCP_AGENT_KEY of at least 32 characters and a reverse proxy terminating HTTPS. Local usage via --stdio bypasses network ports by talking directly over standard input and output while mounting the Docker socket.
Requests over HTTP validate client IPs against XENMCP_ALLOW_IPS and log calls to the management panel. Exposing the HTTP port without a firewall or proxy introduces unauthorized access risks.
What it helps with
- inspect container resource limits and health checks
- fetch container stdout and stderr logs within a time window
- track container lifecycle events over the last seven days
- check CPU and memory consumption stats for services
Example prompts for the agent
- Show me the current resource usage and stats for all Docker containers
- Fetch the last 200 lines of logs from the web container
- List all running containers and their exposed ports via Docker agent
How to install XenMCP Docker agent
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about XenMCP Docker agent
How to install XenMCP Docker agent in Claude Code?
Run the Docker container with an XENMCP_AGENT_KEY, set up a reverse proxy with HTTPS on port 8080, and add the endpoint to your client configuration.
What does XenMCP Docker agent do?
It exposes a read-only MCP interface to a single Docker host so AI agents can inspect containers, view metrics, and read logs safely.
What is needed to run XenMCP Docker agent?
You need access to /var/run/docker.sock, Docker runtime, and the XENMCP_AGENT_KEY variable for HTTP connections.