Quickstart: MCP / agent path¶
Monetize an MCP-capable agent (Claude Desktop/Code, OpenAI Agents SDK, LangGraph, n8n, ...) in three steps. Time to first ad: about 5 minutes.
1. Get your fetch key¶
Advertising.chat is in private beta —
request access if you don't have an
account yet. Sign in to the
Advertising.chat Console and copy your
fetch key — new accounts get one automatically, shown on Get Started
(also under API Keys,
/admin). That is the only
credential you need.
2. Add the AdKit MCP server¶
Add this to your agent host's MCP configuration (shown here in the
mcpServers format used by Claude Desktop and most hosts):
{
"mcpServers": {
"adchat": {
"command": "npx",
"args": ["-y", "@advertising-chat/mcp"],
"env": {
"ADCHAT_API_KEY": "YOUR_FETCH_KEY"
}
}
}
}
That is all the configuration a publisher needs — fetch_ad fills with a real
ad out of the box.
Restart the host. Your agent now has two tools:
| Tool | What it does |
|---|---|
fetch_ad |
Fetches one sponsored message for the current conversation. Takes a conversation_context summary (used only to select the ad) and an anonymous subscriber id (enables frequency capping). Returns the ad with click-tracked URLs and a disclosure reminder, or no_ad. |
record_event |
Reports engagement: click, or conversion with optional value/currency. |
3. Install the Ad Skill¶
The tools give your agent the ability to serve ads; the Ad Skill gives it the judgment — when to fetch, how to disclose, how often. Add its "Instructions for the assistant" section to your agent's system prompt or skill library.
4. See your first ad¶
Ask your agent something in its domain, let it finish helping, and wrap
up ("thanks, that's all!"). At the pause point the agent calls
fetch_ad and presents something like:
Sponsored: Acme Coffee Grinder — the perfect gift for coffee lovers. Shop now
Click the link: it records the click and redirects to the advertiser. That's a complete, measured, revenue-earning impression — you're done.
Verify without an agent (optional)¶
You can exercise the same serving path with plain HTTP:
curl -X POST "https://ads.advertising.chat/v1/fetch/v2?key=YOUR_FETCH_KEY" \
-H "Content-Type: application/json" \
-d '{"context": "User asked for gift ideas for a coffee lover."}'
A 204 response means there was no good ad to show right now (normal —
continue without one).
Next¶
- The Ad Skill — the full etiquette pack
- Node SDK quickstart — for server-side control
- Ad events reference — what gets measured