Skip to main content
Glama
Toowiredd

ChatGPT MCP Server

by Toowiredd

ChatGPT MCP Server

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

Related MCP server: MCP Development Server

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

Available Tools

7 tools
container_createC

Create and start a new Docker container

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYesDocker image name
nameNoContainer name
portsNoPort mappings (e.g. ["80:80"])
envNoEnvironment variables (e.g. ["KEY=value"])

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the tool creates and starts a container, implying a write/mutation operation, but doesn't disclose critical traits like permission requirements, whether it's idempotent, error handling (e.g., if image doesn't exist), or runtime effects (e.g., container runs immediately). This leaves significant gaps for safe agent operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Create and start a new Docker container') with zero wasted words. Every element earns its place by concisely conveying the essential purpose without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (creating and starting a Docker container is a non-trivial mutation), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't explain what happens on success (e.g., returns container ID?), error conditions, or behavioral nuances, leaving the agent with inadequate context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 4 parameters (image, name, ports, env) with clear descriptions and examples. The description adds no parameter-specific information beyond what the schema provides, which is acceptable given the high coverage, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create and start') and resource ('a new Docker container'), making the purpose immediately understandable. It distinguishes from siblings like container_start (which starts existing containers) and container_remove (which deletes containers). However, it doesn't explicitly mention how it differs from all siblings, such as container_exec or container_logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing image), when not to use it (e.g., for existing containers), or direct alternatives like container_start for already-created containers. The agent must infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_execC

Execute a command in a running container

ParametersJSON Schema
NameRequiredDescriptionDefault
containerYesContainer ID or name
commandYesCommand to execute

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Execute a command') but doesn't describe critical behavioral traits: whether this requires specific permissions, if it's interactive or batch, what happens to command output, potential side effects, or error conditions. For a tool that executes commands in containers, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized for a tool with two parameters and no complex behavior described. Every word earns its place in conveying the essential purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of executing commands in containers (potentially destructive, permission-sensitive operations) with no annotations and no output schema, the description is insufficiently complete. It doesn't address security implications, output handling, error scenarios, or interaction patterns. The agent lacks critical context needed to use this tool safely and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds no additional parameter semantics beyond what's already in the structured schema. It doesn't provide examples, format details, or constraints beyond the basic definitions. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute a command') and target ('in a running container'), providing specific verb+resource. It distinguishes from siblings like container_create or container_logs by focusing on command execution rather than lifecycle management or log retrieval. However, it doesn't explicitly differentiate from all siblings (e.g., container_start also operates on containers).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., container must be running), exclusions (e.g., not for stopped containers), or suggest alternatives among the sibling tools. The agent must infer usage context solely from the tool name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_logsC

Get container logs

ParametersJSON Schema
NameRequiredDescriptionDefault
containerYesContainer ID or name
tailNoNumber of lines to show from the end

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get container logs' implies a read-only operation, but it doesn't specify if this requires special permissions, if logs are streamed or fetched once, rate limits, or error conditions. For a tool with no annotations, this leaves significant gaps in understanding its behavior beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loading the core action without any wasted text. It efficiently communicates the tool's purpose in minimal space, though this brevity contributes to gaps in other dimensions. Every word earns its place by directly stating the function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (fetching logs from containers), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the logs contain, how they're formatted, or any prerequisites like container state. For a tool with no structured behavioral data, more context is needed to fully understand its use and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for 'container' (ID or name) and 'tail' (number of lines from the end). The description adds no additional meaning beyond what the schema provides, such as explaining log format or default behavior. Given the high schema coverage, a baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get container logs' clearly states the verb ('Get') and resource ('container logs'), making the basic purpose understandable. However, it lacks specificity about what kind of logs (e.g., stdout/stderr, real-time vs. historical) and doesn't distinguish it from potential sibling tools like 'container_exec' which might also access logs. It's adequate but vague in scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'container_exec' (which might run commands in containers) and 'containers_list' (which lists containers), there's no indication of when logs are needed over other operations. It's a basic statement of function without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_removeC

Remove a container

ParametersJSON Schema
NameRequiredDescriptionDefault
containerYesContainer ID or name
forceNoForce remove running container

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Remove a container' implies a destructive operation, but it doesn't specify whether this is permanent deletion, what happens to container data, whether it requires specific permissions, or what happens if the container is running. The 'force' parameter in the schema suggests there are runtime constraints, but the description doesn't explain them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, front-loading the core action and resource with zero wasted words. Every word earns its place in conveying the essential purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'remove' means operationally, what happens to container resources, whether the action is reversible, or what the response looks like. Given the complexity of container removal and lack of structured safety information, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (container ID/name and force flag). The description adds no additional meaning about parameters beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Remove a container' clearly states the action (remove) and target resource (container), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like container_stop or container_exec, which also operate on containers but with different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like container_stop (which might pause a container) and container_exec (which runs commands in a container), there's no indication of when removal is appropriate versus other container operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

containers_listC

List all Docker containers

ParametersJSON Schema
NameRequiredDescriptionDefault
allNoShow all containers (including stopped ones)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List') but doesn't describe traits like whether this is a read-only operation, potential performance impacts, rate limits, or what the output looks like (e.g., format, pagination). For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded with the core action ('List all Docker containers'), using only four words with zero waste. Every word earns its place by directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns complex container data. It doesn't explain return values, error conditions, or behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'all' clearly documented in the schema. The description doesn't add any parameter-specific details beyond implying a listing action, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all Docker containers'), making the purpose immediately understandable. However, it doesn't distinguish this from potential sibling tools like 'container_logs' or 'container_remove' beyond the obvious 'list' vs 'remove' distinction, missing explicit differentiation about scope or output format.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for listing containers (e.g., monitoring vs. management), or comparisons to siblings like 'container_logs' for detailed info. This leaves the agent with minimal usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_startC

Start a stopped container

ParametersJSON Schema
NameRequiredDescriptionDefault
containerYesContainer ID or name

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. 'Start' implies a state change (mutation), but it doesn't disclose permissions required, side effects (e.g., network exposure), error conditions (e.g., if container doesn't exist), or what 'started' means operationally (e.g., runs in foreground/background). The description is technically accurate but lacks context needed for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with zero wasted words. It's front-loaded with the core action and target, making it immediately scannable. Every word earns its place by conveying essential purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool (state change) with no annotations and no output schema, the description is incomplete. It lacks critical context: what permissions are needed, what happens on success/failure, whether it's idempotent, or what the output looks like. For a tool that modifies system state, this leaves significant gaps for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'container' documented as 'Container ID or name' in the schema. The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline of 3 where schema does the heavy lifting. No additional syntax, format, or constraints are explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Start') and target resource ('a stopped container'), making the purpose immediately understandable. It distinguishes from siblings like container_stop (opposite action) and container_create (different lifecycle stage). However, it doesn't specify what 'start' entails operationally beyond the basic verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it implies the container must be 'stopped' (a prerequisite), but offers no explicit when-to-use vs. alternatives. No comparison with container_create (for new containers) or container_exec (for running commands), and no mention of when this tool is inappropriate (e.g., for already running containers).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

container_stopC

Stop a running container

ParametersJSON Schema
NameRequiredDescriptionDefault
containerYesContainer ID or name

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Stop a running container' implies a state change operation, it doesn't specify whether this is reversible, what permissions are required, whether it's destructive to data, or what happens to processes inside the container. For a mutation tool with zero annotation coverage, this represents a significant gap in behavioral information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just four words, front-loading the essential information with zero wasted language. Every word earns its place, making it easy for an AI agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'stop' means operationally, what the expected outcome is, whether there are side effects, or how this differs from related operations like 'remove'. For a tool that changes system state, more contextual information would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'container' documented as 'Container ID or name'. The description adds no additional parameter information beyond what the schema provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Stop') and target ('a running container'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from its siblings like 'container_remove' or 'container_start', which would require more specific language about what 'stop' means in this context versus those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'container_start', 'container_remove', and 'container_exec', there's no indication of when stopping is appropriate versus starting, removing, or executing commands in a container. The description lacks any context about prerequisites or timing considerations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting specific Docker container operations: create, execute, logs, remove, list, start, and stop. There is no overlap or ambiguity between these functions, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent 'container_verb' or 'containers_verb' pattern with snake_case, except for 'containers_list' which uses plural 'containers' for listing multiple items. This minor deviation is logical and maintains overall naming predictability across the set.

Tool Count5/5

With 7 tools, this server is well-scoped for Docker container management, covering essential lifecycle operations without being overly sparse or bloated. Each tool serves a clear and necessary function in the domain.

Completeness5/5

The tool set provides complete CRUD/lifecycle coverage for Docker containers: create, start, stop, execute commands, view logs, list, and remove. There are no obvious gaps, enabling agents to handle typical container workflows without dead ends.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Toowiredd/chatgpt-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server