Connect OpenClaw to Adflitz
OpenClaw takes the server as a small JSON entry and uses an API key from its environment. It works on servers because nothing needs a browser on that machine.
Before you start
- Sign-in method: API key. The server address is
https://adflitz.com/api/mcp. - For an API key create one under Settings, then API keys, and allow agents on the project under Settings, then Agents. The key is shown once, so put it straight into an environment variable.
- Pick the lowest permission that does the job. Access levels explains read, draft and publish.
Steps
- Create an API key in Adflitz (Settings, API keys) and allow agents on the project (Settings, Agents).
- Export the key where OpenClaw runs, so a service sees it in its own environment.
- Run the commands below to register the server, reload and probe it. A working probe lists the Adflitz tools.
- Paste the check prompt, or the setup prompt below to let OpenClaw do the steps.
Copy and paste
Export the key where OpenClaw runs, register the server, then reload and probe it. Single quotes keep ${ADFLITZ_API_KEY} as a reference instead of writing the key into the config. Needs an OpenClaw version with the mcp reload and probe commands. A working connection lists the Adflitz tools.
export ADFLITZ_API_KEY=apk_YOUR_KEY
openclaw mcp set adflitz '{"url":"https://adflitz.com/api/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${ADFLITZ_API_KEY}"}}'
openclaw mcp reload
openclaw mcp probe adflitzOr paste this into OpenClaw and let it set itself up
Help me connect Adflitz to OpenClaw as an MCP server.
1. Run: openclaw mcp set adflitz '{"url":"https://adflitz.com/api/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${ADFLITZ_API_KEY}"}}' (keep the single quotes so the variable stays a reference).
2. The key is already in the environment as ADFLITZ_API_KEY. Do not ask me to paste the key into this chat and never print it.
3. Run openclaw mcp reload, then openclaw mcp probe adflitz and tell me how many tools it lists.
4. Call the adflitz_overview tool and tell me which projects and ad accounts you can see. If anything fails, show me the exact error.Check that it worked
Open a new conversation in OpenClaw and paste this prompt. It only reads, so it is safe to run on a live account.
Check prompt
Use Adflitz to give me the workspace overview. List my projects, which ad platforms are connected and how many drafts are waiting for approval. Do not change anything.
A good answer names your workspace and plan, lists your projects with the permission each one grants, shows the connected platforms and tells you how many drafts are waiting. If the assistant says it cannot find an Adflitz tool, jump to troubleshooting below.
Troubleshooting
- Probe fails with 401: the variable ADFLITZ_API_KEY must be set in the environment OpenClaw runs in (a service needs it in its own environment, not only in your shell).
- If transport is left out OpenClaw assumes the older SSE transport. Keep "transport":"streamable-http".
- Unknown subcommand: update OpenClaw, older versions do not have mcp reload or mcp probe.
- 401 or “unknown or revoked”: send the whole key, starting with apk_, as a Bearer token with nothing around it. A revoked key never works again, so create a new one under Settings → API keys.
- The tools list is empty or calls say forbidden: open Settings → Agents and allow agents on the project, and give the key at least the permission the tool needs (read, draft or publish).
- The overview works but lists no ad accounts: connect them first, see Connect ad accounts.
What to ask next
- How did my ads do over the last 14 days? Group it by campaign and point out what needs attention.
- Draft a Search campaign for our two best services and file it as a draft for my approval.
- Which campaigns spent without results this week? Suggest what to pause and give me the reason for each.
- Save the three most useful competitor ads for this project to my swipe file.
Changes you ask for become drafts that you review first. Read Drafts and approvals to see how a draft is checked and approved.
Other clients
ChatGPTClaude.aiClaude CodeCursorCodexGemini CLIPerplexityGrok BotHermes Agentn8nAny other MCP client
Questions about connecting your AI or your ad accounts? Write to contact@adflitz.com or open the support page.