bravetony44_docker_mcp_server

bravetony44_docker_mcp_server

by braveTony44
Automates Docker container operations using AI agents through the Model Context Protocol (MCP).

Docker MCP Server for AI-Powered Container Management 🐳⚡

Automate Docker operations through AI agents with this powerful Model Context Protocol integration. Manage containers, monitor deployments, and orchestrate workflows using natural language commands.

Overview

The Docker MCP Server is designed to streamline Docker container management using AI-driven automation. It provides a seamless interface for creating, monitoring, and controlling Docker containers through the Model Context Protocol (MCP).

Key Features

  • 🤖 AI-powered container lifecycle management
  • ⚡ Real-time status monitoring dashboard
  • 🔄 Seamless Docker API integration via Dockerode
  • 🧩 Extensible MCP tool ecosystem
  • 📡 JSON schema validation with Zod

Quick Start 🚀

# Clone and setup
git clone https://github.com/yourusername/docker-mcp.git
cd docker-mcp
npm install

# Start the MCP server (requires Docker running)
node index.js

Configuration ⚙️

// config/docker.config.js
export const dockerConfig = {
  socketPath: process.env.DOCKER_SOCKET || '/var/run/docker.sock'
};

MCP Configuration ⚡

Add the server to your MCP configuration file (cline_mcp_settings.json):

{
  "mcpServers": {
    "dockerMcp": {
      "command": "node",
      "args": ["docker-mcp/index.js"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}

This configuration will:
1. Make the Docker MCP server available system-wide
2. Auto-start with your development environment
3. Allow seamless integration with other MCP tools

Available MCP Tools 🛠️

1. createConatinerByImage

{
  "image_name": "string",
  "tag": "string"
}

Creates a new container from specified image and tag.

2. getConatinerById

{
  "container_id": "string"
}

Retrieves detailed information about a container.

3. getConatinerStatus

{
  "container_id": "string"
}

Checks current status of a container (running, paused, exited).

4. startPauseOrKill

{
  "container_id": "string",
  "desired_state": "start|pause|kill"
}

Manages container state transitions.

Usage Example 🤖

<use_mcp_tool>
<server_name>dockerMcp</server_name>
<tool_name>createConatinerByImage</tool_name>
<arguments>
{
  "image_name": "nginx",
  "tag": "latest"
}
</arguments>
</use_mcp_tool>

Security 🔒

# For production environments:
export DOCKER_SOCKET="/var/run/docker.sock"  # Restrict socket permissions

Contributing 👥

We welcome contributions! Please follow our contribution guidelines.


Powered by:
MCP SDK

Development

# Start the MCP server
node index.js

Dependencies

Note: Requires Docker Engine running with exposed Docker socket.

About

This is an MCP server for Docker basic container management, including creating, getting, and stopping/starting/removing containers.

Resources

Stars

2 stars

Watchers

1 watching

Forks

0 forks

Report repository

Releases


No releases published

Packages 0


No packages published

Contributors 2


Languages

Features & Capabilities

Categories
mcp_server model_context_protocol docker ai_automation javascript api_integration container_management

Implementation Details

Stats

0 Views
0 Favorites
2 GitHub Stars

Repository Info

braveTony44 Organization

Similar Servers

continuedev_continue by continuedev
0
0
0