portainer-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@portainer-mcp-servershow me all containers in environment 1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-serverOr with a permanent install:
npm install -g portainer-mcp-server
portainer-mcp-serverRelated MCP server: ChatGPT MCP Server
Configuration
Two environment variables are required:
Variable | Description | Default |
| Portainer base URL |
|
| 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 all Portainer environments/endpoints |
| List containers in an environment |
| Get detailed info about a container |
| Get logs from a container |
| Start a stopped container |
| Stop a running container |
| Restart a container |
| List all Portainer stacks |
| Get details of a specific stack |
| Get the docker-compose file of a stack |
| List Docker images in an environment |
| List Docker networks in an environment |
| List Docker volumes in an environment |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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