Portainer
๐๏ธ โ๏ธ/๐ - 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.
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
Maintainer
Works with
Installation
Manual Installation
npx portainer-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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-portainerConfigure Claude Desktop manually (alternative)
For Claude Desktop, add the server block directly to claude_desktop_config.json with the required environment variables.
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-portainerHandle 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.
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.
Portainer Alternatives โ Similar Cloud Services Servers
Looking for alternatives to Portainer? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
โ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
โ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
โ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
โ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
โ 26.7kๆฌ้กน็ฎไธบxiaozhi-esp32ๆไพๅ็ซฏๆๅก๏ผๅธฎๅฉๆจๅฟซ้ๆญๅปบESP32่ฎพๅคๆงๅถๆๅกๅจใBackend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
โ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up Portainer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.