Skip to content

Installation

portainer-agent is a standard Python package and a prebuilt container image. Pick the path that matches how you want to run it.

Requirements

  • Python 3.11 – 3.14.
  • A reachable Portainer instance (Community or Business Edition) — see Backing Platform to deploy one locally.
pip install portainer-agent

Optional extras

The base install ships the MCP server runtime. Install the extra for what you need:

Extra Install Pulls in
(base) pip install portainer-agent FastMCP MCP-server runtime (agent-utilities[mcp])
agent pip install "portainer-agent[agent]" Pydantic-AI agent server + Logfire tracing
all pip install "portainer-agent[all]" MCP server, agent server, and Logfire tracing
test pip install "portainer-agent[test]" pytest, pytest-asyncio, pytest-cov, pytest-xdist
# Typical: run the MCP server and the A2A agent
pip install "portainer-agent[all]"

From source

git clone https://github.com/Knuckles-Team/portainer-agent.git
cd portainer-agent
pip install -e ".[all]"          # editable install with every extra

With uv:

uv pip install -e ".[all]"
uv run portainer-mcp

Prebuilt Docker image

A multi-stage, slim image is published on every release (entrypoint portainer-mcp):

docker pull knucklessg1/portainer-agent:latest

docker run --rm -i \
  -e PORTAINER_URL=http://your-portainer:9000 \
  -e PORTAINER_TOKEN=your_api_token \
  knucklessg1/portainer-agent:latest        # stdio transport (default)

For an HTTP server with a published port and the A2A agent, see Deployment.

Verify the install

portainer-mcp --help
portainer-agent --help
python -c "import portainer_agent; print(portainer_agent.__version__)"

Next steps

  • Deployment — run it as a long-lived MCP server and agent behind Caddy + DNS.
  • Usage — call the tools, the API, and the CLI.
  • Configuration — every environment variable.