Works with Claude Code, Cursor, Codex and any agent that can make HTTP requests.
Your agent, setting up yourshop.com
You
Set up AgentFirstStack for this project. It's free, open-source infrastructure made for agents: web analytics, a tag manager with server-side conversion tracking, and email inboxes. You can do all of it yourself; there is no signup form or verification step.
1. Read https://agentfirststack.com/llms.txt. It is the complete manual.
2. Get an API key with one request:
curl -X POST https://agentfirststack.com/v1/signup
Save the api_key in this project's .env as AGENTFIRSTSTACK_API_KEY.
The same key works for analytics, tags and mail.
3. Set up what this project needs, and verify each step with the checks the manual describes:
- Analytics: create a site for the production domain, add the tracking snippet, then run verify.
- Conversion tracking: create a tags container, scan the site, define the conversions that matter here (sign-ups, purchases, leads), validate, test and publish.
- Email: create an inbox to use when signing up for third-party services, and use wait_for_email to receive their verification codes.
4. If you support MCP, add the servers listed in the manual so you can call the tools directly.
When you're done, tell me what you set up, how you verified it, and anything that needs me, such as ad platform credentials.
Read the manual
GET agentfirststack.com/llms.txt
Got one key for analytics, tags and mail
POST /v1/signup
Analytics is live on yourshop.com and receiving visits
Purchase tracking set up for GA4, Google Ads and Meta, counted once each
validate: 0 errors, GA4 test event accepted
Signed up for Stripe with signups@agentfirststack.com
wait_for_email: { "codes": ["482913"] }
Done. To finish ad tracking I need your Meta access token and Google Ads account ID; I'll test both and publish. Everything else is set up and verified.
Three services, one key
Each one is a REST API and an MCP server, documented in a plain text manual your agent reads first.
Analytics
Instead of Google Analytics
Country, region and city, read at Cloudflare's edge
Traffic sources, including ChatGPT, Perplexity and other AI assistants
Goals, revenue, funnels and a realtime view
No cookies, so no consent banner for analytics
verify confirms the snippet and the first visits.
Tags
Instead of Google Tag Manager
Browser pixels and server-side conversion APIs from one snippet
GA4, Google Ads, Meta and TikTok, each counting a conversion once
Keeps ad click IDs, so late purchases still credit the ad
Draft, preview, publish and roll back
test_destination returns each platform's own answer.
Mail
Instead of a Gmail account per project
A new inbox in one request
Verification codes and links pulled out for you
Read, reply and send
Your own domain, with DNS set up for you on Cloudflare
wait_for_email returns the moment mail lands.
Built for agents, not dashboards
One request to an account
No email, no captcha, no waiting for approval.
API and MCP for everything
Nothing is hidden behind a settings page.
A manual in plain text
/llms.txt covers every endpoint, tool and field, with examples.
Every step can be checked
The agent confirms its own work instead of guessing.
Safe to retry
Creating the same thing twice returns the first one.
Errors that explain the fix
Each one carries a hint the agent can act on.
Free to use. Open source.
Hosted
Free, with fair-use limits that keep it that way:
10 new accounts per hour from one network
50 sites, 50 tag containers and 50 inboxes per account
Inboxes on agentfirststack.com reply to people who wrote to them, up to 50 recipients a day. Add your own domain to send to anyone.
Mail on shared addresses is kept for 30 days
Self-host
MIT licensed. Each service is a Cloudflare Worker you can run in your own account.
git clone https://github.com/StartGlobal-AI/agentfirststack
cd agentfirststack && pnpm install
cd analytics && pnpm run deploy