Connect Codex to Measurebase
Measurebase speaks MCP - the open protocol AI assistants use to reach external tools - and so does OpenAI Codex. Add Measurebase as a remote MCP server and your tracking answers arrive next to your code, in the app, your editor or the terminal.
What you can do with the MCP
The MCP answers questions about your data and your tracking, sets up Measurebase with you, and improves your tracking settings. Ask the way you would ask a colleague. These are starting points, not commands.
Ask about your Measurebase data
- "How much traffic did we process this month, and which domain was busiest?"
- "How far into my request quota am I this billing cycle?"
- "Did my test hit from five minutes ago arrive?"
- "Show me the last 50 GA4 hits with a 4xx status."
- "Which bots hit my tagging server this week, and how much traffic was that?"
Ask about your tracking setup
- "Is anything wrong with my tracking?"
- "What is failing on my site right now? Show the top errors from the last 24 hours."
- "Why did purchases drop on Tuesday?"
- "Is Enhanced Ad Blocker Protection actually working on my site?"
- "Compare last week's consent-denied share to the week before."
Ask about your Google Tag Manager containers
- "Audit my containers."
- "What did last night's tracking audit find on my shop?"
- "Which Tag Manager containers can I link?"
Ask about your GA4 data
- "What were my top landing pages last month?"
- "How many users came in per channel in September?"
- "Which events count as conversions?"
Ask about your Google Ads and Meta Ads data
- "How are my Google Ads campaigns doing?"
- "Export the cost per campaign for September."
- "How did my Meta campaigns do last month?"
Answers about GA4, Google Ads and Meta need that account linked to your domain in Measurebase.
Set up Measurebase
- "Add shop.example.com and email the install instructions to my developer."
- "Generate the tracking script for my new domain."
- "Verify the DNS record for my new domain."
- "Link my GA4 property."
- "Turn on Cookie Keeper."
Improve your tracking settings
- Google Tag Manager: "Propose fixes for what the audit found and put them in a workspace."
- GA4: "Mark purchase as a key event in GA4."
- Google Ads: "Set up Google Ads for generate_lead."
- Meta: "Send a test event to Meta."
Tag Manager changes land in a workspace named Measurebase, and you preview and publish them yourself. Changes in GA4 and Google Ads go live at once, because those tools have no draft, so they need your confirmation first.
Manage alerts, clients and your team
- "Are there any open alerts on my accounts?"
- "Which of my clients need attention?"
- "Mute the DNS alert on my staging domain until I fix it."
- "Set the no-data alert for my shop to 12 hours."
- "Invite anna@example.com as editor."
Codex answers with your live data: statistics, request types, browser and bot breakdowns, Consent Mode v2 signals, request logs, alerts, plan usage, and the ad-block detection status - across every account you're a member of.
Connect in two minutes
- In the ChatGPT desktop app, open Settings and select MCP servers. In the Codex IDE extension, open the gear menu and select MCP servers.
- Select Add server, enter the name
measurebase, choose Streamable HTTP and enter this URL:
https://mcp.measurebase.com/mcp
- Save the server, then select Restart (Restart extension in the IDE).
- Select Authenticate next to the server, sign in to Measurebase and check the consent screen that spells out what it gets.
- Click Allow. Type
/mcpto see the connected server, then ask away.
In the terminal
The ChatGPT desktop app, the Codex CLI and the IDE extension share one configuration, so you only add the server once. To add it by hand, put this in ~/.codex/config.toml:
[mcp_servers.measurebase]
url = "https://mcp.measurebase.com/mcp"
Then start the sign-in:
codex mcp login measurebase
Run codex mcp list to see your configured servers, or type /mcp in Codex.
🔒 Read-only by design
New connections are read-only unless you explicitly tick read & write on the consent screen - and read-only means exactly that: it can never change anything, not your domains, not your settings, not your tokens. With write access the assistant can also toggle power-ups, verify DNS, generate tracking scripts, run a tracking audit, propose fixes and apply them into the Measurebase workspace in your Tag Manager container (it never publishes), and set up new accounts and domains (returning the exact DNS record to add) - never more than your own role on each account allows, and Auto Grant Consent is excluded permanently.
Prefer a token?
You can skip the OAuth flow. Create a personal API token in the dashboard under Settings → API tokens (read-only by default, valid until you revoke it), put it in an environment variable, and name that variable in the server entry:
bearer_token_env_var = "MEASUREBASE_TOKEN"
The token itself stays out of the file, so a project's .codex/config.toml can go into version control without it.
How access and privacy work
- Personal, not account-wide. A connection authenticates as you and follows your own memberships: it sees the accounts you can see, nothing else. Colleagues connect for themselves.
- Your roles apply, live. Every request re-checks your membership and role on the account it touches. Lose access to an account and the connection loses it that same second.
- Revocable in one click. Every connection shows up under Settings → API tokens - OAuth ones included. Revoke it there and the connection is dead immediately.
- Nothing is stored in between. The connector service keeps no credentials and no data; it forwards your token to the Measurebase API over TLS and returns the answer. Only a hash of any token is ever stored server-side.
- Standards, not improvisation. The flow is OAuth 2.1 with mandatory PKCE and single-use, short-lived authorization codes.
🤝 For agencies
Your connection follows your agency access too: clients who approved your link are queryable in the same conversation. "Which of my clients had alerts this week?" is one question instead of ten dashboard visits.