@edjl/docker-mcp
v1.0.8
Published
Docker tools for MCP (Model Context Protocol)
Maintainers
Readme
Docker MCP
A Model Context Protocol (MCP) server providing Docker tools for AI assistants.
Features
10 Docker tools with the docker_ prefix:
Container Operations
docker_ps- List containers with filtering and formatting optionsdocker_run- Run containers with full configuration optionsdocker_stop- Stop running containersdocker_remove- Remove containersdocker_logs- View container logsdocker_exec- Execute commands in running containers
Image Operations
docker_images- List Docker imagesdocker_pull- Pull images from registrydocker_build- Build images from Dockerfile
Compose Operations
docker_compose_up- Start Docker Compose services
Installation
- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build
Usage with Cursor
Add to your ~/.cursor/mcp.json:
{
"mcpServers": {
"docker-mcp": {
"command": "node",
"args": [
"/path/to/docker-mcp/build/index.js"
]
}
}
}Development
npm run dev- Watch mode for developmentnpm run build- Build the projectnpm start- Run the server
Tool Usage Examples
# List all containers
docker_ps(all: true)
# Run a container
docker_run(image: "nginx", name: "web", ports: ["8080:80"])
# View logs
docker_logs(container: "web", tail: 50)
# Execute command
docker_exec(container: "web", command: "ls -la")