docker_mcp
1
Docker MCP Server is designed to execute code securely in isolated Docker containers, facilitating interaction with language models such as Claude. The server supports multiple programming languages and robust error handling, making it ideal for complex script execution and package management.
Docker MCP Server
A powerful Model Context Protocol (MCP) server that executes code in isolated Docker containers and returns the results to language models like Claude.
Features
- Isolated Code Execution: Run code in Docker containers separated from your main system
- Multi-language Support: Execute code in any language with a Docker image
- Complex Script Support: Run both simple commands and complete multi-line scripts
- Package Management: Install dependencies using pip, npm, apt-get, or apk
- Container Management: Create, list, and clean up Docker containers easily
- Robust Error Handling: Graceful timeout management and fallback mechanisms
- Colorful Output: Clear, color-coded console feedback
Requirements
- Python 3.9+
- Docker installed and running
- fastmcp library
Usage
Running the MCP Inspector
To test and explore the server's functionality, the MCP Inspector interface will open in your browser at http://localhost:5173.
Package Manager Support
The server automatically detects and uses the appropriate package manager for various types of containers.
Security Considerations
- Don't expose this server publicly without additional security measures
- Be careful when mounting host volumes into containers
- Consider resource limits for containers to prevent DoS attacks