Portainer

v1.0.0โ€ขCloud Servicesโ€ขstable

๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - A powerful MCP server that enables AI assistants to seamlessly interact with Portainer instances, providing natural language access to container management, deployment operations, and infrastructure monitoring capabilities.

portainer-mcpmcpai-integration
Share:
157
Stars
0
Downloads
0
Weekly
0/5

What is Portainer?

Portainer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - a powerful mcp server that enables ai assistants to seamlessly interact with portainer instances, providing natural language access to container management, deployment operations, and infr...

๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - A powerful MCP server that enables AI assistants to seamlessly interact with Portainer instances, providing natural language access to container management, deployment operations, and infrastructure monitoring capabilities.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • ๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - A powerful MCP server that enables AI assistants t

Use Cases

๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - A powerful MCP server that enables AI assistants to seamlessly interac
portainer

Maintainer

Licensezlib License
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx portainer-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Portainer

Portainer MCP is the official MCP server from Portainer that exposes the full Portainer REST API as natural-language-accessible tools, enabling AI assistants to list and inspect environments, manage Docker containers and stacks, configure GitOps deployments, troubleshoot Kubernetes workloads, and proxy requests directly to underlying Docker and Kubernetes APIs. It supports both single-user local setups (via stdio with uvx) and team deployments with shared TLS-secured HTTP endpoints.

Prerequisites

  • A running Portainer instance (Community Edition or Business Edition) accessible over HTTPS
  • A Portainer API key โ€” generate one in your Portainer user settings under 'Access Tokens'
  • uv package manager installed (the server is distributed as a Python package via uvx)
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Optional: Set PORTAINER_TLS_VERIFY=0 if your Portainer instance uses a self-signed certificate
1

Generate a Portainer API key

Log in to your Portainer instance, navigate to your user profile, and create a new access token. Copy the token โ€” it will only be shown once.

2

Register the MCP server with Claude Code (quickest method)

Use the claude mcp add command to register portainer-mcp with your API key and URL. The uvx command auto-downloads and runs the server without a separate install step.

claude mcp add portainer \
  -e PORTAINER_URL=https://portainer.example.com \
  -e PORTAINER_API_KEY=ptr_xxxxxxxxxxxxxxxx \
  -- uvx --from "mcp-portainer~=2.42.0" mcp-portainer
3

Configure Claude Desktop manually (alternative)

For Claude Desktop, add the server block directly to claude_desktop_config.json with the required environment variables.

4

Match server version to your Portainer version

Portainer MCP uses the same major.minor version as the Portainer API it targets. If your Portainer is 2.42.x, use mcp-portainer~=2.42.0. Check your Portainer version in Settings > About.

# Example for Portainer 2.21.x:
uvx --from "mcp-portainer~=2.21.0" mcp-portainer
5

Handle self-signed TLS certificates

If your Portainer instance uses a self-signed certificate, add the PORTAINER_TLS_VERIFY variable set to 0 to disable verification.

6

Test the connection

Ask your AI assistant to list environments or check Portainer settings to confirm the server is connected and authenticated.

Portainer Examples

Client configuration

Claude Desktop configuration for Portainer MCP with the required environment variables. Replace values with your actual Portainer URL and API key.

{
  "mcpServers": {
    "portainer": {
      "command": "uvx",
      "args": ["--from", "mcp-portainer~=2.42.0", "mcp-portainer"],
      "env": {
        "PORTAINER_URL": "https://portainer.example.com",
        "PORTAINER_API_KEY": "ptr_xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Prompts to try

Example prompts for managing Docker and Kubernetes through Portainer via AI.

- "List all environments connected to Portainer and their status"
- "Show me all running containers in the production environment"
- "Deploy the stack defined in my docker-compose.yml to the staging environment"
- "Check the logs for the nginx container in the web-prod environment"
- "List all Kubernetes namespaces in the k8s-cluster environment"

Troubleshooting Portainer

Authentication error: 401 Unauthorized

Verify PORTAINER_API_KEY starts with 'ptr_' and was copied completely. Tokens are only shown once at creation โ€” generate a new one in Portainer user settings if you lost it.

TLS certificate verification failure

Add PORTAINER_TLS_VERIFY=0 to the env block in your config if your Portainer uses a self-signed certificate. For production, install a proper certificate from Let's Encrypt.

Version mismatch errors or missing tools

Ensure the mcp-portainer version matches your Portainer minor version exactly (e.g., 2.42.x for Portainer 2.42.x). Change the version pin in your uvx --from argument accordingly.

Frequently Asked Questions about Portainer

What is Portainer?

Portainer is a Model Context Protocol (MCP) server that ๐ŸŽ๏ธ โ˜๏ธ/๐Ÿ  - a powerful mcp server that enables ai assistants to seamlessly interact with portainer instances, providing natural language access to container management, deployment operations, and infrastructure monitoring capabilities. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Portainer?

Follow the installation instructions on the Portainer GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Portainer?

Portainer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Portainer free to use?

Yes, Portainer is open source and available under the zlib License license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

Ready to use Portainer?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides