mcp_docker
Verified Safeby williajm
Overview
Manages Docker containers, images, networks, and volumes for AI assistants via the Model Context Protocol (MCP).
Installation
uv run python -m mcp_dockerEnvironment Variables
- DOCKER_BASE_URL
- SAFETY_ALLOW_DESTRUCTIVE_OPERATIONS
- SECURITY_OAUTH_ENABLED
- SECURITY_OAUTH_ISSUER (required if SECURITY_OAUTH_ENABLED=true)
- SECURITY_OAUTH_JWKS_URL (required if SECURITY_OAUTH_ENABLED=true)
Security Notes
The server implements a multi-layered security approach: comprehensive input validation, blocking of dangerous shell commands (e.g., `rm -rf /`, fork bombs, `curl | bash`), environment variable injection protection, sensitive mount path blocking, and error message sanitization to prevent information disclosure. It supports OAuth/OIDC authentication with JWKS caching and introspection, IP filtering (with X-Forwarded-For support), and both pre- and post-authentication rate limiting. Audit logging is robust, structured, and includes automatic redaction of sensitive fields in both arguments and results. The `generate_compose` prompt explicitly redacts environment variable values to prevent credential leakage to LLMs. Strict safety tiers (SAFE, MODERATE, DESTRUCTIVE) with configurable overrides and fine-grained tool/resource filtering are implemented. Continuous fuzzing is integrated to proactively identify vulnerabilities. Explicit warnings are logged for insecure configurations (e.g., HTTP transport on non-localhost, exposed Docker sockets). The primary remaining risk noted in `SECURITY.md` is Retrieval Agent Deception (RADE) where malicious container logs, returned verbatim, could potentially manipulate AI agents, recommending user-side filtering.
Similar Servers
toolhive-studio
ToolHive is a desktop application (Electron UI) for discovering, deploying, and managing Model Context Protocol (MCP) servers in isolated containers, and connecting them to AI agents and clients.
mcp-compose
This server provides a robust example of OAuth2 authentication for MCP (Model Context Protocol) servers, using GitHub as the identity provider. It demonstrates secure multi-server management, protocol translation, and integration with AI agents for tool invocation.
openapi-mcp-server
Converts OpenAPI specifications into Model Context Protocol (MCP) tools, enabling AI assistants to interact with APIs.
docker-mcp-server
A Model Context Protocol (MCP) server for containerized execution and file operations, enabling AI assistants to interact with a Docker environment via HTTP.