🚀 MCP Gateway Automation
📖 Introduction
If you're using Claude Desktop or Claude Code CLI with MCP (Model Context Protocol) tools, you know that running Docker on every machine can be resource-intensive and complex to manage. This guide presents a game-changing solution: centralize your MCP Gateway on a single Mini PC and access it from all your devices without needing Docker installed on each one.
This setup transforms a low-power Mini PC into a dedicated MCP server that automatically starts on boot, manages all your Docker containers, and provides MCP tools to your entire network. Your main workstation, laptop, or even tablet can connect via a simple SSH tunnel, keeping them lean while still having full access to all MCP capabilities.
Perfect for: Developers who want to reduce resource usage on their main machine, teams sharing MCP tools, home lab enthusiasts, or anyone tired of managing Docker on multiple devices. This guide provides complete PowerShell scripts and step-by-step instructions for Windows 11, making the entire setup automatic and maintenance-free.
🎯 Why This Setup?
💡 Centralized MCP Server
Run Docker MCP Gateway once on your Mini PC, access it from ANY device on your network. No need to install Docker on every machine!
⚡ Resource Efficiency
Let your Mini PC handle the Docker containers and MCP tools. Your main workstation stays lean and focused on development.
🔧 Single Point of Management
Update MCP tools, manage Docker containers, and configure services in one place. Changes instantly available to all clients.
👥 Multi-Client Support
Multiple developers can connect to the same MCP Gateway. Perfect for teams or when switching between laptop and desktop.
🖥️ Cross-Platform Access
Access from Windows, Mac, or Linux machines. Even lightweight devices like tablets can use Claude with full MCP capabilities.
🚀 Always Available
Mini PC runs 24/7 with low power consumption. MCP tools are always ready, no waiting for Docker Desktop to start.
📊 Centralized vs Local Setup Comparison:
Aspect | Local Docker (Traditional) | Centralized MCP Server (This Setup) |
---|---|---|
Docker Required | Every machine | Mini PC only |
Resource Usage | High on each machine | Minimal on clients |
Maintenance | Update each machine | Update Mini PC only |
Setup Complexity | Configure each machine | One-time server setup |
Team Sharing | Each person configures own | Instant access for all |
📚 Real-World Use Cases:
- Development Team: Share MCP tools across the team without everyone needing Docker
- Home Lab: Mini PC serves as your AI tools server for all devices
- Resource-Limited Laptops: Offload heavy Docker operations to the Mini PC
- Consistent Environment: Same MCP tools and versions across all your devices
- Remote Work: SSH tunnel can work over VPN for remote access to your home MCP server
System Architecture
[Mini PC - 192.168.0.18] [Tower PC] +-------------------------+ +-------------------------+ | | | | | Docker MCP Gateway | | Claude Desktop | | Port: 8080 <===========>| Claude Code CLI | | | SSH Tunnel| ↓ | | Auto-starts on login | Port 8080 | Supergateway | | | | (Protocol Bridge) | +-------------------------+ +-------------------------+ | | | | Runs MCP Gateway Translates stdio ←→ HTTP as Windows service for Claude communication
- Claude Desktop/CLI sends stdio commands
- Supergateway translates stdio to HTTP requests
- Requests go through SSH tunnel to localhost:8080
- Mini PC's Docker MCP Gateway processes the requests
- Responses flow back through the same path in reverse
- One Server, Many Clients: Mini PC runs MCP Gateway for your entire network
- No Docker on Clients: Other machines only need Claude and an SSH connection
- Auto-Everything: Gateway and tunnels start automatically on boot
- Resource Efficient: Offload Docker operations to dedicated server
- Team Ready: Multiple users can connect to the same MCP Gateway
Mini PC Setup (192.168.0.18)
-
The username
reg
in the SSH command should be replaced with your actual Mini PC username if different -
The IP
192.168.0.18
should match your Mini PC's static IP address -
If you change the Mini PC's IP, update it in the
mcp-ssh-tunnel.ps1
script
Prerequisites
- Windows 11
- Docker Desktop installed and configured to start on login
- Docker MCP Gateway plugin installed
- Static IP address (192.168.0.18 or your chosen IP)
⚠️ Critical: Static IP Required!
Why Static IP is Essential:
-
The SSH tunnel is hardcoded to connect to
192.168.0.18
- If your Mini PC gets a different IP from DHCP, the tunnel will fail
- All client machines need a consistent IP to connect to
How to Set Static IP on Windows 11:
- Open Settings → Network & Internet → Ethernet (or Wi-Fi)
- Click on your network connection
- Click "Edit" next to IP assignment
- Change from "Automatic (DHCP)" to "Manual"
-
Turn on IPv4 and enter:
-
IP address:
192.168.0.18
(or another unused IP) - Subnet mask:
255.255.255.0
-
Gateway:
192.168.0.1
(your router's IP) -
Preferred DNS:
8.8.8.8
(or your preferred DNS)
-
IP address:
- Click "Save"
Alternative - Router DHCP Reservation:
Configure your router to always assign the same IP to your Mini
PC's MAC address. This way it still uses DHCP but always gets
the same IP.
This script creates a scheduled task that automatically starts the Docker MCP Gateway after Docker Desktop is ready.
What it does:
- Removes any existing MCP Gateway task
- Creates a hidden scheduled task that runs at login
- Waits 1 minute for Docker Desktop to fully start
- Runs Docker MCP Gateway on port 8080
- Verifies the service is running
Script Content:
# Delete old task Unregister-ScheduledTask -TaskName "MCP Gateway" -Confirm:$false -ErrorAction SilentlyContinue # Create task that runs HIDDEN $action = New-ScheduledTaskAction ` -Execute "cmd.exe" ` -Argument "/c docker mcp gateway run --port 8080 --transport streaming" $trigger = New-ScheduledTaskTrigger -AtLogon -User $env:USERNAME $trigger.Delay = "PT1M" $principal = New-ScheduledTaskPrincipal ` -UserId "$env:USERDOMAIN\$env:USERNAME" ` -LogonType S4U ` -RunLevel Highest $settings = New-ScheduledTaskSettingsSet ` -AllowStartIfOnBatteries ` -DontStopIfGoingOnBatteries ` -StartWhenAvailable ` -ExecutionTimeLimit ([TimeSpan]::Zero) ` -Hidden Register-ScheduledTask ` -TaskName "MCP Gateway" ` -Action $action ` -Trigger $trigger ` -Principal $principal ` -Settings $settings ` -Force Write-Host "Task created (runs hidden)" -ForegroundColor Green # Test it Start-ScheduledTask -TaskName "MCP Gateway" Start-Sleep -Seconds 10 # Verify it's running if (netstat -an | Select-String ":8080.*LISTENING") { Write-Host "MCP Gateway is running on port 8080!" -ForegroundColor Green } else { Write-Host "Port 8080 not listening" -ForegroundColor Red }
Installation Steps
Save mcp-gateway-task.ps1
anywhere on your Mini
PC (e.g., C:\Scripts\
)
Right-click PowerShell → Run as Administrator
You should see: "MCP Gateway is running on port 8080!"
The MCP Gateway will now automatically start every time you log into Windows.
Tower PC Setup
Prerequisites
- Windows 11
- SSH client (built into Windows 11)
- Node.js and npm installed
-
Supergateway npm package (
npm install -g supergateway
) - Claude Desktop and/or Claude Code CLI installed
🔌 What is Supergateway?
The Essential Protocol Bridge:
- The Problem: Claude expects MCP servers to communicate via stdio (standard input/output), but Docker MCP Gateway provides an HTTP streaming endpoint
- The Solution: Supergateway acts as a translator between these two protocols
- How it works:
Claude Desktop/CLI ↓ [stdio protocol] ↓ Supergateway ← "Translates stdio to HTTP and back" ↓ [HTTP streaming] ↓ localhost:8080 (SSH tunnel) ↓ Mini PC's Docker MCP Gateway
Without supergateway, Claude cannot communicate with HTTP-based MCP servers. It's the essential bridge that makes this entire setup possible!
Creates an SSH tunnel to forward localhost:8080 to the Mini PC's MCP Gateway.
What it does:
- Creates a scheduled task for automatic SSH tunnel creation
- Runs minimized in the background
- Forwards port 8080 from Mini PC to your Tower PC
- Auto-reconnects if the connection drops
Script Content:
# Fixed version - just check port, don't read response Unregister-ScheduledTask -TaskName "MCP SSH Tunnel" -Confirm:$false -ErrorAction SilentlyContinue $action = New-ScheduledTaskAction ` -Execute "cmd.exe" ` -Argument "/c start /min powershell -WindowStyle Hidden -Command ssh -N -L 8080:localhost:8080 [email protected]" $trigger = New-ScheduledTaskTrigger -AtLogon -User $env:USERNAME $settings = New-ScheduledTaskSettingsSet ` -AllowStartIfOnBatteries ` -DontStopIfGoingOnBatteries ` -StartWhenAvailable Register-ScheduledTask ` -TaskName "MCP SSH Tunnel" ` -Action $action ` -Trigger $trigger ` -Settings $settings ` -Force Write-Host "SSH Tunnel task created" -ForegroundColor Green # Start it now Start-ScheduledTask -TaskName "MCP SSH Tunnel" # Just check if port is listening Start-Sleep -Seconds 5 if (netstat -an | Select-String ":8080.*LISTENING") { Write-Host "SUCCESS: SSH Tunnel is active on port 8080!" -ForegroundColor Green Write-Host "MCP Gateway is ready for Claude Desktop" -ForegroundColor Green } else { Write-Host "Port 8080 not listening" -ForegroundColor Red } Write-Host "Setup complete!" -ForegroundColor Cyan
Configures Claude Code CLI to use the MCP Gateway globally for all projects.
What it does:
- Creates a JSON configuration for the MCP server
- Specifies supergateway as the command (protocol translator)
- Points supergateway to the HTTP endpoint at localhost:8080
- Sets output to stdio format that Claude understands
- Adds it globally using Claude CLI's mcp add-json command
-
"command": "npx"
- Runs supergateway via npx -
"args": ["supergateway", ...]
- The protocol bridge tool -
"--streamableHttp"
- Tells supergateway to connect via HTTP -
"http://localhost:8080/mcp"
- The tunneled MCP Gateway endpoint -
"--outputTransport", "stdio"
- Output in Claude's expected format
Script Content:
# Create the JSON configuration $config = @' { "type": "stdio", "command": "npx", "args": ["supergateway", "--streamableHttp", "http://localhost:8080/mcp", "--outputTransport", "stdio"] } '@ # Add it globally claude mcp add-json --scope user docker-gateway $config
Installation Steps
This allows passwordless SSH connections.
You should see: "SSH Tunnel is active on port 8080!"
Edit %APPDATA%\Claude\claude_desktop_config.json
:
{ "mcpServers": { "docker-gateway": { "command": "npx", "args": ["supergateway", "--streamableHttp", "http://localhost:8080/mcp", "--outputTransport", "stdio"] } } }
Claude Desktop and Claude Code CLI can now access all Docker MCP tools!
🔍 Verification & Testing
Mini PC Status
Should show LISTENING on port 8080
SSH Tunnel Status
Tower PC should also show port 8080
Claude Code CLI Test
Type /mcp
- should show docker-gateway connected
Claude Desktop Test
Look for MCP indicator in the bottom-right of the chat input
Extending to Other Machines
Once your Mini PC is running the MCP Gateway, ANY machine on your local network can connect to it. No Docker needed on client machines!
Adding a New Client Machine
- Claude Desktop and/or Claude Code CLI
- Node.js and npm (for supergateway)
- SSH client (for secure connection)
No Docker required!
Run the same mcp-ssh-tunnel.ps1
script on any new
machine, just update the IP if needed
Run claude-mcp-add-global.ps1
to configure Claude
Code CLI
Network Topology Examples
Scenario 1: Home Office Setup ================================ Mini PC (192.168.0.18) └── MCP Gateway :8080 │ ├── Desktop PC (via SSH tunnel) ├── Laptop (via SSH tunnel) ├── Work Laptop (via VPN + SSH) └── iPad with Terminal (via SSH) Scenario 2: Small Team Setup ================================ Office Server (10.0.1.5) └── MCP Gateway :8080 │ ├── Developer 1 Workstation ├── Developer 2 Workstation ├── Designer's Mac (for AI tools) └── Remote Developer (via VPN) Scenario 3: Hybrid Setup ================================ Mini PC (Always On) └── MCP Gateway :8080 │ ├── Gaming PC (High-end, but no Docker) ├── MacBook (Different OS, same tools) └── Thin Client (Low resources)
- No need for Docker Desktop licenses on every machine
- Lower resource usage on client machines
- One Mini PC can serve 10+ clients easily
- Reduced maintenance and updates
🔧 Troubleshooting
SSH tunnel not connecting:
-
Verify Mini PC has static IP: Check if it's
still
192.168.0.18
- Test connection:
ping 192.168.0.18
-
If IP changed, update it in
mcp-ssh-tunnel.ps1
script - Test SSH manually:
ssh [email protected]
- Check Windows Firewall settings on both machines
Port 8080 not listening on Mini PC:
- Check if Docker Desktop is running
-
Manually test:
docker mcp gateway run --port 8080 --transport streaming
- Check Task Scheduler for errors
Claude not seeing MCP tools:
- Restart Claude Desktop/CLI after configuration
- Verify config files are properly formatted JSON
- Check:
claude mcp list
Mini PC IP keeps changing:
- Set a static IP address (see Mini PC Prerequisites)
- Or configure DHCP reservation in your router
- Update all client scripts if you choose a different IP
Check scheduled tasks:
- System Boot: Both PCs start and users log in
- Mini PC: Docker Desktop starts → MCP Gateway task waits 1 minute → Starts gateway on port 8080
- Tower PC: SSH Tunnel task starts → Creates tunnel to Mini PC → Port 8080 forwarded
- Claude Apps: Connect to localhost:8080 → Access all Docker MCP tools
- Result: Seamless access to MCP tools without manual intervention!