Логотип Smyth Docker Commander (MCP Server)

Smyth Docker Commander (MCP Server)

Организация
SmythOS

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

ИздательSmythOS
Репозиторийsmyth-docker-mcp
ЯзыкTypeScript
Форки
4
Звёзды
27
Доступные инструменты
0
Тип транспортаstdio, streamable-http
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Smyth Docker Commander (MCP Server) предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 27, форки: 4 — в связанном репозитории.

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

Установка

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

Используйте MCP Smyth Docker Commander (MCP Server) с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Smyth Docker Commander (MCP Server) вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Вы можете запустить MCP локально на своём устройстве или подключиться к удалённому серверу MCP по URL.

Вариант 1: используйте локальный коннектор

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Smyth Docker Commander (MCP Server) как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Smyth Docker Commander (MCP Server).
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "smyth-docker-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "smyth-docker-mcp"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Smyth Docker Commander (MCP Server), затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Smyth Docker Commander (MCP Server).
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Smyth Docker Commander (MCP Server)?
Smyth Docker Commander (MCP Server)
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Smyth Docker Commander (MCP Server).

Вариант 2: добавьте URL сервера MCP

Выберите этот способ, если Smyth Docker Commander (MCP Server) уже размещён на удалённом сервере или вашей команде нужен общий коннектор для нескольких пользователей.

1

Откройте коннекторы MCP

В TypingMind перейдите в раздел «Плагины», откройте «Коннекторы MCP» и выберите «Добавить URL».

  1. Откройте TypingMind в браузере.
  2. Перейдите в раздел «Плагины».
  3. Откройте раздел «Коннекторы MCP».
  4. Нажмите «Добавить URL».
Форма «Добавить URL своего сервера MCP» в TypingMind
2

Вставьте URL сервера

Введите URL сервера MCP, предоставленный поставщиком в поле «URL сервера». Добавьте название подключения, описание, значок, пользовательские HTTP-заголовки или настройки клиента OAuth, если они требуются серверу.

  1. Вставьте URL сервера MCP, предоставленный поставщиком в поле «URL сервера».
  2. Введите название подключения для Smyth Docker Commander (MCP Server).
  3. Добавьте описание и значок, чтобы подключение было проще узнать.
  4. Добавьте пользовательские HTTP-заголовки или данные клиента OAuth, если сервер требует аутентификации.
3

Создайте подключение

Нажмите «Создать подключение», затем вернитесь к списку плагинов и убедитесь, что новое подключение MCP активно.

  1. Нажмите «Создать подключение».
  2. Вернитесь к списку коннекторов MCP.
  3. Убедитесь, что подключение Smyth Docker Commander (MCP Server) отображается как активное.
  4. Обновите список плагинов, если подключение не появится сразу.
4

Переключайте модели без повторного подключения

Начните чат с предпочитаемой моделью, включите инструменты Smyth Docker Commander (MCP Server) в разделе «Плагины» и при необходимости переключитесь на другую модель. Подключение MCP останется доступным в рабочем пространстве TypingMind.

  1. Начните новый чат в TypingMind.
  2. Выберите модель ИИ, которую хотите использовать.
  3. Включите инструменты Smyth Docker Commander (MCP Server) в разделе «Плагины».
  4. При необходимости попросите модель использовать инструмент.
  5. Переключитесь на другую модель ИИ и используйте то же подключение MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Smyth Docker Commander (MCP Server)?
Smyth Docker Commander (MCP Server)
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Smyth Docker Commander (MCP Server).

Часто задаваемые вопросы

Для чего используется сервер MCP Smyth Docker Commander (MCP Server)?

Smyth Docker Commander (MCP Server) — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Smyth Docker Commander (MCP Server) с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Smyth Docker Commander (MCP Server) с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Smyth Docker Commander (MCP Server) с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Smyth Docker Commander (MCP Server), вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Smyth Docker Commander (MCP Server) к TypingMind?

Smyth Docker Commander (MCP Server) можно подключить к TypingMind через локальный коннектор MCP или добавив URL удалённого сервера MCP. Используйте локальный коннектор, если серверу нужен доступ к файлам, приложениям или закрытым ресурсам на вашем устройстве, и URL сервера, если сервер MCP размещён удалённо.

Какие инструменты предоставляет сервер MCP Smyth Docker Commander (MCP Server) в TypingMind?

Smyth Docker Commander (MCP Server) предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Smyth Docker Commander (MCP Server)?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Smyth Docker Commander (MCP Server) требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇