Docker MCP server logo

Docker MCP server

by MCP-Mirror

An MCP server for managing Docker with natural language. It allows composing containers, introspecting running containers, and managing persistent data using natural language prompts.

View on GitHub

Last updated: N/A

What is Docker MCP server?

This is an MCP (Machine Communication Protocol) server that enables you to manage Docker containers using natural language. It acts as an intermediary, translating natural language instructions into Docker commands.

How to use Docker MCP server?

Install the server following the quickstart instructions, which involve cloning the repository and configuring it with your Claude Desktop application. Then, use natural language prompts, like docker_compose, to define and manage your Docker containers. The server will present a plan for your approval before applying any changes.

Key features of Docker MCP server

  • Compose containers with natural language

  • Introspect & debug running containers

  • Manage persistent data with Docker volumes

  • Supports plan+apply loop for container management

  • Provides resources for container stats and logs

Use cases of Docker MCP server

  • Server administrators managing remote Docker engines for public-facing websites

  • Tinkerers spinning up containers locally without writing Docker commands

  • Quickly deploying and managing WordPress and MySQL containers

  • Managing nginx containers

  • Cleaning up containers, volumes, and networks

FAQ from Docker MCP server

Can I use sensitive data with this server?

It is strongly discouraged to configure containers with sensitive data like API keys or database passwords, as any data exchanged with the LLM could be compromised.

Are there any security concerns?

Yes, Docker is not a secure sandbox. Review the containers created by the LLM carefully. The server does not support sensitive Docker options like --privileged or --cap-add/--cap-drop for safety reasons.

How is the server configured?

The server uses the Python Docker SDK's from_env method. See the Docker SDK documentation for configuration details.

What tools are available for managing containers?

The server provides tools for listing, creating, running, recreating, starting, fetching logs, stopping, and removing containers.

What tools are available for managing images, networks, and volumes?

The server provides tools for listing, pulling, pushing, building, and removing images. It also provides tools for listing, creating, and removing networks and volumes.