Documentation index: https://openadmanager.com/llms.txt

# Use OpenAdManager from n8n, Make, Zapier and Scripts | OpenAdManager

> Connect n8n, Make, Zapier or your own script to the OpenAdManager MCP server with a personal token. Steps, copy-paste calls that were tested, limits and what not to do.

Canonical: https://openadmanager.com/docs/automation

**Docs menu**

## Get started

[Docs home](https://openadmanager.com/docs)[Quickstart](https://openadmanager.com/docs/quickstart)

## Add to your AI

[All AI apps](https://openadmanager.com/docs/ai)[Claude](https://openadmanager.com/docs/ai/claude)[ChatGPT](https://openadmanager.com/docs/ai/chatgpt)[Cursor](https://openadmanager.com/docs/ai/cursor)[Claude Code](https://openadmanager.com/docs/ai/claude-code)[Codex](https://openadmanager.com/docs/ai/codex)[GitHub Copilot](https://openadmanager.com/docs/ai/vs-code)[Gemini CLI](https://openadmanager.com/docs/ai/gemini-cli)[Devin Desktop](https://openadmanager.com/docs/ai/devin)[Antigravity](https://openadmanager.com/docs/ai/antigravity)[OpenClaw](https://openadmanager.com/docs/ai/openclaw)[Hermes Agent](https://openadmanager.com/docs/ai/hermes-agent)[Grok](https://openadmanager.com/docs/ai/grok)[Grok Build](https://openadmanager.com/docs/ai/grok-build)[More AI apps](https://openadmanager.com/docs/ai/other-clients)

## Control and safety

[AI permissions](https://openadmanager.com/docs/control)[Security](https://openadmanager.com/security)

## Tracking and team

[Tracking](https://openadmanager.com/docs/tracking)[Team and roles](https://openadmanager.com/docs/team)

## Google Ads

[Your own Google Cloud project](https://openadmanager.com/docs/google-ads/own-cloud-project)

## MCP reference

[Endpoint and tool catalog](https://openadmanager.com/docs/mcp)

# Use OpenAdManager from n8n, Make, Zapier and scripts

Your automation tool or script talks to the same OpenAdManager MCP server your AI app uses. You give it a personal token instead of signing in with a browser. Personal tokens are available on every plan, Free included.

| Field | Value |
| --- | --- |
| Server URL | `https://mcp.openadmanager.com/mcp` |
| Transport | Streamable HTTP |
| Authentication | `Authorization: Bearer <your personal token>` |

## 1. Make a personal token

- Open **Add to your AI** in the menu and click **Connect to AI**.
- Below the list of apps, choose **Use a personal token**.

- Give it a **Name** you will recognise, for example `n8n weekly report`.
- Under **What it can do**:

- **See your ads and results** is always on.
- **Create and change ads** is ticked for you. Untick it for reports and dashboards, and keep it only if the automation must change something. If your plan only allows reading, this choice is not shown. A personal token can never be given the spend permission.

- Under **Works in**, choose **Only the ones I pick** and tick only the ad accounts the automation needs.
- Pick **Expires**: 7 days, 30 days, 90 days or 1 year. Shorter is safer. You can make a new one at any time.

- Click **Limit to IP addresses (optional)** and add the address of your server or automation tool. The token will not work from anywhere else.
- Click **Create token**, then copy it. It is shown once. Put it in your tool's secret store or an environment variable, never in a workflow note, a public repository or a chat.

Each token is a row in the table on **Add to your AI**. Its menu has **Settings** (works in, IP addresses, expiry), **Rename**, **Get a new token**, **Suspend** and **Revoke**. Revoke it as soon as you stop using it.

Only owners, admins and members can create tokens. Viewers cannot.

## 2. Connect your tool

### n8n

Add an **MCP Client Tool** node to your AI Agent and set:

| n8n field | Value |
| --- | --- |
| Endpoint | `https://mcp.openadmanager.com/mcp` |
| Server Transport | HTTP Streamable |
| Authentication | Bearer Auth |
| Credentials | A new Bearer credential with your personal token |

Use **Tools to Include** > **Selected** to give the agent only the tools it needs. Older n8n versions only have a field called **SSE Endpoint** and no transport choice. Update n8n, because this server uses Streamable HTTP.

Checked against the n8n MCP Client Tool node (version 1.2 and later).

### Make

Add the **MCP Client** module to a scenario. Enter `https://mcp.openadmanager.com/mcp` as the server URL, choose token-based authentication instead of OAuth, and paste your personal token when Make asks for it. Make loads the tool list from the server, and you pick a tool and map its inputs.

### Zapier

Zapier's **MCP Client** (a beta feature) is added as an app connection: **Apps** > **Add connection** > **MCP Client**.

| Zapier field | Value |
| --- | --- |
| Server URL | `https://mcp.openadmanager.com/mcp` |
| Transport | Streamable HTTP |
| OAuth | No |
| Bearer Token | Your personal token |

In a Zap use **Run Read-Only Tool** for reports, and **Run Tool** only for something that changes ads. Zapier's MCP Client only supports tool calls.

## 3. Call it from a script

Set the token as an environment variable first:

```
export OAM_TOKEN='paste-your-token-here'

```

The server replies with one server-sent event, so the response looks like `event: message` followed by a `data:` line that holds the JSON. Always send `Accept: application/json, text/event-stream`. Without it the server answers `406 Not Acceptable`. No session is needed: each call stands alone.

### curl

Say hello:

```
curl -s https://mcp.openadmanager.com/mcp \
  -H "Authorization: Bearer $OAM_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-script","version":"1.0"}}}'

```

List the tools (the same long list your AI app sees):

```
curl -s https://mcp.openadmanager.com/mcp \
  -H "Authorization: Bearer $OAM_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

```

List your ad accounts:

```
curl -s https://mcp.openadmanager.com/mcp \
  -H "Authorization: Bearer $OAM_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"oam_list_accounts","arguments":{}}}'

```

The reply (values changed):

```
event: message
data: {"result":{"content":[{"type":"text","text":"{\"accounts\":[...]}"}],"structuredContent":{"accounts":[{"platform":"meta","account_id":"act_1234567890","name":"Example shop","client":"Main","currency":"USD","connection":{"label":"Meta sign-in","status":"ok"}}]},"isError":false},"jsonrpc":"2.0","id":3}

```

Read `result.structuredContent` for data. `tools/list` returns `result.tools`, each with `name`, `title`, `description` and `inputSchema`.

### JavaScript (Node 18 or newer)

```
const URL = "https://mcp.openadmanager.com/mcp";

async function rpc(method, params = {}) {
  const res = await fetch(URL, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.OAM_TOKEN}`,
      "Content-Type": "application/json",
      Accept: "application/json, text/event-stream",
    },
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
  });
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  const text = await res.text();
  // The reply is either plain JSON or one server-sent event ("data: {...}").
  const line = text.split("\n").find((l) => l.startsWith("data:"));
  const msg = JSON.parse(line ? line.slice(5) : text);
  if (msg.error) throw new Error(msg.error.message);
  return msg.result;
}

const tools = await rpc("tools/list");
console.log(tools.tools.length, "tools, first:", tools.tools[0].name);

const out = await rpc("tools/call", { name: "oam_list_accounts", arguments: {} });
for (const a of out.structuredContent.accounts) console.log(a.platform, a.account_id, a.name);

```

Save it as `accounts.mjs` and run `node accounts.mjs`. Output:

```
304 tools, first: google_ads_field_metadata
meta act_1234567890 Example shop
google 1234567890 Example ads

```

The tool count grows over time.

### Python 3 (no packages)

```
import json, os, urllib.request

URL = "https://mcp.openadmanager.com/mcp"

def rpc(method, params=None):
    req = urllib.request.Request(
        URL,
        data=json.dumps({"jsonrpc": "2.0", "id": 1, "method": method, "params": params or {}}).encode(),
        headers={
            "Authorization": "Bearer " + os.environ["OAM_TOKEN"],
            "Content-Type": "application/json",
            "Accept": "application/json, text/event-stream",
        },
    )
    with urllib.request.urlopen(req) as res:
        text = res.read().decode()
    # The reply is either plain JSON or one server-sent event ("data: {...}").
    line = next((l for l in text.splitlines() if l.startswith("data:")), None)
    msg = json.loads(line[5:] if line else text)
    if "error" in msg:
        raise RuntimeError(msg["error"]["message"])
    return msg["result"]

tools = rpc("tools/list")["tools"]
print(len(tools), "tools, first:", tools[0]["name"])

out = rpc("tools/call", {"name": "oam_list_accounts", "arguments": {}})
for a in out["structuredContent"]["accounts"]:
    print(a["platform"], a["account_id"], a["name"])

```

The output has the same shape as the JavaScript one.

### What a wrong call looks like

| You did | You get |
| --- | --- |
| Wrong, expired or revoked token | HTTP `401` with a `WWW-Authenticate` header. Make a new token. |
| Left out the `Accept` header | HTTP `406 Not Acceptable`. Send both content types. |
| Called a change tool with a read-only token | A normal reply with `isError: true` and the code `OAM_INSUFFICIENT_SCOPE`. Nothing was changed. |
| Called a change that is switched off in AI permissions | A reply that says nothing was changed and names the switch. See [AI permissions](https://openadmanager.com/docs/control). |
| Went over your plan | A reply with `isError: true` and a code such as `OAM_QUOTA_CALLS`. The message says what ran out and when it resets. |

## Limits

A token counts against the same MCP requests and the same speed limits as your AI apps, on the same plan. Nothing extra is metered and nothing is faster for a script. See the limits table in the [MCP reference](https://openadmanager.com/docs/mcp#limits) and the plan details on [Pricing](https://openadmanager.com/pricing). Changes follow your [AI permissions](https://openadmanager.com/docs/control) exactly as they do for an AI app, and every change is in the activity log with the token's name.

## Please do not

- **Resell or share it.** A token is for your own ad accounts, or the accounts of clients you manage. It is not a service for other businesses.
- **Poll in a loop.** Ask once for a report and keep the result. Run scheduled jobs a few times a day, not every few seconds. Constant polling uses up your MCP requests and trips the speed limit.

- **Put the token where others can read it.** If it leaks, revoke it at once and make a new one.
- **Give it more than it needs.** Read-only, the fewest ad accounts, an expiry and an IP address cover almost every report.

This is the OpenAdManager MCP server. It is meant for AI apps and for automations that call tools the same way. It is not a general programming interface to your ad platforms.

Related: [Add it to your AI app](https://openadmanager.com/docs/ai) · [AI permissions](https://openadmanager.com/docs/control) · [MCP reference](https://openadmanager.com/docs/mcp) · [Security](https://openadmanager.com/security)

Your next campaign is one sentence away.

[Get notified](https://app.openadmanager.com/accounts-open-soon)
