Docker MCP Server

Docker MCP Server

Enables natural language interaction with Docker commands and operations. Supports container management, image operations, system information, and Docker Compose through conversational requests.

Category
Visit Server

README

Docker MCP Server

A Model Context Protocol (MCP) server that allows natural language interaction with Docker commands. This server interprets natural language requests and executes corresponding Docker operations.

Features

Natural Language Processing

The server can understand and execute Docker commands from natural language input:

  • Container Operations: "list containers", "start container nginx", "stop container myapp"
  • Image Operations: "list images", "pull image ubuntu", "remove image old-app"
  • System Information: "system info", "version", "docker stats", "disk usage"
  • Docker Compose: "compose up", "compose down", "compose logs"
  • Network & Volumes: "list networks", "list volumes"

Available Tools

  1. execute_docker_command: Execute Docker commands using natural language or direct commands
  2. manage_containers: Manage Docker containers (list, start, stop, remove, restart)
  3. manage_images: Manage Docker images (list, pull, remove, build)
  4. docker_info: Get Docker system information and statistics
  5. docker_compose: Manage Docker Compose services

Available Resources

  • docker-help: Documentation and examples of supported natural language commands

Installation

  1. Clone or download this project

  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Usage

Direct Execution

You can run the MCP server directly:

npm start

VS Code Integration

  1. Copy the mcp-config.json to your VS Code settings directory
  2. Update the path in the config to match your installation
  3. Configure VS Code to use the MCP server

Natural Language Examples

  • "show me all running containers"
  • "stop the nginx container"
  • "pull the latest ubuntu image"
  • "list all images"
  • "docker system info"
  • "compose up with build"
  • "remove container old-app"

Direct Docker Commands

You can also pass direct Docker commands:

  • "docker ps -a"
  • "docker images"
  • "docker system df"

Configuration

The server uses stdio transport for communication with MCP clients. It automatically handles:

  • Natural language parsing
  • Docker command execution
  • Error handling and reporting
  • Resource and tool registration

Requirements

  • Node.js v18 or higher
  • Docker installed and accessible from command line
  • Docker Compose (optional, for compose commands)

Security

This server executes Docker commands on your system. Only use it in trusted environments and be cautious with the commands you execute.

Error Handling

The server provides detailed error messages and handles:

  • Missing Docker installation
  • Invalid commands
  • Permission errors
  • Network issues

Development

  1. Install dependencies: npm install
  2. Run in development mode: npm run dev
  3. Build for production: npm run build
  4. Run tests: npm test

License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured