Docker MCP Server

Docker MCP Server

docker-mcp-xiispace•byxiispace

A Model Context Protocol server exposing tools and resources for managing Docker containers and images via the Python Docker SDK.

License: Not specified•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Provides tools to list, run, stop, and remove Docker containers.
  • •Lists available Docker images and can pull new images.
  • •Fetches container logs and inspects container details.
  • •Exposes Docker information as resources, including containers, images, and configuration.

BEST FOR

  • •Managing Docker containers and images through an MCP client.
  • •Retrieving container logs and inspection details during Docker operations.

ABOUT DOCKER-MCP-XIISPACE

Docker MCP Server is cataloged as an MCP server attributed to xiispace. A Model Context Protocol server exposing tools and resources for managing Docker containers and images via the Python Docker SDK. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Docker MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What transports does the server support?

The server runs over stdio by default and switches to SSE transport when the MCP_PORT environment variable is set.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 401f65c4a254 · 采集于 2026-11-13 12:52:07 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Docker MCP Server

This is a Model Context Protocol (MCP) server that provides tools and resources for interacting with Docker containers and images. It uses the stream HTTP transport method for communication and the Python Docker SDK (docker-py) for Docker operations.

Features

  • List Docker containers and images
  • Run, stop, and remove containers
  • View container logs
  • Pull Docker images
  • Inspect container details
  • Access Docker information as resources

Prerequisites

  • Docker
  • Docker Compose (optional, for easier deployment)
  • uv (for local development)

Getting Started

Running with Docker Compose

  1. Clone this repository
  2. Build and start the server:
docker-compose up -d

Running with Docker directly

  1. Build the Docker image:
docker build -t mcp-docker-server .
  1. Run the container:
# Run server with SSE transport (no authentication)
docker run -d -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -e MCP_PORT=3000 --name mcp-docker-server mcp-docker-server

# Run server with SSE transport and token authentication
docker run -d -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -e MCP_PORT=3000 -e MCP_AUTH_TOKEN=your_secret_token --name mcp-docker-server mcp-docker-server

When the MCP_PORT environment variable is set, the server will use the SSE transport instead of stdio. Authentication is only applicable when using SSE transport. If the MCP_AUTH_TOKEN environment variable is set, the server will enable token authentication and configure the SSE endpoint to use the format /sse/{token} where {token} must match the value set in MCP_AUTH_TOKEN. If the token doesn't match or is not provided, the connection will be rejected. If no token is set, the server uses the standard /sse endpoint without authentication.

Running locally (development)

  1. Install uv (if not already installed):
curl -sSf https://astral.sh/uv/install.sh | sh
  1. Install dependencies using uv:
uv sync
  1. Run the server:
# Run with stdio transport (default)
uv run server.py

# Run with SSE transport on port 8000
MCP_PORT=8000 uv run server.py

# Run with SSE transport and token authentication
MCP_PORT=8000 MCP_AUTH_TOKEN=your_secret_token uv run server.py

Configuration

The server can be configured using environment variables:

  • MCP_PORT: When set, enables SSE transport mode and specifies the port to listen on (default: 8000). If not set, the server will use stdio transport.
  • MCP_AUTH_TOKEN: Secret token for authentication (only applicable when using SSE transport). When set, the SSE endpoint will be /sse/{token} instead of /sse
  • MCP_HOSTNAME: Hostname to use for Docker containers (default: localhost). This can be a domain name or IP address that will be used to access Docker containers after they are created.
  • MCP_AVAILABLE_PORTS: Comma-separated list of ports or port ranges that are available for Docker containers to bind to (e.g., 8000,8080-8090,9000). When specified, the server will validate that requested host ports are in this list.

Using with MCP clients

Should build the docker image first.

{
  "mcpServers": {
    "docker": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/var/run/docker.sock:/var/run/docker.sock",
        "mcp-docker-server"
      ]
    }
  }
}

Available Tools

  • docker_ps: List running containers
  • docker_images: List available Docker images
  • docker_inspect: Get detailed information about a container
  • docker_run: Run a Docker container
  • docker_stop: Stop a running container
  • docker_rm: Remove a container
  • docker_logs: Fetch container logs
  • docker_pull: Pull a Docker image

Available Resources

  • docker://containers: Information about all containers
  • docker://images: Information about all images
  • docker://container/{container_id}: Detailed information about a specific container
  • docker://config/hostname: Get the configured hostname for Docker containers
  • docker://config/available_ports: Get the list of available ports for Docker containers

TODO

  • Add functionality to query documentation for a specific Docker image

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Docker MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/docker-mcp-xiispace)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps