ChatGPT MCP Server

ChatGPT MCP Server

A Model Context Protocol server that enables Docker container management through natural language interactions using a custom GPT interface.

Toowiredd

Virtualization
Visit Server

Tools

containers_list

List all Docker containers

container_create

Create and start a new Docker container

container_stop

Stop a running container

container_start

Start a stopped container

container_remove

Remove a container

container_logs

Get container logs

container_exec

Execute a command in a running container

README

ChatGPT MCP Server

smithery badge

A Model Context Protocol (MCP) server that provides Docker management capabilities through a custom GPT interface.

Features

  • Docker container management through natural language
  • Built on the Model Context Protocol (MCP)
  • TypeScript implementation
  • Containerized deployment
  • Robust error handling and graceful shutdown
  • Resource management and port handling
  • Rate limiting and API key authentication

Setup

Installing via Smithery

To install ChatGPT MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @Toowiredd/chatgpt-mcp-server --client claude

Manual Installation

  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
  1. Build the project
npm run build

Running with Docker

  1. Build the container
npm run docker:build
  1. Run the container
npm run docker:run

Or manually:

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

Development

  • npm run build - Build the TypeScript code
  • npm run watch - Watch for changes and rebuild
  • npm run inspector - Run the MCP inspector tool

Environment Variables

  • API_KEY - API authentication key
  • HTTP_PORT - Server port (default: 3001)
  • RATE_LIMIT_REQUESTS - Maximum requests per window
  • RATE_LIMIT_WINDOW - Window size in milliseconds

Resource Management

The server implements robust resource management:

  • Graceful shutdown on process signals (SIGINT, SIGTERM, SIGQUIT)
  • Connection tracking and management
  • Request timeout handling
  • Port conflict detection
  • Keep-alive connection management
  • Active request tracking and graceful completion

Shutdown Process

  1. The server initiates graceful shutdown on process signals
  2. New connections are rejected
  3. Active requests are allowed to complete (with timeout)
  4. Keep-alive connections are closed
  5. Server ports are properly released
  6. Resources are properly released

Error Handling

  • Port conflicts are detected and reported
  • Unhandled rejections and exceptions are caught
  • Network errors are properly handled
  • Resource leaks are prevented through proper handling
  • Timeouts ensure the server doesn't hang during shutdown

License

MIT

Recommended Servers

Brev

Brev

Run, build, train, and deploy ML models on the cloud.

Official
Local
Python
metoro-mcp-server

metoro-mcp-server

Query and interact with kubernetes environments monitored by Metoro. Look at APM, metrics, traces, profiling information with LLMs.

Official
Local
Go
MCP2Lambda

MCP2Lambda

Enables AI models to interact with AWS Lambda functions via the MCP protocol, allowing access to private resources, real-time data, and custom computation in a secure environment.

Official
Python
mcp-k8s-go

mcp-k8s-go

This project is intended as a both MCP server connecting to Kubernetes and a library to build more servers for any custom resources in Kubernetes.

Local
Go
Sandbox MCP Server

Sandbox MCP Server

Provides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.

Local
Python
MCP Development Server

MCP Development Server

A Model Context Protocol server that enables Claude to manage software development projects with complete context awareness and code execution through Docker environments.

Local
Python
Room MCP

Room MCP

A command-line tool that enables the use of MCP with the Room protocol, allowing agents to create and interact in peer-to-peer virtual rooms for goal-oriented collaboration.

Local
JavaScript
MCP 3D Printer Server

MCP 3D Printer Server

Enables interaction with 3D printer management systems through an MCP server, supporting STL file manipulation, slicing, and control of printers like OctoPrint, Klipper, Duet, and more.

Local
TypeScript
MCP Server Template

MCP Server Template

A template for creating Model Context Protocol (MCP) servers in TypeScript, offering features like container-based dependency injection, a service-based architecture, and integration with the LLM CLI for architectural design feedback through natural language.

Local
TypeScript
Code Sandbox MCP

Code Sandbox MCP

An MCP server to create secure code sandbox environment for executing code within Docker containers.

Local
Go