mcp_docker
Verified Safeby williajm
Overview
Manages Docker containers, images, networks, and volumes via an AI-accessible API with robust safety and security controls.
Installation
uv run python -m mcp_docker --transport stdioEnvironment Variables
- DOCKER_BASE_URL
- DOCKER_TIMEOUT
- DOCKER_TLS_VERIFY
- DOCKER_TLS_CA_CERT
- DOCKER_TLS_CLIENT_CERT
- DOCKER_TLS_CLIENT_KEY
- SAFETY_ALLOW_MODERATE_OPERATIONS
- SAFETY_ALLOW_DESTRUCTIVE_OPERATIONS
- SAFETY_ALLOW_PRIVILEGED_CONTAINERS
- SAFETY_MAX_LOG_LINES
- SAFETY_MAX_EXEC_OUTPUT_BYTES
- SAFETY_MAX_LIST_RESULTS
- SAFETY_ALLOWED_TOOLS
- SAFETY_DENIED_TOOLS
- SAFETY_ALLOWED_PROMPTS
- SAFETY_ALLOWED_RESOURCES
- SAFETY_YOLO_MODE
- SAFETY_VOLUME_MOUNT_BLOCKLIST
- SAFETY_VOLUME_MOUNT_ALLOWLIST
- SECURITY_RATE_LIMIT_ENABLED
- SECURITY_RATE_LIMIT_RPM
- SECURITY_RATE_LIMIT_CONCURRENT
- SECURITY_AUDIT_LOG_ENABLED
- SECURITY_AUDIT_LOG_FILE
- SECURITY_ALLOWED_CLIENT_IPS
- SECURITY_TRUSTED_PROXIES
- SECURITY_OAUTH_ENABLED
- SECURITY_OAUTH_ISSUER
- SECURITY_OAUTH_AUDIENCE
- SECURITY_OAUTH_JWKS_URL
- SECURITY_OAUTH_REQUIRED_SCOPES
- SECURITY_OAUTH_INTROSPECTION_URL
- SECURITY_OAUTH_CLIENT_ID
- SECURITY_OAUTH_CLIENT_SECRET
- SECURITY_OAUTH_CLOCK_SKEW_SECONDS
- MCP_SERVER_NAME
- MCP_SERVER_VERSION
- MCP_LOG_LEVEL
- MCP_JSON_LOGGING
- MCP_DEBUG_MODE
Security Notes
The server implements a comprehensive multi-layered security framework including OAuth/OIDC authentication, IP filtering, rate limiting, audit logging (with sensitive data redaction), error sanitization, and a three-tier safety system for Docker operations (SAFE/MODERATE/DESTRUCTIVE). It includes validations for dangerous commands and volume mount paths, and automatically redacts secrets in LLM prompts. Continuous fuzzing is also utilized. However, there is a critical disconnect regarding TLS/HTTPS for the HTTP transport. While `MCP_TLS_ENABLED` configuration variables are defined, the server's HTTP transport (`uvicorn` via `FastMCP.run`) does *not* directly utilize these to provide HTTPS. The server explicitly runs on plain HTTP, with documentation recommending deployment behind a reverse proxy for TLS termination. This implementation gap means the server itself does not enforce HTTPS for HTTP connections, potentially exposing traffic in plaintext if not deployed correctly behind a proxy. This contradicts the listed `MCP_TLS_ENABLED` configuration. Additionally, container logs are returned unsanitized, posing a Retrieval Agent Deception (RADE) risk where malicious container output could be used to manipulate AI agents; users are explicitly warned to implement client-side filtering.
Similar Servers
mcp-k8s-go
An MCP server enabling AI assistants and users to interact with and manage Kubernetes clusters by listing, getting, applying, and executing commands on Kubernetes resources.
toolhive-studio
ToolHive simplifies and secures the discovery, deployment, and management of Model Context Protocol (MCP) servers, enabling connections to AI agents and clients.
docker-mcp-server
Provides a containerized Model Context Protocol (MCP) server for AI agents to securely execute shell commands and perform file operations via HTTP with bearer token authentication, supporting aggregation of child MCP servers.
openapi-mcp-server
Dynamically converts OpenAPI specifications into Model Context Protocol (MCP) tools, enabling AI assistants to interact with defined APIs by mapping AI calls to HTTP requests.