Skip to content

An MCP server to control Docker, along with Docker Manager. 一个使用Docker Manager控制Docker的MCP服务器

Notifications You must be signed in to change notification settings

DullJZ/docker-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
pull_image.mp4
Execute Command
execute.mp4

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 Name Function
pull_image Pull a specified image
list_images List all images
create_container Create a container
run_container_by_compose Run a container using a compose file
fetch_container_logs Fetch container logs
stop_container Stop a container
start_container Start a container
restart_container Restart a container
remove_container Remove a container
fetch_container_info Fetch container information
create_exec_session Create an interactive shell session
execute_command_in_session Execute a command in a session
close_exec_session Close an interactive shell session
get_more_session_output Get more session output
wait_for_seconds Wait for a specified number of seconds
create_network Create a Docker network
delete_network Delete a Docker network
list_networks List all Docker networks
network_info Get network information
connect_network Connect a container to a network
disconnect_network Disconnect a container from a network

About

An MCP server to control Docker, along with Docker Manager. 一个使用Docker Manager控制Docker的MCP服务器

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published