file-systemsdeveloper-tools

Docker Container Execution

kenforthewin

by kenforthewin

Run and manage Docker containers with intelligent process management, background task tracking, and portainers for advan

Provides Docker container execution with intelligent process management, background task tracking, and comprehensive file operations for isolated development environments and automated testing workflows.

github stars

6

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

No host installation requiredHTTP transport with bearer token authIncludes Playwright and dev tools

best for

  • / Isolated development environments without host dependencies
  • / Automated testing workflows in controlled containers
  • / Secure command execution for AI assistants
  • / Remote development setups requiring containerization

capabilities

  • / Execute shell commands in isolated Docker containers
  • / Read, write, and edit files within container workspace
  • / Track long-running background processes with unique IDs
  • / Send interactive input to running processes
  • / Search and manipulate files in containerized environment
  • / Manage process timeouts based on output activity

what it does

Runs a containerized MCP server that executes commands and manages files inside a secure Docker environment. Communicates over HTTP with token authentication instead of requiring local installation.

about

Docker Container Execution is a community-built MCP server published by kenforthewin that provides AI assistants with tools and capabilities via the Model Context Protocol. Run and manage Docker containers with intelligent process management, background task tracking, and portainers for advan It is categorized under file systems, developer tools.

how to install

You can install Docker Container Execution in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Docker Container Execution is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Docker MCP Server

A Model Context Protocol (MCP) server that runs entirely inside a Docker container, providing secure command execution and file operations through HTTP with bearer token authentication.

🚀 Features

  • Containerized MCP Server: Runs entirely inside Docker with no host dependencies
  • HTTP Transport: Network-based communication with bearer token authentication
  • Secure Command Execution: Run shell commands in isolated container environment
  • File Operations: Read, write, edit, and search files within container workspace
  • Process Management: Track long-running processes with unique IDs
  • Interactive Input: Send input to running processes
  • Smart Timeouts: Intelligent process timeout handling based on output activity

🏗️ Architecture

The MCP server runs inside a Docker container and communicates with clients over HTTP:

MCP Client (via HTTP) ↔ Docker Container (Port 3000)
                              ↓
                        MCP Server (Node.js)
                              ↓
                    Workspace (/app/workspace)
                              ↓
                    Host ./tmp directory (mounted)

Core Components

  • Containerized MCP Server - TypeScript server using @modelcontextprotocol/sdk with StreamableHTTPServerTransport
  • HTTP API - Network-based communication on port 3000
  • Bearer Token Auth - Secure authentication for all requests
  • Docker Container - Debian-based with Node.js, Playwright, and development tools
  • Workspace Mount - Host ./tmp directory mounted to /app/workspace
  • Process Tracking - Background process management with unique IDs

Key Differences from Traditional MCP Servers

  • No Host Installation: Server runs entirely in container
  • Network Access: HTTP-based instead of stdio transport
  • Authentication Required: Bearer token for all requests
  • Self-Contained: All dependencies bundled in container image
  • Direct Execution: No docker exec overhead

📋 Prerequisites

🚀 Quick Start

1. Clone and Setup

git clone <your-repository-url>
cd docker-mcp

2. Start the Server

# Quick start: reset environment and start server
./reset-docker.sh

# Or manually:
npm run docker:build    # Build container with server code
npm run docker:up       # Start container
npm run docker:logs     # View logs and get auth token

3. Get Connection Info

The server logs display the authentication token and connection details:

npm run docker:logs

Look for output like:

============================================================
Docker MCP Server Starting
============================================================
Port: 3000
Auth Token: abc123-def456-ghi789
============================================================

4. Test Connection

# Test with curl
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
     http://localhost:3000

# View server logs
npm run docker:logs

🔧 Development Commands

Docker Operations

# Build the container image with server code
npm run docker:build

# Start the containerized MCP server
npm run docker:up

# Stop the container
npm run docker:down

# View server logs (includes auth token)
npm run docker:logs

# Rebuild and restart (after code changes)
npm run docker:restart

# Open bash shell in container
npm run docker:shell

# Complete reset (clean workspace and rebuild)
./reset-docker.sh

Local Development

# Build TypeScript (for development/testing only)
npm run build

# Install/update dependencies
npm install

⚙️ MCP Client Configuration

Configuration Format

MCP clients need to connect via HTTP with bearer token authentication:

{
  "url": "http://localhost:3000",
  "headers": {
    "Authorization": "Bearer YOUR_TOKEN_FROM_LOGS"
  }
}

Important:

  • Get the auth token from container logs: npm run docker:logs
  • Token is auto-generated on each container start
  • Token must be included in the Authorization header with Bearer prefix

Claude Desktop Configuration

Add to your Claude Desktop configuration file:

Location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "docker-mcp": {
      "url": "http://localhost:3000",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_FROM_LOGS"
      }
    }
  }
}

Note: Replace YOUR_TOKEN_FROM_LOGS with the actual token from npm run docker:logs

Getting Your Authentication Token

  1. Start the server: npm run docker:up
  2. View logs: npm run docker:logs
  3. Copy the token from the output
  4. Update your client configuration with the token
  5. Restart your MCP client

Verification

After configuration:

  1. Restart your MCP client (e.g., Claude Desktop)
  2. Check that the Docker MCP server shows as connected
  3. Verify access to all available tools

🛠️ Available MCP Tools

🚀 Command Execution

execute_command

Execute shell commands inside the container

Execute any shell command within the container environment with intelligent process tracking.

Parameters:

  • command (string) - The shell command to execute
  • rationale (string) - Explanation of why this command is being executed
  • maxWaitTime (number, optional) - Maximum seconds to wait before returning (default: 20)

Features:

  • Automatic backgrounding for long-running processes
  • Smart timeout based on output activity
  • Process ID returned for monitoring
  • Real-time output capture

check_process

Monitor background processes by ID

Check the status and output of background processes started by execute_command.

Parameters:

  • processId (string) - The process ID returned by a long-running command
  • rationale (string) - Explanation of why you need to check this process

Returns:

  • Process status (running/completed)
  • Current output (stdout/stderr)
  • Exit code (if completed)
  • Runtime duration

send_input

Send input to running background processes

Send input data to interactive processes waiting for user input.

Parameters:

  • processId (string) - The process ID of the running process
  • input (string) - The input to send to the process
  • rationale (string) - Explanation of why you need to send input
  • autoNewline (boolean, optional) - Auto-add newline (default: true)

📁 File Operations

All file operations work within /app/workspace which is mounted from host ./tmp.

file_read

Read files from container filesystem

Read file contents with support for large files through pagination.

Parameters:

  • filePath (string) - Path relative to /app/workspace
  • rationale (string) - Explanation of why you need to read this file
  • offset (number, optional) - Starting line number (default: 0)
  • limit (number, optional) - Maximum lines to read (default: 2000)

file_write

Create or overwrite files

Write content to files with automatic directory creation.

Parameters:

  • filePath (string) - Path relative to /app/workspace
  • content (string) - The content to write
  • rationale (string) - Explanation of why you need to write this file

Important: Use file_read first to understand current state.

file_edit

Perform exact string replacements

Edit files using precise string matching with backup protection.

Parameters:

  • filePath (string) - Path relative to /app/workspace
  • oldString (string) - The exact text to replace
  • newString (string) - The replacement text
  • rationale (string) - Explanation of why you need to edit this file
  • replaceAll (boolean, optional) - Replace all occurrences (default: false)

Important: Use file_read first to get the exact text to match.

file_ls

List directory contents

List files and directories with intelligent filtering.

Parameters:

  • path (string, optional) - Directory path (default: current directory)
  • rationale (string) - Explanation of why you need to list this directory
  • ignore (array, optional) - Glob patterns to ignore

file_grep

Search file contents

Search for patterns in files using grep with regex support.

Parameters:

  • pattern (string) - Search pattern (supports regex)
  • rationale (string) - Explanation of why you need to search
  • path (string, optional) - Directory to search (default: current)
  • include (string, optional) - File pattern filter (e.g., '*.js')
  • caseInsensitive (boolean, optional) - Case insensitive (default: false)
  • maxResults (number, optional) - Result limit (default: 100)

📊 Process Management

Commands run with intelligent timeout handling:

  • Default timeout: 20 seconds of inactivity before backgrounding
  • Maximum timeout: 10 minutes absolute limit
  • Process tracking: Background processes get unique IDs for monitoring
  • Smart waiting: Based on output activity, not fixed intervals

Example Process Flow

// Long-running command gets backgrounded automatically
const result1 = execute_command({
  command: "npm install",
  rationale: "Installing dependencies"
});
// Returns process ID if backgrounded

// Check status later
const result2 = check_process({
  processId: result1.processId,
  rationale: "Checking installation progress"
});

// Send input to interactive processes
send_input({
  processId: result1.processId,
  input: "y",
  rationale: "Confirming prompt"
});

🔒 Security Considerations

Authentication

  • Bearer Token Required: All requests must include valid bearer token
  • Auto-Generated Token: New

FAQ

What is the Docker Container Execution MCP server?
Docker Container Execution is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Docker Container Execution?
This profile displays 34 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.

Use Cases

Code & Document Analysis

Read, analyze, and understand files in your project

Example

Summarize README, analyze code structure, find TODO comments across codebase

Navigate large codebases 5x faster, understand projects quickly

Automated File Operations

Create, move, rename, and organize files based on natural language instructions

Example

Organize downloads by file type, rename files following convention, batch process images

Save hours on manual file organization

Content Search & Extraction

Search files for patterns, extract data, find information across directories

Example

Find all config files with API keys, extract emails from documents, search logs for errors

Find information instantly instead of manual grep/find

File Generation & Templates

Generate boilerplate files, apply templates, create project structures

Example

Create React component with tests and styles, generate OpenAPI spec, scaffold new project

Eliminate repetitive file creation work

Implementation Guide

Prerequisites

  • Claude Desktop or Cursor with MCP support
  • File system permissions for directories you want to access
  • Understanding of file paths and directory structure
  • Backup of important files before bulk operations

Time Estimate

10-20 minutes including configuration

Installation Steps

  1. 1.Install filesystem MCP server (often built-in with Claude Desktop)
  2. 2.Configure allowed directories in MCP config for security
  3. 3.Test read: 'Show me contents of ~/Documents/test.txt'
  4. 4.Test write: 'Create a new file notes.md in current directory'
  5. 5.Test search: 'Find all .js files containing TODO'
  6. 6.Test batch operations: 'Rename all .jpeg files to .jpg'
  7. 7.Verify file permissions and access controls

Troubleshooting

  • Permission denied: Check file/directory permissions, run with appropriate user
  • Path not found: Verify path is absolute or relative to working directory
  • MCP server can't access directory: Add to allowed directories in config
  • File already exists: Use overwrite flag or check before writing
  • Operation failed: Check disk space, file locks, antivirus interference

Best Practices

✓ Do

  • +Configure allowed directories explicitly—don't grant full filesystem access
  • +Back up important files before bulk operations
  • +Use dry-run mode for risky operations when available
  • +Validate file paths before operations
  • +Set appropriate file permissions on created files
  • +Log file operations for audit trail
  • +Test operations on sample files first

✗ Don't

  • Don't grant MCP access to system directories (/etc, /System)
  • Don't allow write access to production config files
  • Don't skip backup before bulk delete/move operations
  • Don't use for sensitive files (passwords, keys) without encryption
  • Don't ignore file permission errors—investigate root cause
  • Don't expose personal documents without considering privacy

💡 Pro Tips

  • Use .gitignore patterns to exclude sensitive files from AI access
  • Create sandboxed working directory for file experiments
  • Combine with version control (git) for easy rollback
  • Use file watching for real-time monitoring and reactions
  • Create templates for common file generation tasks
  • Leverage file metadata (timestamps, size) for smart organization

Technical Details

Architecture

MCP server provides file I/O operations (read, write, search, metadata) as tools Claude can invoke with natural language instructions.

Protocols

  • Local file system API
  • Glob patterns for search
  • File streams for large files

Compatibility

  • macOS
  • Linux
  • Windows
  • Local files only (no remote filesystems by default)

When to Use This

✓ Use When

Use for code analysis, file organization, content search, template generation, and automating repetitive file operations. Best for local development workflows.

✗ Avoid When

Avoid for system-critical files, sensitive credentials, production environments, or when file integrity is paramount. Don't use on files you can't afford to lose.

Integration

  • Combine with git for version-controlled file operations
  • Integrate with code editors for seamless workflow
  • Use with backup tools for safety net
  • Pair with file watchers for automated reactions

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.734 reviews
  • Shikha Mishra· Dec 28, 2024

    Docker Container Execution has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Nikhil Wang· Dec 20, 2024

    Strong directory entry: Docker Container Execution surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Kofi Gupta· Dec 16, 2024

    According to our notes, Docker Container Execution benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Ishan Diallo· Dec 12, 2024

    We wired Docker Container Execution into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Rahul Santra· Nov 19, 2024

    Docker Container Execution reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Nikhil Thompson· Nov 7, 2024

    I recommend Docker Container Execution for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Isabella White· Nov 3, 2024

    Docker Container Execution is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Yuki Chawla· Oct 26, 2024

    We evaluated Docker Container Execution against two servers with overlapping tools; this profile had the clearer scope statement.

  • Kabir Bhatia· Oct 22, 2024

    Docker Container Execution has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Pratham Ware· Oct 10, 2024

    We wired Docker Container Execution into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

showing 1-10 of 34

1 / 4