Logo di Smyth Docker Commander (MCP Server)

Smyth Docker Commander (MCP Server)

Organizzazione
SmythOS

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

AutoreSmythOS
Repositorysmyth-docker-mcp
LinguaTypeScript
Fork
4
Stelle
27
Strumenti disponibili
0
Tipo di trasportostdio, streamable-http
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Smyth Docker Commander (MCP Server) mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    27 stelle e 4 fork nel repository collegato.

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

Installazione

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

Usa MCP Smyth Docker Commander (MCP Server) con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Smyth Docker Commander (MCP Server), puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Puoi eseguire MCP localmente sul tuo dispositivo o connetterti all'URL di un server MCP remoto.

Opzione 1: usa il connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Smyth Docker Commander (MCP Server) come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Smyth Docker Commander (MCP Server).
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "smyth-docker-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "smyth-docker-mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Smyth Docker Commander (MCP Server), poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Smyth Docker Commander (MCP Server).
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Smyth Docker Commander (MCP Server) per aiutarmi con questa attività?
Smyth Docker Commander (MCP Server)
Certo. Ho letto.
Ecco cosa ho trovato con Smyth Docker Commander (MCP Server).

Opzione 2: aggiungi l'URL di un server MCP

Usa questo metodo se Smyth Docker Commander (MCP Server) è già ospitato in remoto o se il tuo team vuole un unico connettore condiviso accessibile a più utenti.

1

Apri Connettori MCP

In TypingMind, vai su Plugin, apri Connettori MCP e scegli Aggiungi URL.

  1. Apri TypingMind nel tuo browser.
  2. Vai a Plugin.
  3. Apri Connettori MCP.
  4. Fai clic su Aggiungi URL.
Modulo di TypingMind per aggiungere l'URL di un server MCP personalizzato
2

Incolla l'URL del server

Inserisci l'URL del server MCP fornito dal provider nel campo URL del server. Aggiungi un nome per la connessione, una descrizione, un'icona, header HTTP personalizzati o le impostazioni del client OAuth se richiesti dal server.

  1. Incolla l'URL del server MCP fornito dal provider nel campo URL del server.
  2. Inserisci un nome per la connessione a Smyth Docker Commander (MCP Server).
  3. Aggiungi una descrizione e un'icona per riconoscere più facilmente la connessione.
  4. Aggiungi header HTTP personalizzati o i dati del client OAuth se il server richiede l'autenticazione.
3

Crea la connessione

Fai clic su Crea connessione, poi torna all'elenco dei plugin e verifica che la nuova connessione MCP sia attiva.

  1. Fai clic su Crea connessione.
  2. Torna all'elenco dei connettori MCP.
  3. Verifica che la connessione Smyth Docker Commander (MCP Server) risulti attiva.
  4. Aggiorna l'elenco dei plugin se la connessione non appare subito.
4

Cambia modello senza riconnetterti

Avvia una chat con il tuo modello preferito, abilita gli strumenti di Smyth Docker Commander (MCP Server) dalla sezione Plugin e passa a un altro modello quando serve. La connessione MCP rimane disponibile nell'area di lavoro di TypingMind.

  1. Avvia una nuova chat in TypingMind.
  2. Seleziona il modello IA che vuoi usare.
  3. Abilita gli strumenti di Smyth Docker Commander (MCP Server) dalla sezione Plugin.
  4. Chiedi al modello di usare lo strumento quando serve.
  5. Passa a un altro modello IA e riutilizza la stessa connessione MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Smyth Docker Commander (MCP Server) per aiutarmi con questa attività?
Smyth Docker Commander (MCP Server)
Certo. Ho letto.
Ecco cosa ho trovato con Smyth Docker Commander (MCP Server).

Domande frequenti

A cosa serve il server MCP Smyth Docker Commander (MCP Server)?

Smyth Docker Commander (MCP Server) è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Smyth Docker Commander (MCP Server) MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Smyth Docker Commander (MCP Server) con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Smyth Docker Commander (MCP Server) con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Smyth Docker Commander (MCP Server), puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Smyth Docker Commander (MCP Server) MCP a TypingMind?

Puoi collegare Smyth Docker Commander (MCP Server) a TypingMind con il connettore MCP locale oppure aggiungendo l'URL di un server MCP remoto. Usa il connettore locale quando il server deve accedere a file, app o risorse private sul tuo dispositivo; usa invece l'URL del server quando il server MCP è ospitato in remoto.

Quali strumenti offre Smyth Docker Commander (MCP Server) MCP in TypingMind?

Smyth Docker Commander (MCP Server) mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Smyth Docker Commander (MCP Server) MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Smyth Docker Commander (MCP Server) richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇