> ## Documentation Index
> Fetch the complete documentation index at: https://www.adspirer.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect OpenClaw to Ad Platforms | Adspirer

> Install the Adspirer OpenClaw plugin. 400+ ad tools, 14KB skill file built in, zero configuration. Manage Google, Meta, Amazon, ChatGPT Ads, LinkedIn, and TikTok Ads.

One plugin, 400+ tools, 14KB skill file built in. No separate setup.

## What Makes OpenClaw Different

Every other MCP client gives you access to Adspirer's 400+ tools. That's the baseline.

OpenClaw gives you a complete AI advertising agent -- pre-configured, pre-trained, ready to run campaigns. The plugin includes a 14.4KB SKILL.md file that documents every tool, every workflow, every platform-specific nuance. The plugin doesn't just connect to Adspirer -- it includes a 14.4KB instruction manual that turns OpenClaw into a specialized advertising AI.

You're deploying an expert, not configuring tools.

## Prerequisites

<Note>
  * Node.js 18+
  * An Adspirer account ([free to start](https://adspirer.ai/sign-up?utm_source=docs\&utm_medium=page\&utm_content=signup))
</Note>

## Setup

<Tabs>
  <Tab title="Local Install">
    Install OpenClaw on your own machine (Mac, Linux, or Windows with WSL).

    <Steps>
      <Step title="Install OpenClaw">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        npm install -g openclaw
        ```
      </Step>

      <Step title="Initialize OpenClaw">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw init
        ```

        This creates `~/.openclaw/openclaw.json` with default settings.
      </Step>

      <Step title="Set Tools Profile">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw config set tools.profile full
        ```

        This gives the agent access to bash, file operations, and web tools.
      </Step>

      <Step title="Install the Adspirer Plugin">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw plugins install openclaw-adspirer
        ```

        This installs the plugin with all 400+ tools and the 14.4KB SKILL.md instruction file bundled in. No separate skill or agent installation needed.
      </Step>

      <Step title="Authenticate with Adspirer">
        <Tabs>
          <Tab title="Web Login (OAuth)">
            ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
            openclaw adspirer login
            ```

            Your browser opens for OAuth 2.1 sign-in. After signing in at adspirer.ai, you'll be redirected back automatically. No passwords stored locally.
          </Tab>

          <Tab title="API Key (Headless/Remote)">
            Generate an API key at [adspirer.ai/keys](https://adspirer.ai/keys), then authenticate:

            ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
            openclaw adspirer login --token sk_live_your_token_here
            ```

            See [Remote Server Setup](#remote-server-setup) for Docker, CI/CD, and environment variable options.
          </Tab>
        </Tabs>
      </Step>

      <Step title="Restart the Gateway">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw gateway restart
        ```

        This loads the plugin and registers all 400+ ad management tools.
      </Step>

      <Step title="Connect Your Ad Platforms">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw adspirer connect
        ```

        This opens [adspirer.ai/connections](https://adspirer.ai/connections) where you can link:

        * Google Ads
        * Meta Ads (Facebook & Instagram)
        * LinkedIn Ads
        * TikTok Ads
      </Step>

      <Step title="Verify Your Setup">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw adspirer status
        ```

        You should see your authentication status, connected platforms, and tool count.
      </Step>

      <Step title="Start Using">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw
        ```

        Then ask the agent things like:

        * "Show me my Google Ads campaign performance for the last 30 days"
        * "What keywords are wasting spend?"
        * "Create a new search campaign for..."
        * "Pause campaign X"

        <Card title="Sign up for Adspirer — free to start" icon="rocket" href="https://adspirer.ai/sign-up?utm_source=docs&utm_medium=setup-cta&utm_content=openclaw" horizontal>
          15 free tool calls/month. No credit card required. Connect your ad accounts in 2 minutes.
        </Card>
      </Step>
    </Steps>

    <Check>
      You're connected. OpenClaw is now a fully configured advertising agent with built-in workflows.
    </Check>
  </Tab>

  <Tab title="Hostinger VPS">
    Deploy OpenClaw on a Hostinger VPS with OpenClaw pre-installed. Your agent runs 24/7 and is accessible from WhatsApp, Telegram, Discord, or a web dashboard. No terminal experience required.

    <Tip>
      For a detailed walkthrough with agency use cases and cost breakdown, see the [full Hostinger deployment guide](/guides/deploy-paid-media-agent-hostinger).
    </Tip>

    <Steps>
      <Step title="Buy a Hostinger VPS with OpenClaw">
        Go to [Hostinger's VPS marketplace](https://www.hostinger.com/vps), select a plan, and click **Deploy**. OpenClaw is auto-selected as the pre-installed application.
      </Step>

      <Step title="Configure Environment Variables">
        Hostinger's setup screen asks for configuration values:

        * **OPENCLAW\_GATEWAY\_TOKEN** — auto-generated. **Copy and save this** — it's your login password.
        * **WHATSAPP\_NUMBER** — optional. Enter your phone number to connect WhatsApp later.
        * **AI API keys** — optional. Leave blank if you're only using Adspirer for ad management.

        Complete the purchase and wait for the status to show **Running** (1–2 minutes).
      </Step>

      <Step title="Generate Your Adspirer API Key">
        In a new browser tab:

        1. Go to [adspirer.ai/keys](https://adspirer.ai/keys)
        2. Click **Generate New Key**
        3. Name it "Hostinger server"
        4. Copy the key — it starts with `sk_live_` and **won't be shown again**
      </Step>

      <Step title="Access Your Server's Terminal">
        In Hostinger's hPanel, open the **Terminal** or **SSH Access** for your VPS.
      </Step>

      <Step title="Install the Adspirer Plugin">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw plugins install openclaw-adspirer
        ```
      </Step>

      <Step title="Authenticate with Adspirer">
        Replace `sk_live_your_token_here` with your actual API key:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw adspirer login --token sk_live_your_token_here
        ```
      </Step>

      <Step title="Restart the Gateway">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw gateway restart
        ```
      </Step>

      <Step title="Connect Your Ad Platforms">
        Go to [adspirer.ai/connections](https://adspirer.ai/connections) from any browser and connect your Google Ads, Meta Ads, LinkedIn Ads, or TikTok Ads accounts via OAuth.
      </Step>

      <Step title="Log Into the Dashboard">
        Open `http://your-server-ip:port` in your browser (find the IP and port in Hostinger's Docker Manager). Enter your `OPENCLAW_GATEWAY_TOKEN` to log in.
      </Step>

      <Step title="Connect WhatsApp (Optional)">
        In the OpenClaw dashboard, go to **Channels** → click **Show QR code** → scan with WhatsApp (**Settings → Linked Devices → Link a Device**).
      </Step>

      <Step title="Start Managing Ads">
        Send a message from WhatsApp, Telegram, or the web dashboard:

        > "Show me my Google Ads performance for the last 7 days"

        Your always-on ad agent is live.

        <Card title="Sign up for Adspirer — free to start" icon="rocket" href="https://adspirer.ai/sign-up?utm_source=docs&utm_medium=setup-cta&utm_content=openclaw-hostinger" horizontal>
          15 free tool calls/month. No credit card required. Connect your ad accounts in 2 minutes.
        </Card>
      </Step>
    </Steps>

    <Check>
      Your agent is running 24/7 on Hostinger with Adspirer's 400+ ad tools and the built-in SKILL.md instruction file. It's accessible from WhatsApp, Telegram, Discord, or your web browser.
    </Check>
  </Tab>
</Tabs>

## Remote Server Setup

If you're running OpenClaw on a remote server (VPS, Docker, CI/CD), you can't use the browser-based OAuth login. Instead, use a **Personal Access Token** (API key).

<Steps>
  <Step title="Generate an API Key">
    1. Go to [adspirer.ai/keys](https://adspirer.ai/keys)
    2. Click **Generate New Key**
    3. Give it a name (e.g., "Hostinger server", "CI/CD pipeline")
    4. Copy the token — it starts with `sk_live_` and **won't be shown again**

    <Warning>
      Store your API key securely. Treat it like a password. If compromised, revoke it immediately from the dashboard and generate a new one.
    </Warning>
  </Step>

  <Step title="Authenticate with the API Key">
    <Tabs>
      <Tab title="CLI Flag">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        openclaw adspirer login --token sk_live_your_token_here
        ```
      </Tab>

      <Tab title="Environment Variable">
        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        export ADSPIRER_API_KEY=sk_live_your_token_here
        ```

        The environment variable takes priority over stored config. No `login` command needed.
      </Tab>

      <Tab title="Docker">
        ```dockerfile theme={"theme":{"light":"github-light","dark":"github-dark"}}
        ENV ADSPIRER_API_KEY=sk_live_your_token_here
        ```

        Or pass it at runtime:

        ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
        docker run -e ADSPIRER_API_KEY=sk_live_your_token_here your-image
        ```
      </Tab>

      <Tab title="CI/CD (GitHub Actions)">
        ```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
        env:
          ADSPIRER_API_KEY: ${{ secrets.ADSPIRER_API_KEY }}
        ```

        Add your API key as a repository secret in GitHub Settings.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Connect Your Ad Platforms">
    API keys authenticate you with Adspirer, but you still need to connect your ad platforms from a browser:

    1. Go to [adspirer.ai/connections](https://adspirer.ai/connections) from any machine with a browser
    2. Connect Google Ads, Meta Ads, LinkedIn Ads, or TikTok Ads via OAuth
    3. Your remote server's API key will then have access to those connected accounts
  </Step>

  <Step title="Verify">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    openclaw adspirer status
    ```

    You should see:

    ```
    ✅ Authenticated via API Key
       Server: https://mcp.adspirer.com
       Key prefix: sk_live_a1b2...
    ```
  </Step>
</Steps>

<Note>
  API key limits are tier-based: Free (2 keys), Plus (5), Pro (10), Max (20). Each key can be named, set to expire, and revoked independently.
</Note>

## CLI Commands

| Command                                      | Description                                              |
| -------------------------------------------- | -------------------------------------------------------- |
| `openclaw init`                              | Create `~/.openclaw/openclaw.json` with default settings |
| `openclaw config set tools.profile full`     | Enable bash, file operations, and web tools              |
| `openclaw plugins install openclaw-adspirer` | Install the Adspirer plugin                              |
| `openclaw gateway restart`                   | Reload plugins and register tools                        |
| `openclaw adspirer login`                    | Authenticate via OAuth PKCE (browser-based)              |
| `openclaw adspirer login --token <key>`      | Authenticate with an API key (headless/remote)           |
| `openclaw adspirer logout`                   | Clear stored tokens and API keys                         |
| `openclaw adspirer status`                   | Show auth status, connections, tool count                |
| `openclaw adspirer accounts`                 | List connected ad accounts                               |
| `openclaw adspirer tools`                    | List registered tools by platform                        |
| `openclaw adspirer connect`                  | Open Adspirer to connect ad platforms                    |

## What You Get: The Skill File

Most MCP integrations give you raw tool access. OpenClaw gives you a 14,400-character instruction manual that covers:

* **400+ tools documented:** Every parameter, every return value, every edge case
* **6 complete workflows:** Performance analysis, keyword research, campaign creation (per platform), budget optimization, account management, automation
* **Platform quick reference:** When to use each platform, minimum budgets, best use cases
* **Safety rules:** What to always check first, what requires user confirmation, what never to retry
* **Troubleshooting guide:** Common errors and how to fix them
* **Example prompts:** Real queries you can copy-paste to get started

This isn't configuration. It's training. OpenClaw reads the SKILL.md file and knows how to behave like an expert advertising manager.

## What You Can Do

400+ tools across 6 ad platforms:

| Platform         | Tools | Key Capabilities                                                                                                                       |
| ---------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Google Ads**   | 147   | Keyword research with real CPC data, Search & PMax campaigns, wasted spend analysis, budget optimization, extensions, asset management |
| **Amazon Ads**   | 61    | Sponsored Products, Brands & Display, ASIN/keyword targeting, ACOS & ROAS analytics, budget recommendations                            |
| **LinkedIn Ads** | 55    | B2B targeting (job titles, industries, seniority), sponsored content, lead gen forms, performance analysis                             |
| **Meta Ads**     | 54    | Image/video/carousel campaigns, audience targeting, creative fatigue detection, placement optimization                                 |
| **TikTok Ads**   | 37    | In-feed campaigns, asset validation, performance tracking                                                                              |
| **ChatGPT Ads**  | 31    | Pay-per-click chat-card ads inside ChatGPT responses, launch orchestrator, conversions (pixel + CAPI); created paused                  |

Plus 8 automation tools for scheduling, monitoring, and cross-platform reporting.

## Example Commands

What to actually run once you're set up:

### Google Search Campaign

```
openclaw "Create a Google Search campaign for my consulting firm:
- Service: fractional CFO services for startups
- Target: startup founders and CEOs at Series A-B companies
- Budget: $80/day
- Research keywords with real CPC data
- Add negative keywords for 'jobs', 'salary', 'free'"
```

### Google PMax Campaign

```
openclaw "Set up a Performance Max campaign:
- Product: standing desk, $549 retail price
- Target ROAS: 500%
- Product images: [paste URLs]
- Write compelling headlines and descriptions
- Use my Merchant Center product feed"
```

### Meta Ads Campaign

```
openclaw "Create a Meta image campaign for my online course:
- Product: UX design bootcamp, $599 one-time
- Target: designers and career changers aged 24-38
- Interests: UX design, Figma, product design, career growth
- Budget: $55/day
- Image URL: [paste URL]
- Optimize for registrations"
```

### LinkedIn Lead Gen Campaign

```
openclaw "Launch a LinkedIn sponsored content campaign:
- Product: employee engagement platform
- Target: HR VPs and CHROs at enterprises with 1,000+ employees
- Industries: tech, finance, healthcare
- Budget: $130/day
- Goal: book a product demo
- Image URL: [paste URL]"
```

### Cross-Platform Performance Report

```
openclaw "Generate a full performance report for the last 30 days.
Pull data from all connected platforms.
Include:
- Executive summary with key wins and concerns
- Per-platform metrics: spend, conversions, CPA, ROAS
- Wasted spend analysis (Google keywords + Meta creative fatigue)
- Top 5 recommendations for next month
Format as markdown."
```

## Tool Groups

<Note>
  **Plugin v2026.5.30** adds the free [Diagnostic & Helper tools](/agent-skills/diagnostic-helper-tools) — get-started guidance, launch-readiness checks, error explanations, and "what changed" summaries. Reinstall (`openclaw plugins install openclaw-adspirer`) to pick them up, then discover them at runtime with `action: "list_tools"` on the `diagnostic_and_helper_tools` router.
</Note>

| Group                         | Platform       | Tools                 |
| ----------------------------- | -------------- | --------------------- |
| `google_ads`                  | Google Ads     | 40                    |
| `meta_ads`                    | Meta Ads       | 20                    |
| `tiktok_ads`                  | TikTok Ads     | 4                     |
| `linkedin_ads`                | LinkedIn Ads   | 28                    |
| `manus`                       | Automation     | 8                     |
| `system`                      | Cross-Platform | 4                     |
| `diagnostic_and_helper_tools` | Cross-Platform | 1 router → 13 helpers |

### Filtering

Enable only specific platforms:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
config:
  enabledGroups: ["google_ads", "meta_ads"]
```

Or cherry-pick individual tools:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
config:
  enabledTools: ["echo_test", "get_campaign_performance", "list_campaigns"]
```

## Configuration

| Field              | Type      | Default                    | Description                                                                                                    |
| ------------------ | --------- | -------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `serverUrl`        | string    | `https://mcp.adspirer.com` | MCP server URL                                                                                                 |
| `accessToken`      | string    | —                          | OAuth access token (set by login)                                                                              |
| `refreshToken`     | string    | —                          | OAuth refresh token (set by login)                                                                             |
| `tokenExpiresAt`   | number    | —                          | Token expiry timestamp (set by login)                                                                          |
| `apiKey`           | string    | —                          | Personal access token (`sk_live_...`) for headless auth. Set via `--token` flag or `ADSPIRER_API_KEY` env var. |
| `defaultAccountId` | string    | —                          | Default ad account ID                                                                                          |
| `enabledGroups`    | string\[] | all groups                 | Platform groups to enable                                                                                      |
| `enabledTools`     | string\[] | `[]`                       | Cherry-pick specific tools (overrides groups)                                                                  |
| `requestTimeoutMs` | number    | `60000`                    | HTTP request timeout in ms                                                                                     |

## Tool Safety Model

* **Read tools** (`get_*`, `list_*`, `analyze_*`, etc.) — auto-execute, no confirmation needed
* **Write tools** (`create_*`, `update_*`, `pause_*`, etc.) — agent MUST ask user before executing

## The claw\.json Manifest

The plugin includes a manifest file that defines its metadata and permissions:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "name": "adspirer-ads-agent",
  "version": "1.2.1",
  "displayName": "Adspirer Ads Agent",
  "keywords": [
    "advertising",
    "google-ads",
    "meta-ads",
    "linkedin-ads",
    "tiktok-ads",
    "ppc",
    "mcp"
  ],
  "permissions": {
    "network": [
      "mcp.adspirer.com",
      "www.adspirer.com"
    ]
  }
}
```

This tells OpenClaw that the plugin is an advertising agent, which keywords to associate with it, and which domains it's allowed to access. The network permissions ensure the plugin can only connect to Adspirer's servers — no other external services.

## Safety Features

The skill file includes safety rules. OpenClaw enforces them automatically:

* **All campaigns created PAUSED:** Review before they spend money
* **User confirmation required:** OpenClaw asks before any action that affects spend
* **Read-before-write workflows:** The agent researches keywords before creating campaigns, validates assets before launching
* **Connection status checks:** Always verifies you're managing the correct account first
* **No automatic retries:** If a tool call fails, OpenClaw reports the error instead of retrying blindly
* **Platform-specific minimums:** The agent knows Google Ads requires $10/day minimum, LinkedIn requires $10/day, Meta has no minimum -- and won't let you create campaigns below those thresholds

## Troubleshooting

### "Plugin not found" error

List your installed plugins:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
openclaw plugins list
```

If you don't see `openclaw-adspirer`, re-run the install command from Step 1.

### "Not authenticated" error

Your login session may have expired. Re-authenticate:

```
openclaw adspirer login
```

### "No ad platforms connected" warning

Run the connect command:

```
openclaw adspirer connect
```

Make sure you authorize at least one ad platform (Google, Meta, LinkedIn, or TikTok) in the OAuth flow.

### Tools not working or returning errors

Check your account status at [adspirer.ai](https://adspirer.ai?utm_source=docs\&utm_medium=page\&utm_content=account). Free accounts get 15 tool calls/month. If you've hit the limit, upgrade to Plus ($49/mo for 150 calls) or Pro ($99/mo for 600 calls).

### Skill file not loading

The skill file is bundled with the plugin. If OpenClaw isn't following the documented workflows, try reinstalling:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
openclaw plugins uninstall openclaw-adspirer
openclaw plugins install openclaw-adspirer
```

### "Invalid or expired API key"

Your API key may have been revoked, expired, or mistyped:

1. Go to [adspirer.ai/keys](https://adspirer.ai/keys) and check if the key is still **Active**
2. If revoked or expired, generate a new key
3. Re-authenticate: `openclaw adspirer login --token sk_live_new_key_here`

### "No platform account connected" (with API key)

API keys authenticate you with Adspirer, but you still need to connect your ad platforms via OAuth from a browser:

1. Go to [adspirer.ai/connections](https://adspirer.ai/connections) from any machine with a browser
2. Connect your Google Ads, Meta, LinkedIn, or TikTok accounts
3. Your remote server's API key will then have access to those accounts

### "API key authentication error"

* Ensure the token starts with `sk_live_`
* Check for extra whitespace or line breaks when copying
* If using the environment variable, verify: `echo $ADSPIRER_API_KEY`
* Try generating a new key from [adspirer.ai/keys](https://adspirer.ai/keys)

### Network permission errors

If your firewall blocks the plugin, whitelist these domains:

* `mcp.adspirer.com` (MCP server)
* `www.adspirer.com` (OAuth and account management)

## FAQ

<AccordionGroup>
  <Accordion title="What's the difference between OpenClaw and other MCP clients?">
    Other clients ([Claude Code](/ai-clients/claude-code), [Cursor](/ai-clients/cursor)) give you access to Adspirer's tools. OpenClaw gives you a pre-configured advertising agent with a 14KB instruction manual built in. Less setup, more intelligence out of the box.
  </Accordion>

  <Accordion title="Do I need to install skills separately?">
    No. The SKILL.md file is bundled with the plugin. Other clients require manual skill installation. OpenClaw does it automatically.
  </Accordion>

  <Accordion title="Can I edit the skill file to customize behavior?">
    Yes. The skill file is at `node_modules/openclaw-adspirer/skills/adspirer-ads-agent/SKILL.md` (if installed via NPM) or in the OpenClaw plugins directory. Edit it to change default behaviors, add custom workflows, or modify safety rules. Changes take effect on the next OpenClaw restart.
  </Accordion>

  <Accordion title="Can I manage multiple ad accounts?">
    Yes. Connect multiple Google Ads accounts, multiple Meta Business Managers, etc. Use the `switch_primary_account` command to change which account you're managing, or specify the account ID in your commands.
  </Accordion>

  <Accordion title="How much does this cost?">
    Adspirer pricing is based on tool calls, not ad spend. Free tier: 15 calls/month. Plus: $49/mo for 150 calls. Pro: $99/mo for 600 calls. Max: \$199/mo for 3,000 calls. See [full pricing details](https://www.adspirer.com/pricing).
  </Accordion>

  <Accordion title="Can I use OpenClaw on a remote server or in Docker?">
    Yes. Generate an API key from [adspirer.ai/keys](https://adspirer.ai/keys), then use `openclaw adspirer login --token sk_live_...` or set the `ADSPIRER_API_KEY` environment variable. See [Remote Server Setup](#remote-server-setup).
  </Accordion>
</AccordionGroup>

## Related Documentation

* [Claude Code Setup Guide](/ai-clients/claude-code)
* [Cursor Setup Guide](/ai-clients/cursor)
* [Codex Setup Guide](/ai-clients/codex)
* [Google Ads Integration](/ad-platforms/google-ads)
* [Pricing & Plans](https://www.adspirer.com/pricing)
* [All Documentation](/introduction)
