Skip to content
MCP server

XenMCP Docker agent

Read-only view of one Docker host: containers, logs, stats and events, never exec

Install
Pricing
Open source
Platforms
self-hosted, Linux, API
Runs
Remotely
Version
1.0.1
Listing updated
3 days ago

About XenMCP Docker agent

XenMCP Docker agent is an open-source MCP server for developer tools. It runs as a hosted remote server, so there is nothing to install locally.

This small agent sits next to the containers on one Docker host and answers questions about them through MCP. It can see state but never change it: the code sends Docker only a short allow-list of GET requests and refuses everything else, so there is no way to start, stop, restart, remove, exec, build or pull.

Secrets get special care. Inspect output never includes environment variables or command arguments, containers can be hidden with a label or an allow-list, and the agent answers only with the right bearer key from allowed IP addresses. Logs come from what Docker keeps itself, up to 500 lines per call, so no Grafana or Loki is needed, though a recreated container starts with an empty log.

It runs as a hardened container behind your own HTTPS reverse proxy, and examples for Caddy, nginx and Traefik are given. It is MIT licensed and is designed to be connected through XenMCP, which handles per-person OAuth and a call journal, but it also works with any client that can send an Authorization header, or over stdio locally.

Install

Run in a terminal

claude mcp add docker-agent --env XENMCP_AGENT_KEY='<XENMCP_AGENT_KEY>' -- docker run -i --rm -e XENMCP_AGENT_KEY ghcr.io/xenmcp/docker-agent:1.0.1

Add to claude_desktop_config.json

{
  "mcpServers": {
    "docker-agent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "XENMCP_AGENT_KEY",
        "ghcr.io/xenmcp/docker-agent:1.0.1"
      ],
      "env": {
        "XENMCP_AGENT_KEY": "<XENMCP_AGENT_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "docker-agent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "XENMCP_AGENT_KEY",
        "ghcr.io/xenmcp/docker-agent:1.0.1"
      ],
      "env": {
        "XENMCP_AGENT_KEY": "<XENMCP_AGENT_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "docker-agent": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "XENMCP_AGENT_KEY",
        "ghcr.io/xenmcp/docker-agent:1.0.1"
      ],
      "env": {
        "XENMCP_AGENT_KEY": "<XENMCP_AGENT_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "docker-agent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "XENMCP_AGENT_KEY",
        "ghcr.io/xenmcp/docker-agent:1.0.1"
      ],
      "env": {
        "XENMCP_AGENT_KEY": "<XENMCP_AGENT_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "docker-agent": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "XENMCP_AGENT_KEY",
        "ghcr.io/xenmcp/docker-agent:1.0.1"
      ],
      "env": {
        "XENMCP_AGENT_KEY": "<XENMCP_AGENT_KEY>"
      }
    }
  }
}

Configuration

  • XENMCP_AGENT_KEYKey callers must send as Authorization: Bearer (at least 32 characters)Required
  • XENMCP_ALLOW_IPSAddresses or CIDRs allowed to call the agent, comma-separated (default: XenMCP's address)

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

docker_info
Docker version, OS, CPUs, memory and counts.
list_containers
Name, image, state, uptime, ports and compose project.
inspect_container
State, exit code, OOM, restarts, health, limits, mounts, networks.
container_logs
Last lines, time window, stream filter, text or regex search.
container_stats
CPU, memory, network and processes right now.
recent_events
Start, stop, die, kill, OOM, restart and health events.

What it does

Container overview
list_containers shows image, state, uptime, ports and compose project.
Deep inspection
State, exit code, OOM kills, restarts, health checks, limits and mounts.
Log search
Time windows, stderr only, text or regex, up to 500 lines per call.
Live stats
CPU, memory, network and processes right now.
Event history
Starts, stops, deaths with exit code, OOM and health changes for up to 7 days.
Hardened by design
Read-only code path, key and IP restrictions, hidden environment variables.

Good for

  • Find out why a container restarted overnight
  • Search worker logs for timeouts in the last hour
  • See which container uses the most memory
  • Check when a health check last failed
  • Give an assistant host visibility without SSH

Pricing

Open source

MIT licensed; the XenMCP service is free during beta, later plans not final

Prices change. Check xenmcp.com before you buy.

XenMCP Docker agent FAQ

Can it stop or restart containers?

No. It has no such tool and refuses anything outside its read list.

How far back do logs go?

As far as Docker keeps them; with the default json-file driver that is since the container was created.

Does it work with Docker Compose and Portainer?

Yes. It reads all containers on the host however they were started.

Do I need a domain?

Yes, an HTTPS address through your reverse proxy, unless you run it over stdio locally.

Is XenMCP Docker agent free?

Yes. XenMCP Docker agent is open source, so you can use and self-host it for free.

How do I add XenMCP Docker agent to Claude Code?

Run this command in your terminal: claude mcp add docker-agent --env XENMCP_AGENT_KEY='<XENMCP_AGENT_KEY>' -- docker run -i --rm -e XENMCP_AGENT_KEY ghcr.io/xenmcp/docker-agent:1.0.1

What are the best alternatives to XenMCP Docker agent?

The closest alternatives to XenMCP Docker agent are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to XenMCP Docker agent

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools