docker-mcp

DullJZ/docker-mcp

3.2

If you are the rightful owner of docker-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Docker-MCP is an MCP server built on Docker Manager, providing management capabilities for Docker containers.

Tools
21
Resources
0
Prompts
0

Docker-MCP

English |

Docker-MCP is an MCP server based on Docker Manager, built using the FastMCP framework on top of Docker Manager's API, providing management capabilities for Docker containers.

Video

Pull Image

https://github.com/user-attachments/assets/7549daee-c7c7-49af-a327-e9b952f22ed6

Execute Command

https://github.com/user-attachments/assets/d81150aa-b060-4cb5-8b0b-9ff383279514

Getting Started

It is recommended to use the uv tool to manage dependencies:

pip install uv
source venv/bin/activate
uv run install

Modify the Docker Manager API address and authentication token in docker.py.

base_url = 'YOUR_DOCKER_MANAGER_BASE_URL'
token = 'YOUR_DOCKER_MANAGER_API_TOKEN'

Then run:

bash start.sh

Tool List

Tool NameFunction
pull_imagePull a specified image
list_imagesList all images
create_containerCreate a container
run_container_by_composeRun a container using a compose file
fetch_container_logsFetch container logs
stop_containerStop a container
start_containerStart a container
restart_containerRestart a container
remove_containerRemove a container
fetch_container_infoFetch container information
create_exec_sessionCreate an interactive shell session
execute_command_in_sessionExecute a command in a session
close_exec_sessionClose an interactive shell session
get_more_session_outputGet more session output
wait_for_secondsWait for a specified number of seconds
create_networkCreate a Docker network
delete_networkDelete a Docker network
list_networksList all Docker networks
network_infoGet network information
connect_networkConnect a container to a network
disconnect_networkDisconnect a container from a network