Skip to content

Getting Started

  • 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.)

Choose any of the methods below:

Requires Go 1.24+:

Terminal window
go install github.com/jmrplens/portainer-mcp-enhanced/cmd/portainer-mcp-enhanced@latest
  1. Log in to your Portainer instance
  2. Go to My AccountAPI Keys
  3. Click Add API Key, give it a name
  4. Copy the generated token (starts with ptr_)

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"
]
}
}
}

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.

"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?"