chatgpt
A Model Context Protocol server for Docker management through ChatGPT
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:
- Node.js and npm installed on your development machine
- Access to the repository at https://github.com/toowiredd/chatgpt-mcp-server.git
- Optional: Docker if you plan to run via container
Manual installation steps:
- Clone the repository
git clone https://github.com/toowiredd/chatgpt-mcp-server.git
cd chatgpt-mcp-server
- Install dependencies
npm install
- Create environment file
cp env.example .env
# Edit .env with your configuration, e.g. set API_KEY and HTTP_PORT
- Build the project
npm run build
- Run the server locally
npm start
- (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
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud