Marketer MCP Setup Guide
Five steps to connect Claude to BigQuery and start asking plain-English questions about client data.
- Make sure Alyssa has confirmed your GCP access is provisioned. If you try to run through this before she's set up your permissions, the final test step will fail.
- You'll need Claude Code installed first (Step 1 below) — the setup script registers BigQuery as an MCP server in Claude, so Claude needs to exist on your machine before the script runs.
- Mac: You'll need temporary admin access to run the script. Open the Self Service app → Admin on Demand before continuing.
- Windows: Open PowerShell by right-clicking it and choosing Run as administrator. Also right-click the downloaded
.ps1file → Properties → check Unblock before running it.
Quick Setup (Recommended)
We've packaged the entire setup into a single script per OS. Download it and run it — it installs the Google Cloud CLI, downloads the MCP toolbox, registers the BigQuery connection in Claude Code, and walks you through Google sign-in. Total time ~5 minutes after Claude Code is installed.
Mac — Setup Script
The script installs Homebrew (if not already present), installs the gcloud CLI via Homebrew, downloads the MCP toolbox, registers the BigQuery MCP in Claude Code, and runs Google sign-in. Safe to re-run.
Then in Terminal:
chmod +x ~/Downloads/setup-mac.sh
~/Downloads/setup-mac.sh
Windows — Setup Script
The script downloads the Google Cloud CLI installer, installs the MCP toolbox, registers the BigQuery MCP via managed-mcp.json, and runs Google sign-in.
Right-click the downloaded .ps1 → Properties → check Unblock at the bottom → OK. Then in a PowerShell window opened as administrator (Step 2):
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
.\Downloads\marketer-pipeline-setup-windows.ps1
@aimclear.com account and pick any project — it doesn't matter which one. The script triggers a second sign-in at the very end, and that's the one that actually authenticates your BigQuery access.
managed-mcp.json the script writes) or Option B (the older user-scoped claude mcp add). Either method works — pick whichever fits your environment.
What This Enables
What this enables today:
- Marketers ask questions like "Which channel had the best ROAS last week?" directly inside Claude
- Claude inspects the BigQuery schema, writes the SQL itself, runs it, and returns a marketer-friendly summary
- All access is read-only at multiple layers, so marketers cannot accidentally damage client data
Step 1 — Install Claude Code
Claude Code is the AI assistant you'll use for everything. Install it before running the setup script.
- Go to claude.ai/download and download the Mac app
- Open the downloaded
.dmg, drag Claude to your Applications folder, and launch it - Sign in with your Anthropic account (or create one if you don't have one yet)
- Go to claude.ai/download and download the Windows installer
- Run the installer and follow the prompts
- Launch Claude and sign in
Once Claude is open and you're signed in, don't close it — the setup script needs the claude command to be available in your terminal.
Step 2 — Open Your Terminal
Everything in this setup is done by typing commands into a terminal window. Here's how to open one.
- Press Cmd + Space to open Spotlight Search
- Type Terminal and press Enter
- A black or white window appears with a command prompt — that's your terminal
- Open the Self Service app (it's in your Applications folder or Dock)
- Find and click Admin on Demand
- Follow the prompts — this gives you a short window of elevated permissions to run the install
- Click the Start menu (Windows key) and type PowerShell
- Right-click Windows PowerShell and choose Run as administrator — the setup script writes to
C:\Program Files\ClaudeCode\, which requires admin rights - A blue window appears with a command prompt — that's your terminal
Step 3 — Run the Setup Script
This script handles everything — installing the Google Cloud CLI, downloading the toolbox, registering the BigQuery connection in Claude, and authenticating your Google account. You only need to run it once.
The download links are also in Quick Setup at the top of the page.
Download setup-mac.sh, then in Terminal:
chmod +x ~/Downloads/setup-mac.sh
~/Downloads/setup-mac.sh
What to expect during the script (Mac)
- A macOS system dialog may pop up saying "The xcode-select command requires the command line developer tools" — click Install and wait for it to finish (takes a few minutes), then the script will continue
- Homebrew will install automatically if you don't already have it — it'll ask you to press Enter to confirm, then prompt for your Mac password (both are normal). Takes a couple of minutes.
- Your Mac password is required when the script writes
managed-mcp.jsonto/Library/Application Support/ClaudeCode/(this is what registers BigQuery as an enterprise-managed MCP — Claude Code and Claude Desktop both pick it up automatically). The Admin on Demand step from Step 2 covers this. - If Claude Desktop is installed, it'll also be wired up additively (existing MCP entries are preserved)
- A browser window will open asking you to sign in — use your
@aimclear.comGoogle account - You'll see a "pick a project" screen — choose any project, it doesn't matter which
- A second browser sign-in will appear near the end — complete that one too, it's what actually grants Claude access to your data
Step A — Allow scripts to run (one-time per user). In a PowerShell window opened as administrator (Step 2):
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Type Y and press Enter when prompted.
Step B — Download the script: marketer-pipeline-setup-windows.ps1
Step C — Unblock the downloaded file. Right-click the .ps1 file → Properties → check Unblock → OK. Or in PowerShell:
Unblock-File -Path "$env:USERPROFILE\Downloads\marketer-pipeline-setup-windows.ps1"
Step D — Run it:
.\Downloads\marketer-pipeline-setup-windows.ps1
What to expect during the script (Windows)
- A Google Cloud SDK installer window will open — click through with default options
- A browser window will open asking you to sign in — use your
@aimclear.comGoogle account - You'll see a "pick a project" screen — choose any project, it doesn't matter which
- A second browser sign-in will appear near the end — complete that one too, it's what actually grants Claude access to your data
- The script writes
managed-mcp.jsontoC:\Program Files\ClaudeCode\, registering BigQuery as an enterprise-managed MCP — this means both Claude Code and Claude Desktop pick it up automatically without per-user CLI configuration - If Claude Desktop is installed, it'll also be wired up additively (your existing MCP entries are preserved)
- If Claude Desktop isn't found, the script prompts you to install it — you can skip this and re-run later
- After the script finishes, close and reopen Claude Code before testing
BIGQUERY_PROJECT? The script registers the BigQuery MCP with an env var BIGQUERY_PROJECT=marty-search-console-ga4-api. This is the project where BigQuery job costs are billed — it is not a restriction on which client projects can be queried. You can query any project you have IAM access to using fully qualified table names; Claude handles that automatically. One MCP entry covers all clients.
Step 4 — Test It Works
Open a fresh Claude conversation and ask:
Claude should list the client projects Alyssa has provisioned for you. If it does, you're done — BigQuery data is now available in every Claude conversation.
If it returns an error or an empty list, see Troubleshooting below or message Timothy.
Manual Setup (Reference)
The script in Step 3 does all of this automatically. These steps are here in case you need to re-run one piece, or if the script fails partway through.
Show manual steps
Install Google Cloud CLI
macOS (with Homebrew):
brew install --cask google-cloud-sdk
macOS (without Homebrew):
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
Windows: download and run GoogleCloudSDKInstaller.exe
Install the MCP Toolbox
macOS (Apple Silicon):
mkdir -p ~/bin
curl -fsSL -o ~/bin/toolbox https://storage.googleapis.com/genai-toolbox/v0.32.0/darwin/arm64/toolbox
chmod +x ~/bin/toolbox
xattr -d com.apple.quarantine ~/bin/toolbox 2>/dev/null || true
macOS (Intel):
mkdir -p ~/bin
curl -fsSL -o ~/bin/toolbox https://storage.googleapis.com/genai-toolbox/v0.32.0/darwin/amd64/toolbox
chmod +x ~/bin/toolbox
xattr -d com.apple.quarantine ~/bin/toolbox 2>/dev/null || true
xattr line? macOS Gatekeeper will refuse to run the unsigned toolbox binary with "cannot be opened because the developer cannot be verified." Removing the quarantine attribute lets it run.
Windows (PowerShell):
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Invoke-WebRequest -Uri "https://storage.googleapis.com/genai-toolbox/v0.32.0/windows/amd64/toolbox.exe" -OutFile "$env:USERPROFILE\bin\toolbox.exe"
Authenticate to Google
gcloud auth application-default login
Sign in with your @aimclear.com account. You only need to do this once per machine.
--scopes=https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery. Without it you get Permission denied while getting Drive credentials. Most pure-BigQuery setups don't need this.Register the BigQuery connection in Claude
Two registration options. The setup script in Step 3 uses Option A (enterprise-managed MCP, picked up by both Claude Code and Claude Desktop). Use Option B if you need a per-user registration (e.g. you can't get sudo on a Mac and want to skip the system-wide config).
Option A — Enterprise managed MCP (recommended)
Write a single config file that both Claude Code and Claude Desktop honor automatically. No claude CLI required.
Mac path: /Library/Application Support/ClaudeCode/managed-mcp.json (requires sudo):
sudo mkdir -p "/Library/Application Support/ClaudeCode"
sudo tee "/Library/Application Support/ClaudeCode/managed-mcp.json" > /dev/null <<'EOF'
{
"mcpServers": {
"bigquery": {
"type": "stdio",
"command": "/Users/YOURNAME/bin/toolbox",
"args": ["--prebuilt", "bigquery", "--stdio"],
"env": { "BIGQUERY_PROJECT": "marty-search-console-ga4-api" }
}
}
}
EOF
Windows path: C:\Program Files\ClaudeCode\managed-mcp.json:
$dir = "C:\Program Files\ClaudeCode"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
@'
{
"mcpServers": {
"bigquery": {
"type": "stdio",
"command": "C:\\Users\\YOURNAME\\bin\\toolbox.exe",
"args": ["--prebuilt", "bigquery", "--stdio"],
"env": { "BIGQUERY_PROJECT": "marty-search-console-ga4-api" }
}
}
}
'@ | Set-Content -Path "$dir\managed-mcp.json" -Encoding UTF8
Option B — Per-user Claude Code registration (fallback)
Claude Code (macOS):
claude mcp add --scope user bigquery ~/bin/toolbox \
--env BIGQUERY_PROJECT=marty-search-console-ga4-api \
-- --prebuilt bigquery --stdio
Claude Code (Windows PowerShell):
claude mcp add --scope user bigquery "$env:USERPROFILE\bin\toolbox.exe" `
--env BIGQUERY_PROJECT=marty-search-console-ga4-api `
-- --prebuilt bigquery --stdio
Verify (either platform):
claude mcp list
You should see bigquery — ✓ Connected.
Claude Desktop users
Edit the config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"bigquery": {
"command": "/Users/YOURNAME/bin/toolbox",
"args": ["--prebuilt", "bigquery", "--stdio"],
"env": {
"BIGQUERY_PROJECT": "marty-search-console-ga4-api"
}
}
}
}
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bigquery": {
"command": "C:\\Users\\YOURNAME\\bin\\toolbox.exe",
"args": ["--prebuilt", "bigquery", "--stdio"],
"env": {
"BIGQUERY_PROJECT": "marty-search-console-ga4-api"
}
}
}
}
Use double backslashes in the command path.
Restart Claude Desktop fully (quit + reopen) for the change to take effect.
Daily Use
Good question patterns
Marketers don't need to know SQL or BigQuery internals. Just ask in natural language. Examples that work well:
- "Summarize last week's paid media performance across channels."
- "Which audiences had the highest revenue per session in the last 30 days?"
- "What landing pages are getting the most organic traffic this month? Has that changed vs. last month?"
- "Why did sessions drop on Tuesday? Was it a specific source?"
- "Give me a 3-bullet summary I could put in a client status email about Marty's traffic last week."
Just refer to the client by name — Claude will look up which project they're in and route the query there. Example: "For the Amsoil account, how did paid search perform last week?"
Things to know
- Each query costs money. BigQuery charges by data scanned (~$5 per TB). Most queries are pennies, but a query that scans millions of rows can add up. Claude will write efficient queries by default; if you ask for a giant unfiltered scan, it'll do it.
- Data freshness depends on each client's ingestion setup. GA4 → BigQuery exports are typically 24-48h delayed. Search Console exports are similar. Don't expect "real-time" answers.
- Claude can be wrong. The SQL it generates is grounded in real schema, but it can still misinterpret a column. Sanity-check before sharing externally — eyeball the numbers, ask Claude to show its SQL.
- Audit logs exist. Every query you run is logged with your Google identity. This is a feature, not a worry: it means we can always figure out what was asked, by whom, when.
If something looks weird
- Ask Claude to "show me the SQL you ran" — it'll print it
- Ask "what columns are actually in the table you queried?" — confirms it's reading the right schema
- Ask "are there other tables that might be more relevant?" — Claude often picks the simplest table; sometimes a richer one exists
FAQ
Q: Can I use this for clients I don't normally work with?
Only if you've been added to that client's IAM grants. Ask your account lead to coordinate with Alyssa.
Q: My answer looks wrong. What do I do?
Ask Claude to show the SQL it ran and explain its logic. If the SQL looks wrong, ask Claude to try a different approach. If it consistently struggles, message Timothy — the schema may need better documentation.
Q: Can I save a question/dashboard?
Not yet. For now, repeat the question or save the answer in a doc. Saved queries / saved views is on the roadmap.
Q: Can I export the data I get back to Excel / Sheets / Looker?
Claude can format results as a CSV-shaped table that you copy out. For larger exports, we'd build a different tool — this MCP is optimized for "quick questions in plain English," not "pull a 50K-row dataset."
Troubleshooting
bigquery-X — ✗ Failed to connect after claude mcp list
Check, in order:
- Toolbox binary is present and executable:
~/bin/toolbox --versionshould print a version - ADC is set up:
gcloud auth application-default print-access-tokenshould print a token - The configured
BIGQUERY_PROJECTexists and you have access:gcloud projects describe PROJECT_ID - MCP service is enabled on the project: check with Alyssa
Error 403: BigQuery: Permission denied while getting Drive credentials
The query touches a Sheets-backed external table but ADC lacks Drive scope. Re-auth with:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/bigquery
Error 403: SERVICE_DISABLED: Data Analytics API with Gemini has not been used
Only the ask_data_insights tool needs this. Either:
- Enable:
gcloud services enable geminidataanalytics.googleapis.com --project=PROJECT_ID(Alyssa handles this) - Or just don't use that specific tool —
execute_sqlcovers the same use cases
Claude Desktop config not picked up
Restart Claude Desktop fully (quit + reopen), don't just close the window. On macOS: Cmd+Q. On Windows: right-click the tray icon → Quit, then reopen.
Claude Code MCP showing as connected but tools not appearing in conversation
Start a fresh Claude Code session — MCP tools are registered at session start. /reload-plugins does NOT reload MCP servers (it's for plugins/skills/agents/hooks).