MCP.so
Sign In
Servers

Portainer MCP Server

@BirajMainali

A Model Context Protocol (MCP) server implementation for Portainer, enabling AI assistants to interact with Docker containers and services through Portainer's API.

Overview

What is Portainer MCP Server?

Portainer MCP Server is a Model Context Protocol (MCP) server that enables AI assistants to interact with Docker containers and services through the Portainer API. It is intended for developers and operators who manage Docker environments via Portainer and want to automate or assist those tasks using AI.

How to use Portainer MCP Server?

Installation requires Deno and a running Portainer instance with API access. After cloning the repository, set the environment variables PORTAINER_URL, PORTAINER_API_KEY, and PORTAINER_ENV_ID. The server can be run with deno run or compiled into an executable. In an MCP client (e.g., Claude Desktop), configure the tool to use the compiled executable and pass the appropriate arguments.

Key features of Portainer MCP Server

  • Docker container management (create, start, delete, fetch logs)
  • Docker image management (fetch, delete unused, clear build cache)
  • Docker network operations (inspect, fetch)
  • Docker service management (fetch, logs)
  • Resource limit management for containers

Use cases of Portainer MCP Server

  • Automate container creation and cleanup via natural language commands
  • Inspect Docker networks and service logs without manual API calls
  • Clear unused images and build cache to free disk space
  • Update container resource limits on the fly

FAQ from Portainer MCP Server

What dependencies are required to run Portainer MCP Server?

The server requires Deno, a running Portainer instance with API access, and Docker installed and running on the host.

How do I configure Portainer MCP Server?

Set the environment variables PORTAINER_URL (Portainer instance URL), PORTAINER_API_KEY (API key), and PORTAINER_ENV_ID (environment ID). These are read at startup.

What Docker operations can be performed via Portainer MCP Server?

The server provides tools for listing, creating, starting, and deleting containers; fetching container logs; updating container resource limits; listing and deleting unused images; clearing the image build cache; fetching networks and inspecting a specific network; and listing services and fetching service logs.

How does authentication work with Portainer MCP Server?

Authentication is handled via a Portainer API key provided in the PORTAINER_API_KEY environment variable. No additional transport or OAuth is used.

Does the server work with any Portainer environment?

It works with a single environment specified by PORTAINER_ENV_ID. The user must provide the correct environment ID for their Portainer setup.

Tags

More from Other