Back to MCP Directory
Portainer
Model Context Protocol moderate risk

Portainer

Portainer MCP connects AI assistants to Portainer, enabling management of container environments via AI using the Model Context Protocol.

Connections & Capabilities

Connects To

GitHubDockerKubernetes

Capabilities

readwriteexecadmin

Quickstart

Install

brew install cloc

Config

{
    "mcpServers": {
        "portainer": {
            "command": "/path/to/portainer-mcp",
            "args": [
                "-server",
                "[IP]:[PORT]",
                "-token",
                "[TOKEN]",
                "-tools",
                "/tmp/tools.yaml"
            ]
        }
    }
}

Exposed MCP Tools (13)

safe
ListEnvironments

Lists all available Portainer environments.

Read-only operation; no modifications.

moderate
UpdateEnvironmentTags

Updates tags associated with a Portainer environment.

Modifies environment metadata, but not critical settings.

moderate
CreateEnvironmentGroup

Creates a new environment group in Portainer.

Adds a new resource, but doesn't directly impact existing environments.

moderate
UpdateEnvironmentGroupName

Updates the name of an environment group.

Modifies the name of a resource.

safe
ListStacks

Lists all available stacks in Portainer.

Read-only operation; no modifications.

safe
GetStackFile

Retrieves the compose file for a specific stack.

Read-only operation; no modifications.

moderate
CreateStack

Creates a new Docker stack in Portainer.

Creates a new stack based on a compose file.

high
UpdateStack

Updates an existing Docker stack in Portainer.

Modifies the configuration of an existing stack.

safe
ListUsers

Lists all available users in Portainer.

Read-only operation; no modifications.

high
UpdateUser

Updates an existing user in Portainer.

Modifies user attributes, potentially affecting access control.

critical
DockerProxy

Proxies arbitrary Docker API requests to the Portainer environment.

Allows execution of any Docker command, including potentially destructive ones.

critical
KubernetesProxy

Proxies arbitrary Kubernetes API requests to the Portainer environment.

Allows execution of any Kubernetes command, including potentially destructive ones.

safe
getKubernetesResourceStripped

Proxies GET Kubernetes API requests and strips verbose metadata.

Read-only operation, retrieves data and removes verbose metadata.

Safety Assessment

Portainer MCP offers a read-only mode for safe exploration, but its ability to execute Docker and Kubernetes commands poses risks. Exercise caution when granting write access, especially in production environments.

  • Read-only mode available to restrict operations.
  • Version check helps ensure compatibility.
  • Tool customization allows disabling risky tools.
  • Uses API token for authentication.
  • Can execute arbitrary Docker and Kubernetes commands.
  • Requires an administrator API token.
  • Disabling version check can lead to unexpected behavior.
  • Write operations can modify Portainer resources.