# API & MCP

The API & MCP page puts the two ways to use AdPix data outside the console side by side — connecting an AI assistant over MCP, and the REST API for integrations. Both are granted at the account level, and one connection covers every website in your account.

## Overview

Open **API & MCP** from the account menu (the avatar at the top). Two cards at the top compare the two ways in:

- **Connect an AI assistant (MCP)** — ask Claude, ChatGPT or Cursor about your data in plain language. You sign in with your AdPix account; there is no token to create.
- **Build an integration (REST API)** — pull reports into dashboards, warehouses or your own code over HTTPS + JSON, with OAuth (an app acting as a person) or a service token (a server or script).

Either way, access never goes beyond what you can see in the console. A badge on each tab says whether your plan includes it — and the plan is the one thing checked per website.

## Access scope: the account, not one website

MCP and API access is granted at the **account level**. Nothing on this page is a per-website setting: a connection belongs to your AdPix account and can read every website you have access to.

- When you connect, the domain step offers **All my websites** — pick it to cover all of your sites, including the ones you are given later. You can also select a few by hand.
- A service token always covers every website in its account.
- The plan is the one thing checked per website: a website whose plan doesn't include the API or MCP stays out of the answers, even on a connection that covers the whole account.

That is why the plan badge above each tab names no website at all: it reports the plan and nothing about the scope of the connection. When a feature is not in the plan, Change plan takes you to that website's billing.

## AI assistants (MCP)

1. Copy the **MCP server address** with **Copy**.
2. In your AI app, add a "custom connector" or "remote MCP server" and paste the address — the steps for Claude, ChatGPT, Claude Code and Cursor / VS Code are on this tab.
3. The app opens the AdPix sign-in; sign in and, on the **Connect** page, pick the permissions and the websites — **All my websites** covers the whole account.
4. Go back to the app and ask your questions.

## REST API

The **REST API** tab shows the API base URL, the OAuth discovery document for developers, and a ready-to-run `curl` quickstart. Use OAuth for a tool each team member connects themselves; use a service token for a nightly job or a BI connector with no person behind it.

## Your connected apps

The apps you connected through MCP or OAuth, with their permissions and websites. **Revoke** cuts one off immediately. [More about connected apps](/en/analytics/admin/connected-apps/).

## Service tokens

> **Account admins only**
>
> A service token belongs to the account, not to a person, is read-only, and covers every website in that account. Only an account admin creates one; everyone else sees a note on this tab pointing them to MCP.

1. Click **+ Create service token**.
2. Give it a **name** that says what it's for, and tick only what it needs to read: reports, website settings, the website list and quota.
3. Set the expiry (1–365 days), the **rate tier**, and **Hide revenue metrics** if needed.
4. The secret is shown once — copy it right there into your secret manager.

The table lists the account's tokens with status, last use and expiry. **Usage** opens a 30-day request summary and **Revoke** (with a reason) stops a token immediately. Below it, an account admin sees the apps connected to the account's websites and can **Block** an app for the whole account.

## Frequently asked questions

### Why does this page name a website I'm not working on?

It no longer does. MCP and API access is account-level, and one connection covers every website in your account — this page is not a per-website setting. The plan badge names no website either; it reports the plan only.

### Do I need to create a token to connect Claude or ChatGPT?

No. Add the MCP server address in the app; it sends you to the AdPix sign-in and you choose the websites and permissions yourself. Service tokens are only for servers and scripts.

### Why does the Service tokens tab only show a message to me?

Creating and managing service tokens is an account-admin action. You don't need one to connect an AI assistant or your own app — use the AI assistants (MCP) tab.

### Why does the REST API say "Not in plan"?

The REST API and MCP are two separate features of a website's plan. Free includes MCP only by default. The badge reports the plan and names no website; the scope of the connection itself is always the whole account. Open Change plan to see which website is on which plan.

### I lost a service token's secret - can I see it again?

No. The secret is shown once, right after it is created. Create a new token and revoke the old one - revocation is instant.

## Related

- [Connected apps](https://docs.adpix.io/en/analytics/admin/connected-apps/)
- [Public API reference](https://docs.adpix.io/en/developers/analytics/developers/public-api/)
- [Roles and capabilities](https://docs.adpix.io/en/analytics/admin/roles-and-capabilities/)

---

[Docs](https://docs.adpix.io/en/analytics/admin/api-access/) · AdPix
