Skip to main content

Model Context Protocol (MCP) server for container runtimes (Podman and Docker)

Project description

Podman MCP Server

GitHub License npm PyPI - Version GitHub release (latest SemVer) Build

✨ Features | 🚀 Getting Started | 🎥 Demos | ⚙️ Configuration | 🛠️ Tools | 🧑‍💻 Development

✨ Features

A powerful and flexible MCP server for container runtimes supporting Podman and Docker.

🚀 Getting Started

Claude Desktop

Using npx

If you have npm installed, this is the fastest way to get started with podman-mcp-server on Claude Desktop.

Open your claude_desktop_config.json and add the mcp server to the list of mcpServers:

{
  "mcpServers": {
    "podman": {
      "command": "npx",
      "args": [
        "-y",
        "podman-mcp-server@latest"
      ]
    }
  }
}

VS Code / VS Code Insiders

Install the Podman MCP server extension in VS Code Insiders by pressing the following link:

Install in VS Code Install in VS Code Insiders

Alternatively, you can install the extension manually by running the following command:

# For VS Code
code --add-mcp '{"name":"podman","command":"npx","args":["podman-mcp-server@latest"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"podman","command":"npx","args":["podman-mcp-server@latest"]}'

Goose CLI

Goose CLI is the easiest (and cheapest) way to get rolling with artificial intelligence (AI) agents.

Using npm

If you have npm installed, this is the fastest way to get started with podman-mcp-server.

Open your goose config.yaml and add the mcp server to the list of mcpServers:

extensions:
  podman:
    command: npx
    args:
      - -y
      - podman-mcp-server@latest

🎥 Demos

⚙️ Configuration

The Podman MCP server can be configured using command line (CLI) arguments.

You can run the CLI executable either by using npx or by downloading the latest release binary.

# Run the Podman MCP server using npx (in case you have npm installed)
npx podman-mcp-server@latest --help
# Run the Podman MCP server using the latest release binary
./podman-mcp-server --help

Configuration Options

Option Description
--port, -p Starts the MCP server in HTTP mode with Streamable HTTP at /mcp and SSE at /sse endpoints.
--output-format, -o Output format for list commands: text (default, human-readable table) or json.
--podman-impl Podman implementation to use. Auto-detects if not specified.
--sse-port Deprecated. Use --port instead. Starts the MCP server in SSE-only mode.
--sse-base-url Deprecated. SSE public base URL to use when sending the endpoint message.

Transport Modes

The server supports multiple transport modes:

  1. STDIO mode (default) - Communicates via standard input/output
  2. HTTP mode (--port) - Modern HTTP transport with both Streamable HTTP and SSE endpoints
  3. SSE-only mode (--sse-port) - Legacy Server-Sent Events transport (deprecated)
# Start HTTP server on port 8080 (Streamable HTTP at /mcp and SSE at /sse)
podman-mcp-server --port 8080

# Legacy SSE-only server on port 8080 (deprecated, use --port instead)
podman-mcp-server --sse-port 8080

Podman Implementations

The server supports multiple Podman backend implementations:

Implementation Description Priority
api Podman REST API via Unix socket 100 (preferred)
cli Podman/Docker CLI wrapper 50 (fallback)

By default, the server auto-detects the best available implementation. The api implementation is preferred when a Podman socket is available, otherwise the cli implementation is used as a fallback.

Use the --podman-impl flag to force a specific implementation:

# Force CLI implementation
podman-mcp-server --podman-impl=cli

# Force API implementation (requires Podman socket)
podman-mcp-server --podman-impl=api

The api implementation communicates directly with the Podman REST API via Unix socket, while the cli implementation shells out to the podman or docker binary.

🛠️ Tools

Container
  • container_inspect - Displays the low-level information and configuration of a Docker or Podman container with the specified container ID or name

    • name (string) (required) - Docker or Podman container ID or name to display the information
  • container_list - Prints out information about the running Docker or Podman containers

  • container_logs - Displays the logs of a Docker or Podman container with the specified container ID or name

    • name (string) (required) - Docker or Podman container ID or name to display the logs
  • container_remove - Removes a Docker or Podman container with the specified container ID or name (rm)

    • name (string) (required) - Docker or Podman container ID or name to remove
  • container_run - Runs a Docker or Podman container with the specified image name

    • environment (array) - Environment variables to set in the container. Format: =. Example: FOO=bar. (Optional, add only to set environment variables)
    • imageName (string) (required) - Docker or Podman container image name to run
    • ports (array) - Port mappings to expose on the host. Format: :. Example: 8080:80. (Optional, add only to expose ports)
  • container_stop - Stops a Docker or Podman running container with the specified container ID or name

    • name (string) (required) - Docker or Podman container ID or name to stop
Image
  • image_build - Build a Docker or Podman image from a Dockerfile, Podmanfile, or Containerfile

    • containerFile (string) (required) - The absolute path to the Dockerfile, Podmanfile, or Containerfile to build the image from
    • imageName (string) - Specifies the name which is assigned to the resulting image if the build process completes successfully (--tag, -t)
  • image_list - List the Docker or Podman images on the local machine

  • image_pull - Copies (pulls) a Docker or Podman container image from a registry onto the local machine storage

    • imageName (string) (required) - Docker or Podman container image name to pull
  • image_push - Pushes a Docker or Podman container image, manifest list or image index from local machine storage to a registry

    • imageName (string) (required) - Docker or Podman container image name to push
  • image_remove - Removes a Docker or Podman image from the local machine storage

    • imageName (string) (required) - Docker or Podman container image name to remove
Network
  • network_list - List all the available Docker or Podman networks
Volume
  • volume_list - List all the available Docker or Podman volumes

🧑‍💻 Development

Running with mcp-inspector

Compile the project and run the Podman MCP server with mcp-inspector to inspect the MCP server.

# Compile the project
make build
# Run the Podman MCP server with mcp-inspector
npx @modelcontextprotocol/inspector@latest $(pwd)/podman-mcp-server

mcp-name: io.github.manusa/podman-mcp-server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

podman_mcp_server-0.0.15.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

podman_mcp_server-0.0.15-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file podman_mcp_server-0.0.15.tar.gz.

File metadata

  • Download URL: podman_mcp_server-0.0.15.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for podman_mcp_server-0.0.15.tar.gz
Algorithm Hash digest
SHA256 05525990c6e9985d85db412472e557d5364705cf4335047967bb7c777fa4dffb
MD5 4695e6842029f4f786d6e49c7fc07f03
BLAKE2b-256 147e973389d2daf14fba3a362a2eb4e99bd0685780338f985153f33436da983e

See more details on using hashes here.

File details

Details for the file podman_mcp_server-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: podman_mcp_server-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for podman_mcp_server-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec68f432e2da141c48e574b1279d2ae1ffa7bbdadc57c842e9fabe1b9b46507
MD5 5e88d13b27893ef231800013e1e6cc19
BLAKE2b-256 ab32b2544309460707338a82279080b852291b680048b565a7063a13cd2eb267

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page