Skip to main content
Glama

mcp-server-docker

Docker MCP 服务器

Docker MCP 服务器是一个模型上下文协议 (MCP)服务器,可与 Windows 上的 Docker Desktop 无缝集成,为开发人员和工具提供高级自动化和交互功能。

先决条件

  1. 从 Docker 官方下载页面安装适用于 Windows 的 Docker Desktop。
  2. 在 Docker Desktop 中,转到**“设置”>“常规”** ,然后选中
    “在没有 TLS 的情况下在 tcp://localhost:2375 上公开守护进程”
    这是 MCP 服务器与 Docker Desktop 通信所必需的。

    💡**提示:**您可以通过打开
    在浏览器中访问http://localhost:2375/version 。如果设置正确,
    您应该会看到一个包含 Docker 版本信息的 JSON 响应。如果您遇到问题,请查看此讨论以了解可能的解决方案: WSL 和 Docker for Windows:无法连接到 Docker 守护进程

安装

与 Claude Desktop 一起使用

{ "mcpServers": { "docker-mcp-stdio": { "command": "docker", "args": [ "run", "-i", "--rm", "freezeolo/docker-mcp-server" ] } } }

工具

已完成🛠️进行中计划

容器生命周期管理✅

  • list_containers - 获取容器列表✅
  • get_container_info - 获取特定容器的详细信息✅
    • container_id :容器 ID(字符串,必需)
  • start_container - 启动容器✅
    • container_id :容器 ID(字符串,必需)
  • restart_container - 重新启动容器✅
    • container_id :容器 ID(字符串,必需)
  • stop_container - 停止容器✅
    • container_id :容器 ID(字符串,必需)
  • remove_container - 删除容器✅
    • container_id :容器 ID(字符串,必需)
  • **create_container-**创建一个新容器✅
    • imageName :图像名称(字符串,必需)
    • containerName :容器名称(字符串,必需)
    • command :要运行的命令(字符串,可选)
    • env :环境变量(string[],可选)
    • ports :端口绑定(字符串[],可选)
    • volumes :卷绑定(字符串[],可选)
    • network :网络名称(字符串,可选)
    • restartPolicy :重启策略(字符串,可选)

网络管理✅

  • **list_networks-**列出所有网络✅
  • **get_network_info-**获取网络信息✅
    • networkId :网络 ID(字符串,必需)
  • **create_network-**创建一个新的网络✅
    • networkName :网络名称(字符串,必需)
    • driver :网络驱动程序(字符串,必需)
    • subnet :子网 CIDR(字符串,必需)
    • gateway :网关 IP(字符串,必需)
  • connect_container_to_network - 将容器连接到网络✅
    • containerId :容器 ID(字符串,必需)
    • networkId :网络 ID(字符串,必需)
  • disconnect_container_from_network - 断开容器与网络的连接✅
    • containerId :容器 ID(字符串,必需)
    • networkId :网络 ID(字符串,必需)
  • **remove_network-**删除网络✅
    • networkId :网络 ID(字符串,必需)
  • get_network_containers - 获取网络中的容器✅
    • networkId :网络 ID(字符串,必需)

图像管理✅

  • **list_images-**列出所有图像✅
  • pull_image - 从注册表中提取图像✅
    • imageName :带标签的图像名称(字符串,必需)
  • push_image - 将镜像推送到注册表✅
    • imageName :带标签的图像名称(字符串,必需)
  • **remove_image-**删除图像✅
    • imageId :图像 ID(字符串,必需)
    • force :强制删除(布尔值,可选)
  • tag_image - 使用多个标签标记图像✅
    • imageId :图像 ID(字符串,必需)
    • repository :存储库名称(字符串,必需)
    • tags :标签数组(string[],必需)
  • build_image - 从 Dockerfile 构建镜像✅
    • dockerfilePath :Dockerfile 的路径(字符串,必需)
    • repository :存储库名称(字符串,必需)
    • tags :标签数组(string[],必需)
  • **get_image_details-**获取图像详细信息✅
    • imageId :图像 ID(字符串,必需)

日志管理✅

  • get_container_logs - 获取容器日志✅
    • containerId :容器 ID(字符串,必需)
    • follow :关注日志输出(布尔值,可选,默认值:false)
    • stdout :显示标准输出(布尔值,可选,默认值:true)
    • stderr :显示 stderr(布尔值,可选,默认值:true)
    • since :显示自时间戳以来的日志(字符串,可选)
    • until :显示日志直到时间戳(字符串,可选)
    • tail :从末尾显示的行数(整数,可选)
    • timestamps :显示时间戳(布尔值,可选,默认值:false)

常问问题

问:如何安装该项目?

答:请按照安装部分的步骤操作。请确保您已安装所需的依赖项。

执照

本项目遵循 MIT 开源许可证。请参阅MIT了解完整条款。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

mcp-服务器-docker

  1. 先决条件
    1. 安装
      1. 与 Claude Desktop 一起使用
    2. 工具
      1. 容器生命周期管理✅
      2. 网络管理✅
      3. 图像管理✅
      4. 日志管理✅
    3. 常问问题
      1. 问:如何安装该项目?
    4. 执照

      Related MCP Servers

      • A
        security
        A
        license
        A
        quality
        A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.
        Last updated -
        4
        354
        Python
        MIT License
        • Apple
      • -
        security
        A
        license
        -
        quality
        An MCP server that allows managing Docker containers through natural language, enabling users to compose, introspect, and debug containers without running commands themselves.
        Last updated -
        549
        Python
        GPL 3.0
        • Apple
      • -
        security
        A
        license
        -
        quality
        Azure MCP Server
        Last updated -
        1,032
        MIT License
        • Linux
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/nideil/mcp-server-docker'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server