Smyth Docker Commander (MCP Server) logo

Smyth Docker Commander (MCP Server)

Organization
SmythOS

An MCP server that can spawn linux sandbox containers using docker and run commands in them via a TTY interface.

PublisherSmythOS
Repositorysmyth-docker-mcp
LanguageTypeScript
Forks
4
Stars
27
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Smyth Docker Commander (MCP Server) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    27 stars and 4 forks from the linked repository.

Smyth Docker Commander (MCP Server)

A Model Context Protocol (MCP) server built with @smythos/sdk that can spawn an ephemeral Linux sandbox using Docker and execute commands inside it via an interactive TTY.

Claude code demo

https://github.com/user-attachments/assets/b7b9b8c9-29da-43d1-8414-a45762245067

Gemini-cli demo

https://github.com/user-attachments/assets/db109ab2-65e2-40e8-be2b-fd0f01e4a217

Key Features:

  • Full TTY Interface: Exposes a complete terminal interface allowing MCP clients to send commands, keystrokes, and special key sequences while capturing all output in real-time
  • Collaborative Interaction: While the MCP server is running, both the AI client (Claude/Gemini) and the human user can simultaneously interact with the same container terminal, enabling true "teamwork" scenarios
  • Real-time Output Capture: Maintains a rolling buffer of terminal output that clients can read at any time to understand the current state

When launched, it starts an MCP server over Server-Sent Events (SSE) and exposes a set of skills that MCP clients (e.g., Claude Code, gemini-cli) can call:

  • SpawnContainer: Pulls the specified image (default ubuntu:latest) and starts a TTY bash session.
  • SendTTYInput: Sends input to the container TTY. Interprets only \r (carriage return). Use this to send shell commands terminated with \r.
  • SendTTYInputWithEscapeSequences: Sends input and interprets common escape sequences (e.g., \r, \b, \t, \x1b, octal like \033).
  • GetScreenContent: Returns the rolling output buffer (last ~5–10k chars) from the container.
  • StopAndDestroyContainer: Stops and removes the container, restoring the local terminal.

It uses dockerode under the hood and provides a status line UI in the terminal.

Getting Started

Prerequisites

  • Node.js v20+
  • Docker Desktop/Engine running and accessible (the server pings Docker and will error if unavailable)
  • An OpenAI (or other) API key configured in .smyth/.sre/vault.json, you can move this folder to your home directory if you don't want it to be in the project directory (~/.smyth/.sre/vault.json)

Install

bash
npm install

Configure Smyth Vault (Local Dev)

Create a vault file in one of these locations:

  • ~/.smyth/.sre/vault.json (recommended)
  • ./.smyth/.sre/vault.json (project-local)

Minimal content example:

json
{
    "default": {
        "openai": "sk-xxxxxx-Your-OpenAI-API-Key",
        "anthropic": "",
        "googleai": "",
        "groq": "",
        "togetherai": ""
    }
}

Build and Run

bash
npm run build
npm start

On start, you’ll see an SSE MCP URL printed like:

Smyth Docker Commander
--------------------------------
This MCP can spawn a linux sandbox container using docker and run commands in it.
--------------------------------
MCP url:  http://127.0.0.1:PORT/mcp

Keep this process running; clients connect to that MCP URL.

Using this as an MCP Server

MCP here stands for Model Context Protocol. This server exposes SSE endpoints for clients that support MCP.

Below are examples for configuring two popular clients: Claude Code and Gemini CLI.

Configure in Claude Code

json
{
    "mcpServers": {
        "smyth-docker-sandbox": {
            "type": "sse",
            "url": "http://127.0.0.1:PORT/mcp"
        }
    }
}

Common locations to edit configuration:

  • Claude Code (VS Code): Settings → search for mcpServers and edit in JSON
  • Claude Desktop config file paths:
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json

After updating settings, restart Claude Code/Desktop.

Configure in Gemini CLI

Create or edit settings.json and add an entry for this server.

User-scoped config locations:

  • Linux/macOS: ~/.gemini/settings.json

  • Windows: C:/Users/<YOU>/.gemini/settings.json

  • Command-based configuration:

json
{
    "mcpServers": {
        "smyth-docker-sandbox": {
            "type": "sse",
            "url": "http://127.0.0.1:PORT/mcp"
        }
    }
}

Restart gemini after editing settings.

Example Client Flows

Once the server is registered and connected, a client can orchestrate flows like:

  1. Start a container
  • Call SpawnContainer
  • Wait a few seconds for readiness
  1. Run a command
  • Call SendTTYInput with ttyInput: "ls -la\r", wait_seconds: 3
  • Or use SendTTYInputWithEscapeSequences for special key sequences
  1. Read output
  • Call GetScreenContent to fetch the latest buffer
  1. Stop
  • Call StopAndDestroyContainer to cleanly end the session

Collaborative Terminal Interaction

One of the unique features of this MCP server is that it enables collaborative terminal sessions. While an AI client (Claude, Gemini, etc.) is interacting with the container through MCP calls, you can also directly interact with the same terminal session:

  • Human Input: Type directly in the terminal where the MCP server is running - your keystrokes go to the container
  • AI Input: The AI client sends commands via SendTTYInput or SendTTYInputWithEscapeSequences
  • Shared Output: Both human and AI see the same terminal output in real-time
  • Coordination: Use F12 to enter command mode for local control (HELP, STATUS, STOP commands)

This allows for powerful "pair programming" scenarios where you and the AI can work together on the same terminal session, taking turns or collaborating on complex tasks.

Notes, Tips, and Limits

  • Docker must be running; otherwise the server will return a helpful error.
  • The output buffer is truncated to keep it manageable (last ~5–10k characters).
  • This script expects a TTY; if not in a TTY environment, it will exit early.
  • The terminal reserves two bottom lines for a status bar. Pressing F12 in the host terminal enters a command mode for local control during manual sessions.
  • Default image is ubuntu:latest; you can modify the image in src/index.ts when constructing DockerExecutor.
  • Both human and AI inputs are sent to the same container TTY stream, so coordination may be needed for complex interactions.

Development

  • Build: npm run build
  • Start (built): npm start
  • Dev loop: npm run dev

Planned Enhancements

These are possible enhancements that we may add in the future. If you find this MCP server useful, we'd love your contributions to help implement any of these features:

Configuration & Flexibility

  • Dynamic LLM Model Selection: Pass the LLM model (currently hardcoded to gpt-4o) as a command-line argument or environment variable
  • Client-Selectable Docker Images: Allow MCP clients to specify which Docker image to use when spawning containers (currently defaults to ubuntu:latest)
  • Configurable Buffer Size: Make the output buffer size configurable instead of the current fixed ~5-10k character limit
  • Custom Container Commands: Support for custom startup commands beyond the default /bin/bash
  • Standalone Agent Mode: Allow docker commander to run as a standalone interactive agent without the need for a client like gemini-cli or claude-code. (This requires implementing a standalone CLI for the agent)

Enhanced Container Management

  • Multi-Container Support: Ability to spawn and manage multiple containers simultaneously with unique identifiers
  • Container Persistence: Option to keep containers running between MCP sessions for long-running tasks
  • Resource Limits: Configure CPU, memory, and disk limits for spawned containers
  • Volume Mounting: Support for mounting host directories into containers for file sharing

Improved User Experience

  • Session Recording: Record and replay terminal sessions for debugging and learning
  • Container Templates: Pre-configured container setups for common development environments (Node.js, Python, Go, etc.)
  • Status Dashboard: Web-based dashboard to monitor active containers and their resource usage
  • Logging Enhancements: Better structured logging with different verbosity levels

Security & Networking

  • Network Isolation: Enhanced network security options for containers
  • Authentication: Optional authentication for MCP server access
  • Port Forwarding: Expose container ports to the host for web development scenarios

Contributions and feature requests are welcome! Please open an issue or submit a pull request if you'd like to help implement any of these enhancements.

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "smyth-docker-mcp": {
      "command": "node",
      "args": [
        "dist/index.js"
      ]
    }
  }
}

Use Smyth Docker Commander (MCP Server) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Smyth Docker Commander (MCP Server) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Smyth Docker Commander (MCP Server) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Smyth Docker Commander (MCP Server) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "smyth-docker-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "smyth-docker-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Smyth Docker Commander (MCP Server) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Smyth Docker Commander (MCP Server) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Smyth Docker Commander (MCP Server) to help me with this task?
Smyth Docker Commander (MCP Server)
Sure. I read it.
Here is what I found using Smyth Docker Commander (MCP Server).

Option 2: Add an MCP server URL

Use this when Smyth Docker Commander (MCP Server) is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Smyth Docker Commander (MCP Server).
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Smyth Docker Commander (MCP Server) connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Smyth Docker Commander (MCP Server) tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Smyth Docker Commander (MCP Server) tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Smyth Docker Commander (MCP Server) to help me with this task?
Smyth Docker Commander (MCP Server)
Sure. I read it.
Here is what I found using Smyth Docker Commander (MCP Server).

Frequently asked questions

What is the Smyth Docker Commander (MCP Server) MCP server used for?

Smyth Docker Commander (MCP Server) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Smyth Docker Commander (MCP Server) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Smyth Docker Commander (MCP Server) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Smyth Docker Commander (MCP Server) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Smyth Docker Commander (MCP Server) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Smyth Docker Commander (MCP Server) MCP to TypingMind?

Smyth Docker Commander (MCP Server) can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Smyth Docker Commander (MCP Server) MCP provide in TypingMind?

Smyth Docker Commander (MCP Server) exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Smyth Docker Commander (MCP Server) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Smyth Docker Commander (MCP Server) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇