hypnosis/docker-mcp-server
Docker through compose projects for AI agents: containers, logs, databases, backups and stack control, on this machine or on a remote host over SSH, with destructive operations blocked. Works with Claude Code, Codex, Cursor and any MCP client.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[2.0.1] - 2026-08-24
Fixed
The MCP registry would not take the 2.0.0 listing. server.json described the server in 148
characters where the registry allows 100, so the publish run failed on that step after npm had
already accepted the package. The description is shorter now, and the server goes into the
registry with this release.
Documentation
The README no longer promises a roadmap. The section listed work nobody had committed to,
and it is gone along with its link in the navigation. docs/ROADMAP.md says where the project
actually stands — 2.0.0 released — instead of "in progress", and the leftover RELEASE_1.3.0.md
is removed from the repository root.
[2.0.0] - 2026-08-24
Version 2.0.0 changes how the server talks to an AI agent. Answers arrive as named fields instead of formatted text, twenty tools become ten with actions, and operations that destroy data are refused until the call confirms them.
Breaking
Twenty tool names are gone. Every capability survives, but it is reached through ten tools
with an action parameter. Update your prompts and any code that calls tools by name:
| Before | Now |
|---|---|
docker_container_list | docker_container · list |
docker_container_stats | docker_container · stats |
docker_projects | docker_container · list without project |
docker_container_start | docker_container_control · start |
docker_container_stop | docker_container_control · stop |
docker_container_restart | docker_container_control · restart |
docker_container_logs | docker_logs |
docker_compose_config | docker_compose · config |
docker_env_list | docker_compose · env |
docker_compose_up | docker_compose_control · up |
docker_compose_down | docker_compose_control · down |
docker_db_query | docker_db · query |
docker_db_status | docker_db · status |
docker_db_backup | docker_db_admin · backup |
docker_db_restore | docker_db_admin · restore |
docker_resource_list | docker_resource · images / volumes / networks |
docker_healthcheck | docker_health · services |
docker_mcp_health | docker_health · server |
docker_profile_info | docker_health · profiles |
docker_exec | docker_exec (unchanged) |
Destructive operations are refused by default. Dropping a database, flushing a keyspace,
removing a volume, taking a stack down with volumes: true, or restoring over a live database
now needs the marker # CONFIRMED-DESTRUCTIVE — inside the command for docker_exec, inside
the statement for docker_db, in the confirm field for docker_compose_control and
docker_db_admin. See docs/security.md.
projectsPath in a profile is gone. A remote project is found by the labels its containers
carry, so it can live in any directory of the host — and the profile no longer has to be edited
when it moves. Remove the field: it is ignored. A project that never ran on that host is named
by compose_path in the call.
Added
- Every env file the project declares.
docker_compose·envreads whatenv_filenames in each of its forms, alongside the conventional files of the project directory, and every row carries thefileit is written in. On a remote host the files are read on that host. An empty answer names the files it looked for instead of leaving the emptiness unexplained. - Structured answers. Every tool declares an
outputSchemaand fillsstructuredContent: container states, log lines, database output, dump sizes and disk usage arrive as fields. The text form stays for a person reading a transcript. - A legend in the answer. Words whose meaning decides what happens next —
unhealthy,nullhealth,unused_bytes— are explained next to the fields that used them, and only the values that actually turned up. - An index of the toolset, handed to the client on connect, so a model knows which tool answers which question before it makes a call.
- MCP annotations on every tool, so a client can tell a read from a write without asking.
docker_resource·disk— where the Docker disk went, in four groups, with what nothing uses counted apart from the total.- Honest absence.
reasonsays why an answer came back empty-handed,truncatedandclipped_*name every cut, and an empty list means asked and found nothing. compose_pathon every tool that scopes by project: the compose file, or the directory holding it, for a project the daemon cannot place. A directory holding several compose files is refused with their names rather than guessed through.
Changed
@modelcontextprotocol/sdk0.6.1 → 1.30.0. Structured output is what this upgrade was for.- The server starts without Docker. A call made while the daemon is down answers "start Docker" and works on the next try — no restart of the MCP client.
DOCKER_MCP_PROFILES_FILEis the canonical variable for the profiles file.DOCKER_PROFILES_FILEstill works and logs a line asking you to rename it.- Documentation rewritten: README, docs/tools.md, docs/security.md, docs/architecture.md.
Fixed
projectdid not isolate: a call could reach another project's container of the same service name.- Container output was not demultiplexed, and command exit codes were not read — a failure was indistinguishable from a success.
- Discovery picked the wrong compose file where several were present, and crashed on Windows.
followon logs could hang and accumulate memory.- Commands containing quotes were split apart before they ran.
- The client pool did not notice edits to the profiles file.
docker_db_backupreported success without reading the file it had written.- Redis restore did not work at all and left the container down.
- Profiles supplied through
DOCKER_PROFILESwere listed but unusable. - The SQL guard blocked safe statements and let dangerous ones through.
- A remote project was looked for under one hardcoded directory, so every call that scopes by project failed on a host that keeps its projects elsewhere — only listing containers worked.
- The first call on a remote profile addressed the local daemon: the client was taken before its SSH tunnel came up, and answered 404 for a container living on the other machine.
env_filewas read by nobody. Only.env,.env.<NODE_ENV>and.env.localof the project directory were looked at, so a project keeping its variables in a file it names itself answered that it had none — and database adapters fell back to nothing where the container was down.- Env files of a remote project were looked for on this machine. The directory is the other
host's, so nothing was ever found:
docker_compose·envanswered with an empty list, and adapters lost the credentials written there. They are now read on the host the project lives on, in one connection. - A project name no container carries was answered with an empty list instead of being refused.
docker_container·listreported nothing deployed, anddocker_health·servicescalled a project that is not therehealthy. Both now refuse it and name the projects the host does know.
Security
SSH checks the host key. The tunnel to a remote Docker socket and the commands run over SSH
both connect with StrictHostKeyChecking=accept-new and keep host keys in ~/.ssh/known_hosts
instead of throwing them away. A machine answering with a key other than the remembered one is
refused. A profile can name its own file with knownHostsPath.
[1.4.0] - 2026-01-12
Changed
🏗️ Architecture - Profile-Based Docker Client Pool
-
Bug Fix (BUG-011): Fixed critical SSH client caching bug
- Problem: Two profiles with same
hostbut different SSH keys used ONE cached client - Impact: Wrong SSH key could be used, bypassing strict validation (v1.3.2)
- Solution: Cache Docker clients by profile name instead of host
- Each profile now guaranteed to use its own SSH client and key
- Tunnels properly reused per profile, not per host
- Problem: Two profiles with same
-
Internal Refactoring: Migrated from host-based to profile-based client pool
- Old:
getDockerClient(sshConfig)— cached by host (bug) - New:
getDockerClientForProfile(profileName)— cached by profile name (correct) - Managers now accept
profileNameinstead ofsshConfigin constructors - No breaking changes for MCP tools users — MCP API unchanged
- Old:
Migration Guide
For MCP users: No changes required ✅
For developers (if using managers directly in custom code):
// OLD (v1.3.x):
const sshConfig = resolveSSHConfig({ profile: 'prod' });
const manager = new ContainerManager(sshConfig);
// NEW (v1.4.0):
const manager = new ContainerManager('prod');
Technical Details
Files changed:
src/managers/container-manager.ts— constructor acceptsprofileName?src/managers/compose-manager.ts— constructor acceptsprofileName?src/utils/docker-client.ts— removed old singleton, added profile poolsrc/tools/*-tools.ts— useargs.profiledirectlytests/unit/**/*.test.ts— updated to new API
Bug scenario (fixed):
{
"profiles": {
"prod-admin": { "host": "prod.com", "privateKeyPath": "~/.ssh/admin" },
"prod-readonly": { "host": "prod.com", "privateKeyPath": "~/.ssh/readonly" }
}
}
- Before: Both profiles used same cached client (first key wins) ❌
- After: Each profile has its own client ✅
[1.3.2] - 2026-01-11
Changed
🔒 Security & Reliability - Strict SSH Key Validation
-
SSH Private Key Validation — Strict validation for SSH private keys (fail-fast approach)
- Breaking Change: If
privateKeyPathis specified in profile, the file MUST exist - Previously: Silent fallback to SSH Agent / default keys if key not found (confusing behavior)
- Now: Explicit error with actionable solutions if key file missing
- Benefits:
- ✅ Explicit authentication — you know exactly which key is used
- ✅ Fail-fast — immediate error instead of silent fallback
- ✅ Security — prevents accidental use of wrong SSH keys
- ✅ Debuggability — clear error messages with solutions
- Breaking Change: If
-
SSH Agent Support — Improved support for SSH Agent and default keys
- If
privateKeyPathNOT specified → uses SSH Agent or default keys (~/.ssh/id_rsa, ~/.ssh/id_ed25519) - Clear warning message when using SSH Agent / default keys
- Explicit about authentication method being used
- If
-
Legacy Fallback Mode — Optional fallback via environment variable
- Set
DOCKER_MCP_ALLOW_SSH_FALLBACK=trueto enable legacy behavior (not recommended) - Allows connection when key file missing (uses SSH Agent / default keys as fallback)
- Warning message displayed when fallback is used
- Set
Migration Guide
If your connection breaks after upgrade:
Option 1: Fix the path (Recommended)
{
"privateKeyPath": "~/.ssh/id_ed25519_correct" // Use correct path
}
Option 2: Use SSH Agent
{
"host": "...",
"username": "...",
// Remove privateKeyPath to use SSH Agent / default keys
}
Option 3: Enable legacy fallback (Temporary fix)
export DOCKER_MCP_ALLOW_SSH_FALLBACK=true
[1.3.1] - 2026-01-10
Fixed
🔴 Critical Fix - Container Environment Variables
- BUG-010: Environment Variables from Container — Fixed database adapters reading environment variables from compose file instead of running container
- Added
getContainerEnv()method toContainerManagerto get env vars from Docker API (container.inspect()) - Database adapters now prioritize environment variables from running container over compose file
- Fixes "role postgres does not exist" error when container was started with different compose file
- All database operations (
query,backup,restore,status) now use correct environment variables - Fallback to compose file if container environment unavailable (for backwards compatibility)
- Added
Changed
- Environment Variables Resolution — Improved environment variable loading
PostgreSQLAdapter,RedisAdapter,SQLiteAdapternow get env vars from running container first- More reliable connection parameters when container started with different compose file
- Better handling of test environments with different compose configurations
[1.3.0] - 2026-01-10
Fixed
🔴 Critical Fixes - Remote Docker Support
-
BUG-003: SSH Profiles Application — Fixed incorrect SSH profile application for remote Docker operations
- Centralized profile resolution via
profile-resolver.ts - Removed duplicate
getSSHConfigForProfilemethods from all tools - All tools now correctly use remote SSH connections when profile specified
- Centralized profile resolution via
-
BUG-004: Remote Commands Execution — Fixed remote commands executing on local Docker instead of remote server
- Fixed file-based profile loading from
DOCKER_PROFILES_FILE - Profiles now correctly loaded from
~/.cursor/docker-profiles.json - Priority: file → JSON string → fallback to local
- Fixed file-based profile loading from
-
BUG-005: Profile Info Display — Fixed
docker_profile_infonot showing all profiles from configuration- Corrected profile loading from file system
- All configured profiles now visible in
availableProfiles
-
BUG-006: docker_env_list Remote Mode — Fixed empty results when listing environment variables on remote Docker
- Added
remote-compose.tsutility for reading remote compose files via SSH - Environment variables now correctly parsed from remote
docker-compose.yml - Secret masking works correctly in remote mode
- Added
-
BUG-007: Database Tools Remote Mode — Fixed all database tools (
docker_db_*) not working in remote mode- Added
projectConfigparameter to all database adapter methods - Database adapters now receive project configuration from tools layer
- All database operations (query, status, backup, restore) work in remote mode
- Support for remote compose file reading in database operations
- Added
🟡 Medium Fixes
-
BUG-008: pgvector Detection — Fixed
ankane/pgvector:latestnot being detected as PostgreSQL- Added support for PostgreSQL extensions: pgvector, timescale, postgis, mariadb
- Extended database type detection patterns in
compose-parser.tsandproject-discovery.ts
-
BUG-009: db_status Parsing — Fixed
docker_db_statusreturning dashes instead of real values- Fixed SQL result parsing in
PostgreSQLAdapter.status() - Real values now returned for
size,connections,uptime
- Fixed SQL result parsing in
Added
-
Remote Compose File Reading — New utility
src/utils/remote-compose.ts- Reads
docker-compose.ymlfiles from remote servers via SSH - Supports both local and remote project discovery
- Used by all tools that need compose configuration
- Reads
-
Database Adapter Project Config — Extended database adapter interface
- Optional
projectConfigparameter in all adapter methods - Allows tools to pass pre-resolved project configuration
- Eliminates redundant project discovery calls in adapters
- Optional
-
Enhanced Database Type Detection — Extended PostgreSQL pattern matching
- Support for
pgvector,timescale,postgisimages - MariaDB detection as MySQL-compatible
- Better image pattern matching
- Support for
-
Code Cleanup for Release — Removed debug logging from production code
- Removed all logger calls from
compose-parser.ts(parse, parseFromString, detectServiceType) - Removed debug comments from
index.ts - Cleaner production code without debug noise
- Removed all logger calls from
Changed
-
Profile Resolution Architecture — Centralized profile management
- Single source of truth:
profile-resolver.ts - All tools use unified
resolveSSHConfig()function - Removed code duplication across 4+ tool files
- Single source of truth:
-
Database Tools Architecture — Improved dependency injection
- Database adapters receive project config from tools layer
- Tools handle project discovery once, pass to adapters
- Better separation of concerns
Testing
-
Comprehensive Remote Testing — All 20 tools tested in remote mode
- 100% tool coverage in remote environment
- All critical bugs verified as fixed
- Dangerous operations (start/stop/restart/up/down/restore) tested safely
-
Comprehensive Local Testing — All 20 tools tested in local mode
- 100% tool coverage in local environment
- Parallel testing confirms both modes work identically
Documentation
- Updated MCP_BUGS.md — Complete bug fix documentation
- All 9 bugs documented with fix details
- Testing results and verification included
- Ready for reference
[1.2.1] - 2026-01-09
Added
-
Comprehensive Testing System — Complete E2E testing framework
- 32 E2E tests covering all 20 MCP commands
- Isolated test categories for fast debugging (9 categories)
- Test environment with docker-compose.test.yml (web, postgres, redis)
- Pre-commit script for automated testing before commits
- Manual testing checklist for AI assistants
- Testing documentation unified in
docs/testing/
-
Auto-detection of working_dir — Executor tool improvements
docker_execnow automatically detectsworking_dirfrom docker-compose.yml- No need to specify
workdirif configured in compose file - Backward compatible (explicit
workdirstill works)
Fixed
-
docker_container_list — Fixed REST API behavior
- Without
projectparameter: now shows ALL containers with Compose labels (grouped by project) - With
projectparameter: shows containers for specific project only - Previously always auto-detected project from current directory, causing empty results
- Without
-
package-lock.json — Synchronized version (1.2.1) and name (@hypnosis/docker-mcp-server)
Changed
-
docker_discover_projects → docker_projects — Renamed for clarity
- Works for both local and remote Docker
- Uses Docker Compose labels for fast discovery (~2s)
- Shows project status (running/partial/stopped)
-
docker_project_status — Removed
- Functionality replaced by
docker_container_list({project: "name"}) - Reduces API surface, follows REST principles
- Functionality replaced by
-
Testing Documentation — Unified and organized
- All testing docs moved to
docs/testing/ - Single entry point:
docs/testing/README.md - Deprecated docs moved to
docs/testing/deprecated/ - Archive moved to
docs/testing/archive/
- All testing docs moved to
Improved
-
REST API Approach — Simplified and more intuitive
docker_projects()→ list all projectsdocker_container_list()→ list all containers (grouped by project)docker_container_list({project: "x"})→ list containers for project x- Clearer semantics, better UX
-
Project Structure — Cleaned up root directory
- Removed temporary test-*.js scripts
- Organized documentation structure
- Updated .gitignore to prevent future clutter
[1.2.0] - 2026-01-09
Added
-
Profile Parameter — Parallel access to LOCAL and REMOTE Docker environments
- Optional
profileparameter in all commands for specifying target environment - Default behavior: LOCAL Docker (when profile not specified)
- Support for
"local"profile inprofiles.jsonfor explicit local mode - Docker client pool for efficient connection management
- Lazy SSH tunnel creation (only when accessing remote profiles)
- Parallel usage: work with both LOCAL and REMOTE in the same session
- Optional
-
Profile-based Client Pool — Efficient Docker client management
getDockerClientForProfile(profile?: string)— Get client for specific profile- Automatic caching of Docker clients per profile
- Graceful cleanup of all clients on shutdown
- Support for multiple concurrent connections
Changed
-
All Commands — Now support optional
profileparameter- Container commands:
docker_container_list,docker_container_start/stop/restart,docker_container_logs,docker_container_stats,docker_compose_up/down,docker_resource_list - Database commands:
docker_db_query,docker_db_backup,docker_db_restore,docker_db_status - Executor:
docker_exec - Environment commands:
docker_env_list,docker_compose_config,docker_healthcheck - Discovery commands:
docker_discover_projects,docker_project_status
- Container commands:
-
Profiles Format — Extended to support local mode
- Added
mode: "local" | "remote"field in profile configuration hostandusernameare now optional (required only for remote profiles)- Example:
{"local": {"mode": "local"}}for local Docker
- Added
Improved
- User Experience — No need to restart MCP server to switch between environments
- Quick switching between local testing and remote deployment
- Parallel comparison of environments in single session
- Better workflow for development → staging → production
[1.1.0] - 2026-01-09
Added
-
Remote Docker Support — Full SSH-based remote Docker management
- SSH tunnel creation and management for remote Docker connections
- Multiple server profiles support via
profiles.jsonfile - Automatic retry logic with exponential backoff (3 attempts, 30s timeout)
- Healthcheck for SSH tunnel with automatic reconnection
- Secure credential management (SSH keys, passwords)
-
Remote Project Discovery — Automatic discovery of Docker projects on remote servers
docker_discover_projects— Fast discovery of all projects using Docker labels (~2s)docker_project_status— Detailed status for specific project with compose config (~3s)- Automatic project status detection (running, partial, stopped)
- Issues detection (restarting, unhealthy, exited containers)
- REST API-like approach: fast list + detailed status
-
Project Parameter — Explicit project specification for all commands
- All commands now support optional
projectparameter - Works seamlessly with both local and remote Docker
- Backward compatible (auto-detect for local projects)
- All commands now support optional
-
SSH File Access — Read docker-compose.yml files via SSH
execSSH()— Execute commands on remote server via SSHreadRemoteFile()— Read files from remote serverfindRemoteFiles()— Find files on remote server
-
Profile Management — Multiple server configuration
docker_profile_list— List all available SSH profilesdocker_profile_switch— Switch between server profiles- Support for
projectsPathin profile configuration - Default profile selection
Changed
-
Command Count — Increased from 18 to 23 commands
- Added 2 discovery commands (
docker_discover_projects,docker_project_status) - Added 2 profile commands (
docker_profile_list,docker_profile_switch) - Added 1 health command (
docker_mcp_health)
- Added 2 discovery commands (
-
Performance Optimization — Remote Discovery improvements
- Fast mode always enabled for
discoverProjects()(Docker labels only, ~2s) - Full mode for
getProjectStatus()(reads compose for specific project, ~3s) - Optimized batch
docker inspectvia SSH (single command instead of multiple) - Fixed Node.js process hanging issue (unref for healthcheck interval)
- Fast mode always enabled for
-
Docker Client — Enhanced with SSH support
- SSH tunnel creation and management
- Automatic tunnel healthcheck
- Cleanup on shutdown
- Retry logic for network operations
Fixed
-
Process Hanging — Fixed Node.js process hanging after SSH tunnel creation
- Added
unref()for healthcheck interval to allow process exit - Proper cleanup of SSH processes and timers
- Added
-
Remote Container Status — Fixed incorrect status detection for remote containers
- Corrected Docker API connection to use SSH tunnel
- Fixed container matching with services via Docker labels
Documentation
- Added
docs/REMOTE_DOCKER.md— Complete guide for remote Docker setup - Added
docs/REMOTE_DISCOVERY.md— Remote project discovery documentation - Added
TEST_COMPARISON.md— Comparative analysis of MCP vs SSH commands - Updated
docs/API_REFERENCE.md— Added new discovery and profile commands - Updated
docs/sprints/SPRINT_5_REMOTE_DOCKER.md— Sprint completion details
Testing
- Added 46 new tests for remote Docker functionality
- Unit tests for DockerClient with SSH (21 tests)
- Unit tests for ProfileTool (13 tests)
- Integration tests for remote Docker (12 tests)
- All 178 tests passing
- Comparative testing: MCP vs SSH (MCP scores 29/30 vs SSH 13/30)
[1.0.4] - 2026-01-02
Added
- Resource Monitoring — New commands for monitoring Docker resources
docker_container_stats— Get real-time container resource usage (CPU, Memory, Network, Block I/O)docker_resource_list— Universal command to list Docker images, volumes, or networks- Provides comprehensive metrics for container performance monitoring
- Supports filtering by resource type (images, volumes, networks)
Changed
- Command Count — Increased from 16 to 18 commands
- Optimized command structure to stay within Cursor MCP limits
- Used universal
docker_resource_listinstead of 3 separate commands
[1.0.3] - 2026-01-02
Changed
-
Dynamic Version Detection — Server version now automatically reads from
package.json- Version in logs and MCP server info now matches package.json version
- No need to manually update version in code
-
Improved Error Messages — Enhanced error messages for better user experience
- Added helpful suggestions when docker-compose.yml is not found
- Lists supported compose file names
- Provides actionable guidance
Fixed
- Server Version — MCP server now reports correct version from package.json instead of hardcoded value
[1.0.2] - 2026-01-02
Fixed
-
Workspace Root Detection — MCP server now correctly finds
docker-compose.ymlin workspace directory- Added workspace root detection via MCP
roots/listprotocol - Fixed
docker-compose.ymldiscovery to use workspace root from MCP client instead ofprocess.cwd() - Improved error messages to indicate workspace root source
- Added workspace root detection via MCP
-
Port Conflict Detection — Automatic detection and helpful error messages for port conflicts
- Added
port-utils.tswith functions to find containers by port - Enhanced error handling in
compose-manager.tsto detect port conflicts - Error messages now show which container is using the conflicting port
- Improved error message extraction from docker-compose stderr/stdout
- Added
-
Command Routing — Fixed
docker_compose_configcommand routing- Fixed bug where
docker_compose_configwas incorrectly routed tocontainerToolsinstead ofenvTools - Changed routing order to check
envToolsbeforedocker_compose_prefix check - All 16 commands now work correctly
- Fixed bug where
Added
-
Workspace Manager (
src/utils/workspace.ts) — Centralized workspace root management- Stores workspace root obtained from MCP client via
listRoots() - Provides fallback to
process.cwd()if workspace root not available - Used by
ProjectDiscoveryfor automatic compose file detection
- Stores workspace root obtained from MCP client via
-
Port Utilities (
src/utils/port-utils.ts) — Utilities for port conflict detectionfindContainerByPort()— Find container using specific portextractPortFromError()— Extract port number from Docker error messagesstopContainerById()— Helper to stop conflicting containers
Changed
-
Error Handling — Improved error messages throughout
- Better error message extraction from docker-compose commands (includes stderr/stdout)
- Port conflict errors now include container name, ID, and status
- Suggestions for resolving port conflicts
-
Project Discovery — Enhanced to use workspace root
- Uses MCP workspace root when available
- Falls back to
process.cwd()if workspace root not available - Improved error messages to indicate workspace root source
Testing
- Complete stress testing of all 16 commands
- Tested workspace root detection with Cursor
- Tested port conflict detection with real conflicts
- Tested error handling when Docker Desktop is not running
- All commands tested and verified working (100% coverage)
1.0.0 - 2026-01-02
Added
Core Features
- 16 MCP Commands for Docker container management
- Container Management (7):
docker_container_list,docker_container_start,docker_container_stop,docker_container_restart,docker_container_logs,docker_compose_up,docker_compose_down - Database Operations (4):
docker_db_query,docker_db_backup,docker_db_restore,docker_db_status - Environment & Config (3):
docker_env_list,docker_compose_config,docker_healthcheck - Universal Executor (1):
docker_exec - MCP Health (1):
docker_mcp_health
- Container Management (7):
CLI Interface
- Command-Line Interface (
docker-mcp-server-cli) for direct command execution- All MCP commands available via CLI
- Direct execution outside of MCP clients
- Same three-level fallback strategy for container discovery
Container Discovery
- Three-Level Fallback Strategy for reliable container discovery
- Docker Compose Labels (Priority) - Direct Docker API call using
com.docker.compose.projectlabel - docker-compose ps CLI (Fallback 1) - For older docker-compose versions
- Name-based filter (Fallback 2) - Filter by project name in container names
- Docker Compose Labels (Priority) - Direct Docker API call using
Project Discovery
- Automatic discovery of
docker-compose.ymlfiles - Multi-compose file support with intelligent merging
- Parent directory traversal for compose files
- Project structure detection and caching
- Service identification from compose configuration
Database Adapters
- PostgreSQL Adapter — Full support for PostgreSQL databases
- Query execution via
psql - Database backups via
pg_dump - Database restoration via
pg_restore - Status checking
- Query execution via
- Redis Adapter — Full support for Redis databases
- Command execution via
redis-cli - Backup and restore operations
- Command execution via
- SQLite Adapter — Full support for SQLite databases
- Query execution
- Database dump and restore
- Extensible Adapter Pattern — Easy to add new database types
Security Features
- Automatic secrets masking in environment variables
- Configurable secret keywords (
PASSWORD,TOKEN,KEY,SECRET,API_KEY) - Optional SQL validation to prevent dangerous operations
- Safe command execution via containers
Managers Layer
- Container Manager — Docker container operations
- Compose Manager — docker-compose operations
- Environment Manager — Environment variable management with secrets masking
Utilities
- Dockerode client wrapper
- Structured logging system
- Project discovery caching
- Compose exec helper
Features
- Type-Safe — Written in TypeScript with full type definitions
- Follow Logs — Real-time log streaming with
followmode - Auto-Discovery — Works with any Docker project automatically
- Multi-Compose Support — Handles multiple compose files intelligently
- Environment File Support — Reads
.env,.env.local, etc. - Health Checks — Container health status monitoring
- Comprehensive Error Handling — Clear error messages and diagnostics
Documentation
- Complete API reference for all 16 commands
- CLI interface documentation
- Container discovery strategy documentation
- Quick start guide for users
- Developer documentation with architecture details
- Real-world usage examples
- Troubleshooting guide
- FAQ section
- Database adapter creation guide
Testing
- Unit tests for core components
- Integration tests for Docker operations
- End-to-end tests for MCP protocol compliance
- Test coverage reporting
Technical Details
- Node.js >= 18.0.0 required
- TypeScript with strict mode
- MCP SDK for protocol implementation
- Dockerode for Docker API integration
- Vitest for testing
Future Releases
Planned for v1.2.0
- Additional database adapters (MySQL, MongoDB)
- Enhanced error messages
- Performance optimizations (caching for discovery)
Planned for v2.0.0
- Docker Swarm support
- Kubernetes support
- Web UI for monitoring
Note: This is the initial stable release (1.0.0). All features listed above are production-ready and tested.