# Install Portainer MCP in Google Antigravity

Source: https://github.com/portainer/portainer-mcp
Listing: https://www.antigravityskills.org/skill/portainer
Safety review (2026-10-13): Acts on your Portainer with your API key and can change real infrastructure; read-only mode and secret redaction are available, and the project is deprecated upstream since 2026-10-08.

## Rules for the agent
- Before running anything, tell the user what you will download and whether it contains scripts, and ask them to confirm.
- Ask the user for any API keys, tokens, URLs or paths the config needs. Never invent them or print them back.
- Do not run other commands from the source repository unless the user asks.

## Steps
1. Create a Portainer API key
   In Portainer: My Account -> Access tokens. For look-only use, plan to set PORTAINER_READ_ONLY=1.
2. Open the Antigravity MCP config
   Global: ~/.gemini/config/mcp_config.json. This project only: .agents/mcp_config.json.
3. Add the server under "mcpServers"

```json
{
  "mcpServers": {
    "portainer": {
      "command": "uvx",
      "args": ["--from", "mcp-portainer~=2.45.0", "mcp-portainer"],
      "env": {
        "PORTAINER_URL": "https://portainer.example.com",
        "PORTAINER_API_KEY": "ptr_xxxxxxxxxxxxxxxx",
        "PORTAINER_READ_ONLY": "1"
      }
    }
  }
}
```

   Same stdio command the README documents for Claude Desktop, plus read-only mode (remove that line to allow changes). Change 2.45.0 to your Portainer minor version. Needs uv on PATH.
4. Optional: add the hygiene skill

```bash
git clone --depth 1 https://github.com/portainer/portainer-mcp /tmp/portainer-mcp && mkdir -p .agents/skills && cp -r /tmp/portainer-mcp/skills/portainer-mcp-hygiene .agents/skills/
```

   The server already serves this guide through get_guidance; copying the skill into .agents/skills/ (or ~/.gemini/config/skills/) just makes it visible in the skills list.
5. Check that it loaded
   Open Settings -> Customizations -> Installed MCP Servers; portainer should be listed and switched on.

Note: The README does not mention Antigravity; these steps put its documented uvx command into Antigravity's mcp_config.json. MCP servers do not go in .agents/skills/.

Done when the server is listed and enabled under Settings → Customizations → Installed MCP Servers.
