Get the FREE Ultimate OpenClaw Setup Guide →

chatgpt

A Model Context Protocol server for Docker management through ChatGPT

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio toowiredd-chatgpt-mcp-server node dist/server.js \
  --env API_KEY="Your API authentication key" \
  --env HTTP_PORT="Server port (default 3001)" \
  --env RATE_LIMIT_WINDOW="Window size in milliseconds" \
  --env RATE_LIMIT_REQUESTS="Maximum requests per window"

How to use

This MCP server exposes Docker management capabilities through a GPT-enabled interface built on the Model Context Protocol (MCP). It is implemented in TypeScript and packaged for containerized deployment, with robust error handling, resource management, and authentication. Using natural language prompts, you can ask the server to create, start, stop, restart, or remove Docker containers, inspect container status, map ports, and manage volumes or networks. The built-in MCP inspector and rate-limiting provide visibility into requests and help ensure stable operation while enforcing API key authentication.

How to install

Prerequisites:

Manual installation steps:

  1. Clone the repository
git clone https://github.com/toowiredd/chatgpt-mcp-server.git
cd chatgpt-mcp-server
  1. Install dependencies
npm install
  1. Create environment file
cp env.example .env
# Edit .env with your configuration, e.g. set API_KEY and HTTP_PORT
  1. Build the project
npm run build
  1. Run the server locally
npm start
  1. (Optional) Run with Docker Build the container
npm run docker:build

Run the container

npm run docker:run

Or via docker directly:

docker run -d \
  -p 3001:3001 \
  --env-file .env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  chatgpt-mcp-server

Additional notes

Environment variables:

  • API_KEY: API authentication key required for requests
  • HTTP_PORT: Server port (default 3001) – ensure this port is open and not in use
  • RATE_LIMIT_REQUESTS and RATE_LIMIT_WINDOW: Configure rate limiting to protect the server from abuse Common issues:
  • Port conflicts during startup: check existing services listening on the configured port
  • Missing environment variables: ensure .env is created and loaded correctly
  • Docker socket permissions: when mounting /var/run/docker.sock, ensure the user inside the container has access Configuration tips:
  • Use a strong API_KEY to prevent unauthorized access
  • Monitor logs for error handling and graceful shutdown messages
  • Enable graceful shutdown hooks to avoid resource leaks during redeploys

Related MCP Servers

Sponsor this space

Reach thousands of developers