loading…
Search for a command to run...
loading…
Enables AI assistants to manage Docker containers, images, networks, and services through the Portainer API.
Enables AI assistants to manage Docker containers, images, networks, and services through the Portainer API.
MseeP.ai Security Assessment Badge
A Model Context Protocol (MCP) server implementation for Portainer, enabling AI assistants to interact with Docker containers and services through Portainer's API.
portainer-ce-mcp/
├── src/
│ ├── api/
│ │ └── portainer.ts # Portainer API integration
│ ├── constants/
│ │ └── index.ts # Tool names and other constants
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ └── main.ts # Main server implementation
├── package.json # Project dependencies
├── package-lock.json # Dependency lock file
├── deno.json # Deno configuration
└── README.md # Project documentation
git https://github.com/BirajMainali/poratiner-ce-mcp-server.git
cd portainer-ce-mcp
The server requires the following environment variables:
PORTAINER_URL: The URL of your Portainer instancePORTAINER_API_KEY: Your Portainer API keyPORTAINER_ENV_ID: Your Poratiner Environment IdThe server provides the following tools for AI assistants:
FETCH_DOCKER_CONTAINERS: List all containersCREATE_DOCKER_CONTAINER: Create a new containerSTART_DOCKER_CONTAINER: Start a containerDELETE_DOCKER_CONTAINER: Remove a containerFETCH_CONTAINER_LOGS: Get container logsUPDATE_CONTAINER_RESOURCE_LIMITS: Update container resourcesDELETE_STOPPED_CONTAINERS: Clean up stopped containersFETCH_IMAGES: List all imagesDELETE_IMAGE_BUILD_CACHE: Clear build cacheDELETE_UNUSED_IMAGES: Remove unused imagesFETCH_NETWORKS: List all networksINSPECT_NETWORK: Get network detailsFETCH_SERVICES: List all servicesFETCH_SERVICE_LOG: Get service logsdeno compile --allow-env --allow-read --allow-net --env-file=.env src/main.ts
npx @modelcontextprotocol/inspector deno run --allow-env --allow-read --allow-net --env-file=.env src/main.ts
{
"mcpServers": {
"poratiner": {
"command": "C:\\MCP\\portainer-ce-mcp\\src.exe", // use executable path
"args": [
"y"
]
}
}
}
MIT
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Выполни в терминале:
claude mcp add portainer-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.