Getting Started
Prerequisites
Section titled “Prerequisites”- A running Portainer 2.39.1 instance (Business Edition or Community Edition)
- An API token from your Portainer instance
- An MCP-compatible AI assistant (Claude Desktop, VS Code with Copilot, Cursor, etc.)
Installation
Section titled “Installation”Choose any of the methods below:
Requires Go 1.24+:
go install github.com/jmrplens/portainer-mcp-enhanced/cmd/portainer-mcp-enhanced@latestdocker pull ghcr.io/jmrplens/portainer-mcp-enhanced:latestDownload from GitHub Releases:
| Platform | Architecture | Archive |
|---|---|---|
| Linux | amd64 | portainer-mcp-enhanced_*_linux_amd64.tar.gz |
| Linux | arm64 | portainer-mcp-enhanced_*_linux_arm64.tar.gz |
| macOS | amd64 (Intel) | portainer-mcp-enhanced_*_darwin_amd64.tar.gz |
| macOS | arm64 (Apple Silicon) | portainer-mcp-enhanced_*_darwin_arm64.tar.gz |
| Windows | amd64 | portainer-mcp-enhanced_*_windows_amd64.zip |
| Windows | arm64 | portainer-mcp-enhanced_*_windows_arm64.zip |
# Example: Linux amd64curl -L -o portainer-mcp-enhanced.tar.gz \ https://github.com/jmrplens/portainer-mcp-enhanced/releases/latest/download/portainer-mcp-enhanced_linux_amd64.tar.gztar xzf portainer-mcp-enhanced.tar.gzchmod +x portainer-mcp-enhancedAll releases include SHA256 checksums in checksums.txt.
Requires Go 1.24+ and Make:
git clone https://github.com/jmrplens/portainer-mcp-enhanced.gitcd portainer-mcp-enhancedmake buildCross-compile for a specific platform:
make PLATFORM=linux ARCH=arm64 buildGet a Portainer API Token
Section titled “Get a Portainer API Token”- Log in to your Portainer instance
- Go to My Account → API Keys
- Click Add API Key, give it a name
- Copy the generated token (starts with
ptr_)
Configure Your AI Assistant
Section titled “Configure Your AI Assistant”Edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "portainer": { "command": "/path/to/portainer-mcp-enhanced", "args": [ "-server", "https://your-portainer:9443", "-token", "ptr_your_api_token" ] } }}Create .vscode/mcp.json in your workspace:
{ "servers": { "portainer": { "type": "stdio", "command": "/path/to/portainer-mcp-enhanced", "args": [ "-server", "https://your-portainer:9443", "-token", "ptr_your_api_token" ] } }}Go to Cursor Settings → MCP and add:
{ "mcpServers": { "portainer": { "command": "/path/to/portainer-mcp-enhanced", "args": [ "-server", "https://your-portainer:9443", "-token", "ptr_your_api_token" ] } }}Verify It Works
Section titled “Verify It Works”Once configured, ask your AI assistant:
“What environments are available in Portainer?”
You should see the assistant call manage_environments with action: list_environments and return your environment list.
More Examples
Section titled “More Examples”"Show me the Docker dashboard for environment 1""List all stacks and their status""Create a new team called 'developers'""Search for nginx Helm charts""What's the system status of Portainer?"Next Steps
Section titled “Next Steps”- Configuration — all CLI flags and options
- Meta-Tools Guide — understand the 15 grouped tools
- Tools Reference — complete parameter details for all 98 tools
- Security — security considerations and read-only mode