Skip to main content

Connecting an external AI (MCP)

Besides the built-in AI assistant, Qubix can be connected to your own AI assistant — Claude Desktop, Claude Code, Cursor or any client that supports MCP (Model Context Protocol). The assistant then answers questions about your campaigns using live data — with exactly the same access and permissions you have in the interface.

What you need​

  • A personal token (PAT) — create it on the MCP/API page. More — MCP/API.
  • Your Qubix address in the form https://<your-domain>/api/mcp.
The token is shown once

The token is shown only at the moment you create it. Copy it right away and keep it safe — Qubix stores only its hash and cannot show it again. Lost it? Press Issue new… to get a new one (the old one stops working immediately).

How to connect​

You need two things: the address https://<your-domain>/api/mcp and the header Authorization: Bearer <your-token>. The rest depends on the client.

Claude Code (CLI)​

Bash
claude mcp add --transport http qubix https://<your-domain>/api/mcp \
--header "Authorization: Bearer qbx_YOUR_TOKEN"

Restart Claude Code — the Qubix tools become available in the chat.

Claude Desktop​

Open Settings → Connectors → Add custom connector, set the address https://<your-domain>/api/mcp and add the header Authorization: Bearer qbx_YOUR_TOKEN.

Cursor​

Add the server to ~/.cursor/mcp.json (or the project's .cursor/mcp.json):

JSON
{
"mcpServers": {
"qubix": {
"url": "https://<your-domain>/api/mcp",
"headers": { "Authorization": "Bearer qbx_YOUR_TOKEN" }
}
}
}

What the assistant can do​

Once connected, the assistant can read your analytics and perform actions — all within your permissions:

  • Analytics — the dashboard, geo, offers, networks, traffic sources, the Facebook screens, the visitor funnel, and a drill-down for any single ad, campaign, offer, creative, PWA, geo or traffic source.
  • Creatives — search by meaning ("find creatives like a fake-chat screenshot") and the top performing creative themes.
  • Britva — view the automation rules, paused ads and firing history; create, edit and remove rules.
  • Actions — pause and resume ads and campaigns; manage offers, networks, traffic sources and tracker campaigns; submit to Qubix the spend of platforms without an import of their own — the cost_intake_submit tool, with the Manage traffic sources permission (more — Spend intake by key).
  • Free-form queries — for questions the ready-made tools do not cover.
Your data only

The assistant sees exactly what you see in the interface: an administrator gets the whole account, everyone else — the data their permission template opens to them. Actions are limited by your permissions just like in the admin panel.

Actions are real

Pausing an ad, deleting a rule or an offer through the assistant changes your real campaigns. In chat clients such actions are performed only after your confirmation — read what the assistant proposes before approving.

When a tool asks for your key​

A tool may need an access key to a service of your own — for example Cloudflare or Namecheap. The key is not typed into the conversation with the external assistant: the tool answers with a link instead. The link opens a window named Account connection in your panel. It holds the same card for the key that the built-in assistant shows in its own panel: the title Add your … key (the dots stand for the name of the service), the line The key goes straight to the server, verified, and is never sent to AI Assistant., the fields of that service and the button Add & verify, which reads Verifying… while the key is being checked. The key goes straight to the Qubix server. Once the key is accepted, the window says Key added: … (the dots stand for the name of the account).

The window also says when the link cannot be used: The link is incomplete when the address of the link is incomplete, and What you entered is already used when what you entered has already been used.

Security​

  • The token is your access key — treat it like a password, do not put it in shared files or public repositories.
  • One token per user. To revoke access, open the MCP/API page and press Revoke… (or Issue new… to replace it).

What's next​