Ad Computer Docs

Agent setup

Use adcom from Codex, Claude Code, SSH sessions, and other remote or headless environments.

This guide is for agent-driven setup.

Use it when adcom is running on a remote VM, container, CI worker, OpenClaw instance, or any environment where the browser is not on the same machine as the CLI process.

Canonical command

adcom login --json

This is the recommended bootstrap command for Codex, Claude Code, and other automation.

What the agent does

The agent can complete these steps on its own:

  • install adcom
  • start CLI authentication
  • wait for browser approval
  • verify identity with adcom whoami --json
  • inspect the hosted tool surface with adcom mcp inspect-tools --json
  • expose the hosted MCP worker over stdio with adcom mcp serve

What the user does

The user only needs to:

  • open the URL from the login_url event
  • sign in and approve CLI access
  • finish Meta authentication at the app integrations page if prompted

Event stream

adcom login --json emits newline-delimited JSON events.

Example sequence:

{"event":"login_url","authorize_url":"https://app.ad.computer/cli/authorize?request_id=..."}
{"event":"login_complete","workspace_id":"user_123"}

One-shot verification

Use these when you want the current state after login:

adcom whoami --json
adcom mcp inspect-tools --json

SSH and headless notes

  • No localhost callback is required.
  • The browser can run on a different machine from the CLI process.
  • adcom login prints the approval URL by default.
  • Use --open only when the same machine has a local browser.
  • The command keeps running until approval completes, or until the timeout is reached.

Recovery

If login times out:

  • rerun adcom login --json
  • reuse the new login_url
  • then verify the final state with adcom whoami --json

Local bridge

If the client needs stdio MCP after setup:

adcom mcp serve

Once the bridge is running, the canonical first sequence is:

1. Call meta_get_ad_accounts
2. Pick an accessible account_id
3. Call meta_review_account_performance with that explicit account_id

On this page