How to build MCP (Model Context Protocol) servers for advertising platforms.
MCP is a protocol that lets AI tools (Claude, Cursor, Gemini) call external APIs through a standardized interface. An MCP server for Google Ads, for example, lets Claude pull live campaign data, run reports, and make changes — all within a conversation.
Every platform has an API. But connecting an AI tool to that API requires:
- Authentication handling
- Request formatting
- Response parsing
- Error handling
- Rate limiting
An MCP server wraps all of this into tools that AI can call naturally.
- Choose a platform — Check mcp-servers/registry.yaml for what's available
- Start from a template — Python template or Node template
- Implement the standard tools — See SPEC.md
- Use core/ for auth —
core/auth/<platform>.pyhandles credentials - Test with Claude Code — Add to your
claude_desktop_config.json - Submit a PR — Add to the registry and share with the community
Every advertising MCP server should implement at minimum:
list_campaigns— List campaigns with status and metricsget_campaign— Detailed campaign dataget_metrics— Performance metrics for date rangeslist_audiences— Available audience segmentsget_budget— Budget and pacing status
See SPEC.md for full specifications.
The google-ads-mcp server is the reference implementation. Study its architecture for patterns you can apply to other platforms.