MCP server · Engineering and operations

Portainer MCP server

Portainer in any MCP client, through Memtro: Portainer does not publish this server. Memtro's Portainer connector reads Portainer through its API with the credentials you connect, and one endpoint hands those tools, every other system you connect and Memtro's memory tools to Claude Code, Cursor, Claude Desktop or anything else that speaks Streamable HTTP, as you.

What the model can do

Portainer (self-hosted): the environments it manages and whether they are up, the stacks on each with their status and who deployed them, containers with their state, environment groups, tags, teams and users. Can create and delete tags, deploy, update, redeploy, start, stop and delete stacks, start, stop, restart and remove Docker containers, force-update a Swarm service, scale and roll back Kubernetes deployments, restart and delete pods, create namespaces, refresh an environment's snapshot, and create teams, add team members and create environment groups.

Reads

  • portainer_list_environmentsEnvironments (Docker hosts, Swarm clusters, Kubernetes clusters) Portainer manages: id, name, kind, whether up or down, group, tags and last check-in.
  • portainer_list_stacksStacks (compose, swarm and Kubernetes deployments): name, environment, status (active, inactive, deploying, error), whether deployed from git…
  • portainer_list_containersContainers on one Docker environment: name, image, state (running, exited…), Docker's status line, created…
  • portainer_list_groupsEnvironment groups in Portainer: id, name, description and tag ids.
  • portainer_list_tagsTags defined in Portainer, with how many environments and groups carry each.
  • portainer_list_teamsPortainer teams: id and name.
  • portainer_list_usersPortainer users: id, username and whether an administrator.

Acts, when you ask

These change something in Portainer. The model is told to use them only when you ask for exactly that, and each one is granted by name: per team on a shared connection, by the owner on a personal one.

  • portainer_create_tagCreate a new tag in Portainer.
  • portainer_start_stackStart a stack that is stopped (status inactive) on its environment: its containers are created and started again from the stack's saved definition.
  • portainer_stop_stackStop a running stack: every service in it goes down until somebody starts it again.
  • portainer_delete_stackDelete a stack: its containers are removed and Portainer forgets the stack and its saved definition and environment variables.
  • portainer_delete_tagDelete a tag.
  • portainer_create_stackDeploy a new stack on an environment: Portainer starts every container the compose file describes, on the customer's servers, as soon as this returns.
  • portainer_replace_stack_fileReplace a stack's compose file and redeploy it: the old file is overwritten…
  • portainer_redeploy_git_stackPull a git-deployed stack's repository again and redeploy it: changed services are recreated and restart.
  • portainer_start_containerStart a stopped Docker container on a Docker environment.
  • portainer_stop_containerStop a running Docker container (Docker sends SIGTERM, then kills it after its grace period).
  • portainer_restart_containerRestart a Docker container: it stops and starts again, so what it serves is briefly down.
  • portainer_delete_containerRemove a Docker container permanently: anything written inside it (not in a volume) is lost.
  • portainer_force_update_swarm_serviceForce-update one Docker Swarm service: Swarm recreates every task of the service, so its containers restart (rolling…
  • portainer_scale_kubernetes_deploymentSet the number of replicas of a Kubernetes deployment.
  • portainer_rollback_kubernetes_deploymentRoll a Kubernetes deployment back to an earlier revision (by default the one before the current): its pods are replaced with the older template…
  • portainer_restart_kubernetes_podRestart every container in one Kubernetes pod in place (the pod is kept).
  • portainer_delete_kubernetes_podDelete one Kubernetes pod.
  • portainer_create_kubernetes_namespaceCreate an empty Kubernetes namespace on an environment, with no resource quota, owner or annotations.
  • portainer_snapshot_environmentAsk Portainer to refresh its snapshot of one environment now (the cached counts of stacks, containers, images and volumes it shows).
  • portainer_create_teamCreate an empty team in Portainer, with no leaders and no members; it gets no environment access until an administrator grants it.
  • portainer_add_team_memberAdd a user to a Portainer team, as a member or as its leader.
  • portainer_create_environment_groupCreate an empty environment group in Portainer (name and description only): no environment is moved into it and no tag is attached…

Connect it

First connect Portainer on Dashboard → Connections, then add Memtro to your client once. The Portainer tools appear alongside the tools of everything else you have connected; nothing is configured per connector.

Claude Code

The Memtro plugin registers the server and a skill for when to use it; the tools are then available in every session.

claude plugin marketplace add memtro-org/claude-memtro
claude plugin install memtro@memtro --config api_key=sk-memtro-...

Cursor

Add the server to .cursor/mcp.json in the project, or to the global file under ~/.cursor/.

{
  "mcpServers": {
    "memtro": {
      "url": "https://platform.memtro.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sk-memtro-..."
      }
    }
  }
}

Claude Desktop

Create a personal API key on Dashboard → Profile → API keys. In Claude Desktop add an MCP server of type HTTP with URL https://platform.memtro.com/api/mcp and the header Authorization: Bearer sk-memtro-…

OpenCode

A remote server in opencode.json.

{
  "mcp": {
    "memtro": {
      "type": "remote",
      "url": "https://platform.memtro.com/api/mcp",
      "headers": {
        "Authorization": "Bearer sk-memtro-..."
      }
    }
  }
}

Pi

One command: pi mcp add memtro --url https://platform.memtro.com/api/mcp --bearer-token-env-var MEMTRO_API_KEY. Tools arrive as mcp__memtro__*. The pi-memtro extension registers it for you, alongside Memtro as the model.

Any other client

Add an MCP server of type HTTP (Streamable HTTP, stateless) at https://platform.memtro.com/api/mcp with the header Authorization: Bearer sk-memtro-.... Codex, Zed, Windsurf, Cline and the SDKs all take a remote server this way.

Who may use it

The key identifies the person, and the server offers that person the tools they may use everywhere else in Memtro. A shared Portainer connection is used by the teams an administrator granted it to, tool by tool, on the Permissions page; a personal connection is used by its owner alone, and its tools that act stay off until the owner allows them. See Teams and permissions and Connectors.

Ask it like this

  • › Which stacks are not active right now?
  • › Which environments are down?
  • › Who last updated the billing stack, and when?
  • › Which containers on the production host have exited?
  • › Restart the reporting container on staging

Questions

Is this an official Portainer MCP server?
No. It is Memtro's MCP server with Memtro's Portainer connector behind it: the connector reads Portainer through its API with the credentials you connect on Dashboard → Connections, and Portainer publishes nothing here. The same endpoint carries every other system you connect and Memtro's memory tools.
What does it cost?
Nothing on top of Memtro. One price per organisation by its number of users, from $50 a month for up to 10 users after a 7-day free trial, with every connector, the MCP server, jobs and memory included. You bring your own model keys.
Can it change anything in Portainer?
Only when you ask, and only what it has been granted: create a tag in Portainer; delete a tag in Portainer (removed from every environment and group that carries it); start a stopped stack in Portainer (its containers start on that environment); stop a running stack in Portainer (its services go down); delete a stack in Portainer (its containers are removed and the stack definition is gone); deploy a new stack in Portainer from a compose file or git repository (its containers start); replace a Portainer stack's compose file and redeploy it (services restart; the old file is overwritten); redeploy a git-based Portainer stack from its repository (services restart); start a stopped Docker container in Portainer; stop a running Docker container in Portainer; restart a Docker container in Portainer; remove a Docker container in Portainer; force-update a Docker Swarm service in Portainer (its tasks are recreated); scale a Kubernetes deployment in Portainer; roll a Kubernetes deployment back to an earlier revision in Portainer; restart a Kubernetes pod's containers in Portainer; delete a Kubernetes pod in Portainer; create a Kubernetes namespace in Portainer; refresh Portainer's snapshot of an environment; create a team in Portainer; add a user to a Portainer team (gives them the team's environment access); create an environment group in Portainer. Every other tool reads, searches or lists. An administrator grants each acting tool by name per team, and a personal connection acts only after its owner allows it.
Which clients work?
Any MCP client that speaks Streamable HTTP: Claude Code, Cursor, Claude Desktop, OpenCode, Codex, Zed, Windsurf, Cline and the Anthropic and OpenAI SDKs. There is no local process to run; the server is remote and authenticated with your key.

Other MCP servers · Engineering and operations

Where agents remember your company

Sign in, add a provider key, create an API key and point your tools at Memtro. It takes about five minutes.

7-day free trial · card on file, nothing charged until it ends · cancel any time