Skip to main content
Glama
ofershap
by ofershap

mcp-server-docker

npm version npm downloads CI TypeScript License: MIT Agent Plugins

AIコーディングアシスタントからDockerコンテナ、イメージ、サービスを操作できます。コンテナの一覧表示、起動、停止、ログの取得、コンテナ内でのコマンド実行、リソース使用量の確認が可能です。

npx mcp-docker-server

Claude Desktop、Cursor、VS Code Copilot、およびMCP互換の任意のクライアントと互換性があります。APIキーは不要で、ローカルのDockerソケットに自動的に接続します。

Dockerコンテナ、ログ、リソース監視のためのMCPサーバー

デモは remotion-readme-kit で作成

なぜ

毎日Dockerを使っているなら、その流れをご存じでしょう。ターミナルに切り替えて docker ps と入力し、ログをスクロールし、コンテナIDをコピーし、サービスを再起動する。これが積み重なっていきます。このMCPサーバーを使えば、AIアシスタントがそれらのタスクを処理してくれるので、コードに集中できます。どのコンテナが実行されているかを確認したり、障害が起きているサービスのログを取得したり、スタックしたものを再起動したりと、依頼するだけでOKです。ローカルソケット経由でDockerのAPIと通信するため、設定は不要で、認証情報の管理もありません。

Related MCP server: Docker Manager MCP

ツール

ツール

説明

list_containers

実行中(またはすべて)のコンテナを、ステータス、ポート、イメージ情報とともに一覧表示します

container_logs

コンテナの最近のログを取得します

start_container

停止中のコンテナを起動します

stop_container

実行中のコンテナを停止します

restart_container

コンテナを再起動します

remove_container

コンテナを削除します(オプションで強制削除)

exec_command

実行中のコンテナ内でコマンドを実行します

container_stats

CPU、メモリ、ネットワークのライブ統計を取得します

list_images

ホスト上のすべてのDockerイメージを一覧表示します

remove_image

Dockerイメージを削除します

クイックスタート

Cursor

.cursor/mcp.json に追加:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "mcp-docker-server"]
    }
  }
}

Claude Desktop

claude_desktop_config.json に追加:

{
  "mcpServers": {
    "docker": {
      "command": "npx",
      "args": ["-y", "mcp-docker-server"]
    }
  }
}

VS Code

ユーザー設定または .vscode/mcp.json に追加:

{
  "mcp": {
    "servers": {
      "docker": {
        "command": "npx",
        "args": ["-y", "mcp-docker-server"]
      }
    }
  }
}

  • 実行中のすべてのDockerコンテナを一覧表示する

  • nginxコンテナのログを表示する

  • api-serverコンテナを再起動する

  • postgresコンテナのCPUとメモリ使用量は?

  • webコンテナ内で ls -la /app を実行する

  • すべてのDockerイメージとそのサイズを一覧表示する

  • 古いイメージを使用しているすべてのコンテナを停止する

前提条件

  • お使いのマシンで Docker が実行されている必要があります

  • サーバーは /var/run/docker.sock(Linux/macOS)またはWindowsの名前付きパイプのDockerソケットに接続します

  • APIキーやトークンは不要です

Agent Plugins

このリポジトリは Agent Plugins 1.0.0 パッケージです。plugin.json、ポータブルな mcp.jsonskills/ はMCPサーバーと一緒に配布されます。

Cursorの場合は、リポジトリをクローンして ~/.cursor/plugins/local/mcp-server-docker にコピーまたはシンボリックリンクを作成し、ウィンドウをリロードしてください。スキルとMCPは Customize > Plugins に表示されます。

上記のCursorおよびVS Codeのインストールボタンは引き続き機能します。手動のJSONと同じ npx -y mcp-docker-server stdioサーバーを追加します。

よくある質問

mcp-docker-serverとは何ですか?

このMCPサーバーのnpmパッケージです(リポジトリ名は mcp-server-docker)。ローカルのDockerソケットと通信して、コンテナの一覧表示、ログの追跡、コマンドの実行、イメージの管理を行います。

Docker Desktopを実行している必要がありますか?

はい。デーモンが起動している必要があり、MCPプロセスが docker.sock(またはWindowsの名前付きパイプ)に到達できる必要があります。

本番コンテナにとって安全ですか?

停止・削除・再起動は破壊的と見なしてください。本番ワークロードを変更する前にユーザーに確認してください。

CursorでAgent Pluginとしてインストールできますか?

はい。~/.cursor/plugins/local/mcp-server-docker を使用すると、同梱の docker-management スキルがMCP設定とともに読み込まれます。

APIキーは必要ですか?

いいえ。ローカルのDockerアクセスのみです。

開発

git clone https://github.com/ofershap/mcp-server-docker.git
cd mcp-server-docker
npm install
npm test
npm run build

関連項目

その他のMCPサーバーや開発者ツールは、私の ポートフォリオ にあります。

著者

ofershap による

LinkedIn GitHub


README は README Builder で作成されました

ライセンス

MIT © 2026 Ofer Shapira

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Docker containers, deploy stacks, and monitor services across multiple Docker hosts from one centralized location. Supports container lifecycle management, Docker Compose operations, and infrastructure orchestration through natural language commands.
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Docker containers, images, networks, volumes, and Compose services through the Model Context Protocol. It supports system operations, command execution within containers, and integration with Docker Hub and GitHub Container Registry.
    135
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Build, validate, and deploy multi-agent AI solutions from any AI environment.

  • Create and manage AI agents that collaborate and solve problems through natural language interacti…

View all MCP Connectors

Latest Blog Posts

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/ofershap/mcp-server-docker'

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