Setup steps checked Nov 2026.

Your ad accounts, inside Grok Build

New to Grok Build? Install it first from the xAI docs.

Install

grok mcp add --transport http openadmanager https://mcp.openadmanager.com/mcp

Sign in

There is no key to copy. The first time, Grok Build opens the OpenAdManager sign-in in your browser:

  1. Sign in with Google, Facebook or email.
  2. Pick the workspace and the ad accounts Grok Build may use.
  3. Click Allow. You are back in Grok Build, connected.

How to start it in Grok Build: Run grok. The first time it uses OpenAdManager, your browser opens. Or type /mcps, select openadmanager and press i.

Grok Build keeps the sign-in in ~/.grok/mcp_credentials.json. The sign-in needs a browser on the same machine. Over SSH, use a token.

Can't open a sign-in window? Use an access token instead

For servers, SSH, scripts, or when your company blocks sign-in windows.

  1. In OpenAdManager, open Access tokens in the menu (right under Add to your AI) and click Create token.

  2. Give it a name and choose the workspace, what it may do, the ad accounts and how long it lasts (7, 30, 90 or 365 days). Click Create token.

  3. Copy the token. It starts with oam_pat_ and is shown once.

  4. Set the token as an environment variable. On macOS or Linux run export OAM_TOKEN="oam_pat_...". On Windows run setx OAM_TOKEN "oam_pat_..." and open a new terminal.

    Then add the server again with the token. Use single quotes, so Grok fills in the variable instead of your shell.

grok mcp add --transport http openadmanager https://mcp.openadmanager.com/mcp --header 'Authorization: Bearer ${OAM_TOKEN}'

Grok Build fills in ${OAM_TOKEN} from your environment, so the token itself is not in the command history. To stop it, open Add to your AI in OpenAdManager, click ⋯ next to the token and choose Disconnect. The next call fails at once.

Check it worked

Run grok mcp doctor openadmanager. In OpenAdManager, Add to your AI lists Grok Build under Connected AI apps. Then ask:

Use OpenAdManager: list my ad accounts.

How to make a personal token, and how to use it from scripts and automation tools: Use OpenAdManager from n8n, Make, Zapier and scripts.

If something goes wrong

  • The browser never opened. Run grok on a machine with a browser, or use an access token.
  • Not listed. Run the add command again and check the name is openadmanager.
  • "Not done. ... is turned off in AI permissions". That is your switches working. Open the link in the message, or Add to your AI in the menu, and turn it on if you want it.

Grok is a trademark of its owner. OpenAdManager is not affiliated with or endorsed by xAI.

Your next campaign is one sentence away.

Get notified