mcp-remote-docker
Manages Docker containers and services on a remote host via SSH, including listing, starting, stopping, restarting, removing, running, building images, and orchestrating deployments with Docker Compose.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-remote-dockerList all running containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-remote-docker
An MCP (Model Context Protocol) server that bridges your local development environment with a remote Docker host over SSH. Manage containers, stream logs, transfer files, and orchestrate deployments — all from your AI-powered IDE.
Features
Docker Management — List, start, stop, restart, remove, run, and inspect containers remotely
Docker Compose — Run any
docker composesubcommand on the remote serverImage Builds — Build Docker images on the remote server
Log Fetching — Tail container or compose logs with filtering by time range
File Transfer — Sync files to the remote server via
rsync(falls back toscp)Remote Execution — Run arbitrary shell commands on the remote server
Deploy Orchestration — One-command pipeline: sync files → build → restart → fetch logs
Related MCP server: Docker/Hetzner MCP Server
Prerequisites
Node.js >= 18
SSH access to your remote Docker host (key-based auth recommended)
Docker installed on the remote server
rsync on both local and remote machines (optional, falls back to
scp)
Installation
git clone https://github.com/luisf371/Docker-mcp-server.git
cd Docker-mcp-server
npm installConfiguration
All configuration is via environment variables:
Variable | Default | Description |
|
| SSH connection string |
|
| SSH port |
| (none) | Path to SSH private key |
|
| Default remote working directory |
|
| SSH connection timeout (seconds) |
|
| Default number of log lines to tail |
MCP Configuration
VS Code (Copilot)
Add to your .vscode/mcp.json or VS Code settings.json:
{
"mcpServers": {
"remote-docker": {
"command": "node",
"args": ["/path/to/Docker-mcp-server/dist/index.js"],
"env": {
"SSH_HOST": "deploy@192.168.1.100",
"REMOTE_PATH": "/home/deploy/myapp"
}
}
}
}Claude Code
Add to your Claude Code MCP settings:
{
"mcpServers": {
"remote-docker": {
"command": "node",
"args": ["/path/to/Docker-mcp-server/dist/index.js"],
"env": {
"SSH_HOST": "deploy@192.168.1.100",
"REMOTE_PATH": "/home/deploy/myapp"
}
}
}
}Using npx (without cloning)
{
"mcpServers": {
"remote-docker": {
"command": "npx",
"args": ["-y", "mcp-remote-docker"],
"env": {
"SSH_HOST": "deploy@192.168.1.100",
"REMOTE_PATH": "/home/deploy/myapp"
}
}
}
}Available Tools
Docker Management
Tool | Description |
| List containers (optionally include stopped) |
| Start a container |
| Stop a container |
| Restart a container |
| Remove a container |
| Run a new container with ports, volumes, env vars |
| Build a Docker image |
| Run any docker compose subcommand |
| Inspect a container's details |
Logging
Tool | Description |
| Fetch logs from a specific container |
| Fetch logs from docker compose services |
File Transfer
Tool | Description |
| Sync local files to remote server (rsync/scp) |
Remote Execution
Tool | Description |
| Execute any command on the remote server |
Deploy
Tool | Description |
| Full pipeline: sync → build → restart → logs |
Example Usage
Once configured, you can use natural language in your AI assistant:
"List all running containers on the remote server"
"Show me the last 200 lines of logs from the web container"
"Deploy my local ./src folder to the remote server and restart"
"Run docker compose up -d on the remote server"
"Sync my project files excluding node_modules and .git"
Security Notes
SSH keys should have minimal required permissions
Consider using a dedicated deploy user with limited sudo access
The
remote_exectool can run arbitrary commands — restrict access as neededNever commit SSH keys or credentials to the repository
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luisf371/Docker-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server