Get the FREE Ultimate OpenClaw Setup Guide →

docker

MCP server from asavvop/docker-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio asavvop-docker-mcp-server docker run -i image-name \
  --env DOCKER_HOST="tcp://localhost:2375 (optional; configure if using a remote Docker daemon)"

How to use

This MCP server provides a RESTful interface to manage Docker images and containers using Spring AI's Docker Model Runner. It exposes capabilities to list, pull, and remove Docker images, as well as start, stop, and query the existence of containers. You can integrate these tools into automation pipelines or other MCP-enabled systems to streamline container workflows. The server leverages a Docker-aware model runner to intelligently orchestrate Docker operations, making it suitable for automation scenarios where context-aware decisions are beneficial.

How to install

Prerequisites:

  • Java 17+
  • Docker installed and running
  • Docker model installed and enabled
  • Maven or Gradle

Installation steps:

  1. Clone the repository: git clone https://github.com/asavvop/docker-mcp-server.git cd docker-mcp-server
  2. Build the project: ./mvnw clean install
  3. Pull a Docker model (example): docker model pull ai/gemma3
  4. Run the server: ./mvnw spring-boot:run

Note: If you prefer running via Docker, you would typically build a Docker image for the MCP server and run it with Docker, ensuring the container has access to the host's Docker daemon if needed.

Additional notes

Tips:

  • Ensure Docker is running and the Docker daemon is accessible from the MCP server environment.
  • If using a remote Docker daemon, configure DOCKER_HOST and related TLS settings as needed.
  • The README mentions using a Docker model (e.g., ai/gemma3). Ensure the model is available and compatible with the server version.
  • The server exposes REST endpoints for image and container management; consider securing endpoints in production and implementing authentication as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers