adloop
CLAUDE.md277 starsChanged 4 months agoMITView on GitHub
MCP server connecting Google Ads + Reddit Ads + GA4 into one AI-driven feedback loop inside your IDE. All tool usage rules, safety protocols, orchestration patterns, GAQL reference, GDPR awareness, and marketing best practices live in a single canonical file: Read and follow .claude/rules/adloop.md for all AdLoop MCP tool orchestration. That file is the complete guide for combining AdLoop's tools. It covers: - Tool inventory with parameters and when to use each - 9 safety rules (budget caps, dry-run defaults,…
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
All tool usage rules, safety protocols, orchestration patterns, GAQL reference, GDPR awareness, and marketing best practices live in a …
- Very specific: line 68
All mutations logged to ~/.adloop/audit.log
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AdLoop
MCP server connecting Google Ads + Reddit Ads + GA4 into one AI-driven feedback loop inside your IDE.
Quick Reference
uv sync # Install dependencies
uv run adloop init # Interactive setup wizard
uv run adloop # Start MCP server
pytest # Run tests
python scripts/sync-rules.py # Sync rules: .cursor/rules/ -> .claude/rules/Architecture
src/adloop/
├── __init__.py # Entry point — routes 'adloop init' vs MCP server
├── server.py # FastMCP server — all tool registrations + toolset tags
├── config.py # Config loader (~/.adloop/config.yaml)
├── auth.py # OAuth 2.0 (user-supplied credentials, headless fallback) + service accounts
├── cli.py # Interactive setup wizard (own Google Cloud project + auto-discovery)
├── crossref.py # Cross-reference tools (GA4 + Ads combined)
├── tracking.py # Tracking validation + code generation
├── ga4/ # GA4 Data + Admin API (reports, realtime, events)
├── ads/ # Google Ads API (read, write, GAQL, forecasting, PMax, recommendations)
├── reddit/ # Reddit Ads API v3 (own OAuth app, REST client, reads, PAUSED-creating writes)
└── safety/ # Guards, previews, audit loggingOrchestration Rules
All tool usage rules, safety protocols, orchestration patterns, GAQL reference, GDPR awareness, and marketing best practices live in a single canonical file:
Read and follow .claude/rules/adloop.md for all AdLoop MCP tool orchestration.
That file is the complete guide for combining AdLoop's tools. It covers:
- Tool inventory with parameters and when to use each
- 9 safety rules (budget caps, dry-run defaults, Broad Match prevention, pre-write validation)
- 16 orchestration patterns (performance review, PMax analysis, recommendations, ad creation, tracking diagnosis, etc.)
- GAQL quick reference with syntax, common queries, and gotchas
- GDPR consent awareness for EU markets
- Ad copy character limits and marketing best practices
Documentation Site
User docs live in the sibling repo ../adloop-docs (Mintlify,
docs.getadloop.com — push to main deploys). After any tool or toolset
change here, regenerate the docs tool reference and push it:
cd ../adloop-docs && uv run --project ../adloop python scripts/generate_tools.pyreference/tools.mdx is generated from the live registry — never edit it
by hand, and never state tool counts in prose anywhere (they rot).
Safety Model (Summary)
- Two-step writes: draft -> preview -> confirm_and_apply
- dry_run=true by default; require_dry_run in config overrides
- two_phase_apply in config: real applies refused (DRY_RUN_REQUIRED) until the plan had one dry-run pass; always on for cloud tenants
- Google Ads dry runs send the exact mutates with validate_only=True (nothing executes)
- Budget caps enforced; bid raises capped by max_bid_increase_pct (Google Ads and Reddit)
- New campaigns/ads created as PAUSED; new Google Ads ad groups are enabled but cannot serve until an ad is enabled
- Broad Match + Manual CPC refused when creating campaigns, flagged when adding keywords
- All mutations logged to ~/.adloop/audit.log
Key Files
| File | Purpose |
.claude/rules/adloop.md | Orchestration rules (synced from .cursor/rules/adloop.mdc) |
.claude/commands/ | Slash commands for common workflows |
.mcp.json | MCP auto-discovery for this project |
.cursor/rules/adloop.mdc | Canonical rules source (Cursor format) |
config.yaml.example | Documented config template |
scripts/sync-rules.py | Keeps .claude/rules/ in sync with .cursor/rules/ |
In this repository2 other files it gives its agents.
- .cursor/rules/adloop.mdcCursor rule
- .cursor/rules/releasing.mdcCursor rule
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

