Skip to main content
Glama
hlavrencic

portainer-mcp-server

by hlavrencic

portainer-mcp-server

MCP server for the Portainer REST API. Manage Docker containers, stacks, images, networks and volumes from any AI assistant that supports the Model Context Protocol.

Usage

npx portainer-mcp-server

Or with a permanent install:

npm install -g portainer-mcp-server
portainer-mcp-server

Related MCP server: ChatGPT MCP Server

Configuration

Two environment variables are required:

Variable

Description

Default

PORTAINER_URL

Portainer base URL

http://localhost:9000

PORTAINER_PAT

Portainer API token (Personal Access Token)

(required)

To generate a PAT: Portainer UI → Account → Access Tokens → Add access token.

OpenCode / Claude Desktop config

{
  "mcp": {
    "portainer": {
      "type": "local",
      "command": ["npx", "-y", "portainer-mcp-server"],
      "enabled": true,
      "environment": {
        "PORTAINER_URL": "http://your-portainer-host:9000",
        "PORTAINER_PAT": "<your-token>"
      }
    }
  }
}

Available tools

Tool

Description

list_environments

List all Portainer environments/endpoints

list_containers

List containers in an environment

inspect_container

Get detailed info about a container

get_container_logs

Get logs from a container

start_container

Start a stopped container

stop_container

Stop a running container

restart_container

Restart a container

list_stacks

List all Portainer stacks

inspect_stack

Get details of a specific stack

get_stack_file

Get the docker-compose file of a stack

list_images

List Docker images in an environment

list_networks

List Docker networks in an environment

list_volumes

List Docker volumes in an environment

License

MIT

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    Universal Docker MCP server for AI assistants (Cursor, Claude Desktop). Manage Docker containers, execute commands, query databases, and handle environment configurations — all through natural language.
    151
    MIT
  • F
    license
    B
    quality
    B
    maintenance
    An MCP server that gives LLMs direct control over a local Docker daemon, enabling container, image, volume, network, and Compose stack management through natural language.
    23
    4

View all related MCP servers

Related MCP Connectors

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlavrencic/portainer-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server