Provides tools for searching, analyzing, and interacting with Docker images, containers, and registries, including security scanning, image size optimization, docker-compose generation, and container runtime analysis.
Supports analysis of MySQL container images and can generate docker-compose configurations that include database services.
Provides tools for analyzing NGINX Docker images and generating docker-compose configurations for NGINX deployments.
🐳 Docker Explorer MCP Server
📋 Overview
Docker Explorer is a powerful Model Context Protocol (MCP) server that provides tools and resources for interacting with Docker images, containers, and registries. This server enables AI assistants like Claude to search for, analyze, and interact with Docker resources through a standardized interface, making container management and exploration more accessible.
✨ Features
Core Features
Search for Docker images across registries
Search for specific tags of Docker images
Search for Docker Hub users/organizations
Get detailed metadata about Docker images
Analyze Dockerfile content
Compare Docker images
Advanced Tools
🔒 Security Scanner: Analyze Docker images for known vulnerabilities and security issues
📦 Image Size Optimizer: Get recommendations for reducing Docker image size
📄 Docker Compose Generator: Generate docker-compose.yml files for your applications
📊 Container Runtime Analyzer: Get insights about container runtime behavior and resource usage
🔍 Image Comparison Tool: Compare two Docker images and highlight their differences
📜 Dockerfile Generator: Create Dockerfiles from natural language application descriptions
🚀 Installation
Prerequisites
Python 3.10 or higher
Required Python packages:
requests
,pydantic
Setup
Clone this repository:
Create a virtual environment:
Install dependencies:
Or install individual packages:
💻 Usage
Running the Server
You can run the server directly from the command line:
This will start the MCP server on the default port (5000).
Integrating with Claude Desktop
To use the Docker Explorer MCP server with Claude Desktop:
Update the Claude Desktop configuration:
Open or create the
claude_desktop_config.json
file in your Claude Desktop configuration directoryAdd the Docker Explorer server configuration
Restart Claude Desktop to load the new configuration
Using the Tools
Once integrated with Claude Desktop, you can use the Docker Explorer tools by asking Claude questions like:
Core Tools
Search for Docker images:
Get image details:
Find available tags:
Advanced Tools
Security Scanner:
Image Size Optimizer:
Docker Compose Generator:
Container Runtime Analyzer:
👷 Development
Project Structure
Adding New Features
To add a new tool to the Docker Explorer MCP server:
Implement the tool function in
docker_explorer.py
using the MCP tool decorator:
Follow these best practices for tool implementation:
Keep output concise and formatted for Claude Desktop
Handle exceptions gracefully
Provide clear parameter descriptions
Return well-structured results
Testing
Manual Testing:
Run the server:
python docker_explorer.py
Test with Claude Desktop by asking relevant questions
Debugging:
Check terminal output for any errors
Verify tool responses in Claude Desktop
Adjust output formatting if Claude has capacity constraints
📚 API Documentation
Core Tools
search_images
Description: Search for Docker images across registries
Parameters:
query
(string): Search query for Docker imageslimit
(integer, default=10): Maximum number of results to return
Returns: List of Docker images with metadata
search_tags
Description: Search for specific tags of a Docker image
Parameters:
image_name
(string): Name of the Docker imagetag_pattern
(string, default=""): Pattern to match tags againstlimit
(integer, default=25): Maximum number of results to return
Returns: List of matching tags
get_image_details
Description: Get detailed information about a Docker image
Parameters:
image_name
(string): Name of the Docker imagetag
(string, default="latest"): Tag of the Docker image
Returns: Detailed image information
Advanced Tools
scan_security
Description: Analyze Docker images for known vulnerabilities and security issues
Parameters:
image_name
(string): Name of the Docker imagetag
(string, default="latest"): Tag of the Docker image to scan
Returns: Security analysis report with recommendations
optimize_image_size
Description: Analyze a Docker image and suggest ways to reduce its size
Parameters:
repository_url
(string): Full URL to a Docker Hub repositorytag
(string, default="latest"): Tag of the Docker image to analyze
Returns: Size optimization recommendations
generate_docker_compose
Description: Generate a docker-compose.yml file based on an image
Parameters:
repository_url
(string): Full URL to a Docker Hub repositorytag
(string, default="latest"): Tag of the Docker imageport_mapping
(string, default=""): Optional port mapping (e.g., '8080:80')environment_variables
(string, default=""): Optional environment variablesinclude_db
(boolean, default=false): Whether to include a database service
Returns: Generated docker-compose.yml content
analyze_runtime
Description: Analyze how a container might behave at runtime
Parameters:
image_name
(string): Name of the Docker imagetag
(string, default="latest"): Tag of the Docker imageapp_type
(string, default="web"): Application type (web, database, cache, api, batch)
Returns: Runtime analysis with resource usage predictions and recommendations
compare_images
Description: Compare two Docker images and highlight the differences
Parameters:
image1
(string): First Docker image to compare (e.g., 'nginx:1.21' or 'user/repo:tag')image2
(string): Second Docker image to compare (e.g., 'nginx:1.22' or 'user/repo:tag')
Returns: Detailed comparison report highlighting differences in size, layers, configuration, and compatibility
generate_dockerfile
Description: Generate a Dockerfile based on application requirements described in natural language
Parameters:
app_description
(string): Description of the application to containerize (e.g., 'Python Flask web app with Redis')app_type
(string, default="web"): Application type (web, api, database, worker, static)base_image
(string, default=""): Optional base image to use (e.g., 'python:3.9-alpine')include_comments
(boolean, default=true): Whether to include explanatory comments in the Dockerfile
Returns: Generated Dockerfile with usage instructions
🔒 Security Considerations
The Docker Explorer MCP server is designed for educational and development purposes. When using it:
Do not expose sensitive credentials or API keys
Be cautious when generating and running Docker Compose files
Always review security recommendations before implementation
📌 License
MIT
👥 Contributing
Contributions are welcome! Please feel free to submit a Pull Request with new tools or improvements to existing functionality.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that provides tools for interacting with Docker images, containers, and registries, enabling AI assistants to search, analyze, and manage Docker resources through a standardized interface.
Related MCP Servers
- AsecurityAlicenseAqualityA powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.Last updated -4390MIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables Docker container management through natural language interactions using a custom GPT interface.Last updated -12
- -securityAlicense-qualityA Model Context Protocol server that enables AI applications to interact with Dropbox, providing tools for file operations, metadata retrieval, searching, and account management through Dropbox's API.Last updated -4MIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -331