# LM Studio

Connect LM Studio to CMDOP over MCP. You need an agent token: create it for LM Studio 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>`.

Open the Connect panel on your CMDOP page, pick LM Studio and press **Open**: LM Studio asks to add the server with your token. Confirm.

Or add it by hand with these MCP settings:

```json
{
  "mcpServers": {
    "cmdopv2": {
      "type": "http",
      "url": "https://<contour>.cmdop.ai/mcp/",
      "headers": {
        "Authorization": "Bearer <agent-token>"
      }
    }
  }
}
```

## Check

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