# Gemini

Connect Gemini to CMDOP over MCP. You need an agent token: create it for Gemini on the Agents tab of your CMDOP page, where it is shown once. Replace `<agent-token>` with it and `<contour>` with your address.

**In short:** Server URL `https://<contour>.cmdop.ai/mcp/`, header `Authorization: Bearer <agent-token>`.

1. Copy the command.

```bash
gemini mcp remove --scope user cmdopv2 2>/dev/null; gemini mcp add --scope user --transport http --header "Authorization: Bearer <agent-token>" cmdopv2 https://<contour>.cmdop.ai/mcp/
```

2. Paste it into a terminal and press Enter.

## Check

Ask Gemini to call `machines_list`. It answers with your machines. If it says `unauthorized`, the token is wrong or was revoked: create a new one.
