Connect n8n to Measurebase
Measurebase speaks MCP - the open protocol AI assistants use to reach external tools - and n8n's AI Agent can call MCP servers as tools. That turns your tracking data into something a workflow can act on: a Monday-morning digest per client, an alert forwarded to the right channel, a weekly consent check.
What you can ask
- "How much traffic did we process this month, and which domain was busiest?"
- "Are there any open alerts on my accounts?"
- "Is Enhanced Ad Blocker Protection actually working on my site?"
- "Did my test hit from five minutes ago arrive?"
- "How far into my request quota am I this billing cycle?"
- "Compare last week's consent-denied share to the week before."
- "Generate the tracking script for my new domain."
The agent 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 Measurebase dashboard, create a personal API token under Settings โ API tokens. Read-only is the default and enough for reporting; a workflow that should toggle power-ups needs a read & write token.
- In n8n, add an AI Agent node and attach an MCP Client Tool node under its Tools.
- Configure the tool: Endpoint
https://mcp.measurebase.com/mcp, Server Transport HTTP Streamable, Authentication Bearer, and a credential holding the token. - Give the agent its task in the prompt - "Summarise this week's traffic, open alerts and consent rate for every account I can see" - and connect a Slack, email or Google Sheets node to deliver the answer. A Schedule Trigger makes it recurring.
๐ Tokens, not OAuth
A workflow runs unattended, so it authenticates with a token you created for it (n8n's MCP Client Tool also accepts OAuth2 credentials, but the consent screen expects a person in front of a browser). Create a separate token per workflow and revoke it under Settings โ API tokens when the workflow retires.
Workflows worth building
- Client digest. Every Monday: requests, purchases, consent share and open alerts per client, one Slack message per account manager.
- Alert routing. Every 15 minutes: any newly opened alert goes to the channel or ticket queue of the client it belongs to.
- Onboarding watch. Daily: domains still waiting on DNS or without a first hit, so nobody falls through the cracks after signup.
๐ 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, 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.
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.