How to Add an AI Agent for Ads Inside Claude, Cursor, or Codex
By Dino S. · July 19, 2026 · 7 min read
Your coding agent can already write ad copy. Claude, Claude Code, Cursor, and Codex can all draft a hook, a primary text, and a CTA in seconds. What none of them can do on their own is tell you whether that copy is any good — that requires a judgment step the generating model can’t reliably apply to itself.
This is a focused how-to: adding an ai agent for adscapability directly inside the agent you already use, via MCP or a drop-in Skill. If you want the full case for why a gate belongs in the pipeline and how to wire it into a production workflow, that’s the gating guide. This page is just: how do I add it, right now, inside Claude, Cursor, or Codex.
What you're adding
Spendict exposes four tools that become native actions inside your agent once connected:
assess_ad_creative— scores a single ad and returns arun,fix_first, orkillverdict.audit_campaign_structure— checks budget allocation, audience setup, and bid strategy.analyze_campaign_performance— reads live metrics to separate creative fatigue from a targeting problem.strategize_targeting— helps the agent reason about audience and targeting decisions.
Once added, your agent doesn’t need to be told “use Spendict” every time — it can call these tools the same way it calls any other tool in its toolbox, mid-conversation or mid-pipeline.
Option A: MCP connector
Spendict runs a remote MCP server over Streamable HTTP at:
https://www.spendict.com/api/mcp
Claude (claude.ai or the desktop app).Go to Settings → Connectors → Add custom connector, and paste in the endpoint above. You’ll be prompted to sign in once — after that the four tools show up as available actions in any conversation.
Claude Code. One command adds the connector to your CLI session:
claude mcp add --transport http spendict https://www.spendict.com/api/mcp
Cursor and Codex. Both read MCP servers from a config file — add an entry pointing at the same Streamable HTTP endpoint the way you would for any other remote MCP server in that client, then restart the client so it picks up the new connector. The tool names (assess_ad_creativeand the other three) will appear in the agent’s available-tools list once it’s connected.
Option B: the Skill
If your agent environment supports skill files — Claude Code, Cursor, Codex, or Gemini — there’s an even lower-friction path. One command drops the Spendict skill in:
npx skills add spendict/skills
The skill calls Spendict over MCP or the CLI under the hood (you still connect once, as above), and from then on your agent knows to gate ad creative automatically as part of its normal workflow — no explicit invocation required. This is the option most developers reach for once they’ve confirmed the MCP connection works.
Prefer scripting it yourself instead of an agent connector? npm i -g spendict gets you the CLI, and the REST API is documented in the docs.
Using it once it's added
Once connected, the pattern inside a conversation or an automated run looks the same: your agent drafts (or already has) an ad variant, calls assess_ad_creative with the copy, platform, and audience, and reads back a verdict.
run— the ad is ready. The agent moves it forward.fix_first— the tool names a specific failure mode. The agent revises and re-scores.kill— the agent drops the variant and tries a different angle.
The agent reads the verdict and routes on it — it doesn’t get to argue with the score, because the verdict is computed server-side, not by the model.
No key hassle
The MCP path is OAuth, not an API key. There’s nothing to generate, copy, or paste into a config file, and nothing to leak in a screen-share or a committed .env. You approve the sign-in once per client, and the connector stays authorized after that. If you’re wiring Spendict into a script or a backend instead of an agent client, that’s where the REST API with a bearer key applies — the CLI and MCP paths above don’t need one.
Where to go next
That’s the whole setup: pick MCP or the Skill, connect once, and the four tools are available inside your agent. For the deeper walkthrough — building a full gated pipeline with parallel scoring, revision loops, and campaign-structure audits — see the gating guide, or start from the AI agent ad workflows pillar page for the broader pattern. Free tier is 100 calls a month, no card required.
Frequently asked questions
How do I add an ad-scoring agent to Claude or Cursor?
In Claude, go to Settings → Connectors → Add custom connector and enter https://www.spendict.com/api/mcp. In Claude Code, run claude mcp add --transport http spendict https://www.spendict.com/api/mcp. In Cursor or Codex, add the same Streamable HTTP endpoint to the client's MCP config and restart. Alternatively, npx skills add spendict/skills drops in a Skill that uses the same connection.
Do I need an API key?
Not for MCP. The MCP connector uses OAuth — you approve a sign-in once per client, and there's no key to generate or paste. An API key is only needed if you're calling the REST API directly from a script or backend rather than through an agent client.
What can the agent do once added?
Four tools become available: assess_ad_creative (scores a single ad and returns run, fix_first, or kill), audit_campaign_structure (checks budget, audience, and bid setup), analyze_campaign_performance (reads live metrics), and strategize_targeting (targeting decisions). The agent can call any of them mid-conversation or as part of an automated pipeline.
Does it work in Claude Code and Codex?
Yes. Claude Code has a one-line MCP add command. Codex and Cursor both support remote MCP servers via their config file — add the same Streamable HTTP endpoint there. The Skill option (npx skills add spendict/skills) also works across Claude Code, Cursor, Codex, and Gemini.
What does it cost?
The free tier includes 100 calls per month with no credit card required — enough to connect and test the integration. Paid plans start at $19/month for higher volume. Full pricing is on the pricing page.