Docker logo

Docker

Community
QuantGeekDev

A docker MCP Server (modelcontextprotocol)

PublisherQuantGeekDev
Repositorydocker-mcp
LanguagePython
Forks
64
Stars
504
Available tools
4
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Docker exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 4 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    504 stars and 64 forks from the linked repository.

🐳 docker-mcp

Python 3.12 License: MIT Code style: black smithery badge

A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.

✨ Features

  • 🚀 Container creation and instantiation
  • 📦 Docker Compose stack deployment
  • 🔍 Container logs retrieval
  • 📊 Container listing and status monitoring

🎬 Demos

Deploying a Docker Compose Stack

https://github.com/user-attachments/assets/b5f6e40a-542b-4a39-ba12-7fdf803ee278

Analyzing Container Logs

https://github.com/user-attachments/assets/da386eea-2fab-4835-82ae-896de955d934

🚀 Quickstart

To try this in Claude Desktop app, add this to your claude config files:

json
{
  "mcpServers": {
    "docker-mcp": {
      "command": "uvx",
      "args": [
        "docker-mcp"
      ]
    }
  }
}

Installing via Smithery

To install Docker MCP for Claude Desktop automatically via Smithery:

bash
npx @smithery/cli install docker-mcp --client claude

Prerequisites

  • UV (package manager)
  • Python 3.12+
  • Docker Desktop or Docker Engine
  • Claude Desktop

Installation

Claude Desktop Configuration

Add the server configuration to your Claude Desktop config file:

MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

json
{
  "mcpServers": {
    "docker-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to-docker-mcp>",
        "run",
        "docker-mcp"
      ]
    }
  }
}
json
{
  "mcpServers": {
    "docker-mcp": {
      "command": "uvx",
      "args": [
        "docker-mcp"
      ]
    }
  }
}

🛠️ Development

Local Setup

  1. Clone the repository:
bash
git clone https://github.com/QuantGeekDev/docker-mcp.git
cd docker-mcp
  1. Create and activate a virtual environment:
bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
bash
uv sync

🔍 Debugging

Launch the MCP Inspector for debugging:

bash
npx @modelcontextprotocol/inspector uv --directory <path-to-docker-mcp> run docker-mcp

The Inspector will provide a URL to access the debugging interface.

📝 Available Tools

The server provides the following tools:

create-container

Creates a standalone Docker container

json
{
    "image": "image-name",
    "name": "container-name",
    "ports": {"80": "80"},
    "environment": {"ENV_VAR": "value"}
}

deploy-compose

Deploys a Docker Compose stack

json
{
    "project_name": "example-stack",
    "compose_yaml": "version: '3.8'\nservices:\n  service1:\n    image: image1:latest\n    ports:\n      - '8080:80'"
}

get-logs

Retrieves logs from a specific container

json
{
    "container_name": "my-container"
}

list-containers

Lists all Docker containers

json
{}

🚧 Current Limitations

  • No built-in environment variable support for containers
  • No volume management
  • No network management
  • No container health checks
  • No container restart policies
  • No container resource limits

🤝 Contributing

  1. Fork the repository from docker-mcp
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

✨ Authors

  • Alex Andru - Initial work | Core contributor - @QuantGeekDev
  • Ali Sadykov - Initial work | Core contributor - @md-archive

Made with ❤️

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "docker-mcp": {
      "command": "uvx",
      "args": [
        "docker-mcp"
      ]
    }
  }
}

Available Tools

  • create-container

    Create a new standalone Docker container

  • deploy-compose

    Deploy a Docker Compose stack

  • get-logs

    Retrieve the latest logs for a specified Docker container

  • list-containers

    List all Docker containers

Use Docker MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Docker is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Docker as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Docker MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": [
        "-y",
        "docker-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Docker MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Docker MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Docker to help me with this task?
Docker
Sure. I read it.
Here is what I found using Docker.

Frequently asked questions

What is the Docker MCP server used for?

Docker is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Docker MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Docker with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Docker MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Docker connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Docker MCP to TypingMind?

Docker runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Docker MCP provide in TypingMind?

Docker exposes 4 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Docker MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Docker requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇