Connect Cursor to BigQuery with Google's MCP toolbox
Wire Cursor into BigQuery via Google's prebuilt MCP toolbox, merging it into ~/.cursor/mcp.json with jq so existing servers stay intact.
You can connect Cursor to BigQuery using Google’s prebuilt MCP toolbox. Once set up, Cursor can list tables, inspect schemas and run SQL queries. You do not need to write a custom server.
MCP (Model Context Protocol) is how Cursor talks to outside tools. The toolbox is a small program that connects Cursor to BigQuery. You do not need to build the integration yourself.
What you’ll achieve
- Cursor’s chat can list datasets, inspect table schemas, and run SQL against your BigQuery project.
- No custom MCP server code — you wire Cursor up to Google’s prebuilt toolbox binary via
~/.cursor/mcp.json.
Tutorial setup 4 prerequisites · 3 values
- Cursor — installed and signed in.
- A Google Cloud project — with the BigQuery API enabled.
- Application Default Credentials —
sign in once with
gcloud auth application-default login. Install gcloud on Mac if you have not done this yet. - jq — for editing the JSON config. On macOS:
brew install jq.
Step-by-step guide
Step 1: Install the toolbox
Download the binary to your home directory and make it executable:
mkdir -p ~/.mcp/toolbox && cd ~/.mcp/toolbox
curl -O https://storage.googleapis.com/genai-toolbox/v1.1.0/darwin/arm64/toolbox
chmod +x toolbox
No. Everything goes into your home directory. Cursor runs the toolbox as you. If a step asks for sudo, check the path. You have probably picked the wrong install location.
Step 2: Add the MCP server to Cursor’s config
Cursor reads its MCP servers from ~/.cursor/mcp.json. Unlike Claude Code, there is no add command. You could write the file by hand, but that would overwrite anything you already have there. Use jq to merge instead.
Your project ID from the box above is already substituted in. Run:
mkdir -p "$HOME/.cursor"
CONFIG="$HOME/.cursor/mcp.json"
[ -f "$CONFIG" ] || echo '{}' > "$CONFIG"
jq --arg cmd "$HOME/.mcp/toolbox/toolbox" \
--arg project "{{BIGQUERY_PROJECT_ID}}" \
'.mcpServers.bigquery = {
command: $cmd,
args: ["--prebuilt", "bigquery", "--stdio"],
env: { BIGQUERY_PROJECT: $project }
}' "$CONFIG" > "$CONFIG.tmp" && mv "$CONFIG.tmp" "$CONFIG"
Nothing. jq reads the current file, sets (or replaces) the bigquery entry
under mcpServers, and leaves every other key untouched. If the file does
not exist yet, the first line seeds it with an empty object so jq has
something to work with. Re-running the command is safe — it will just update
the bigquery entry in place.
If jq fails partway through, piping directly into the same file would
truncate it and lose your config. Writing to $CONFIG.tmp and only moving
it on success keeps the original intact.
Verification / Testing
Restart Cursor. Open the chat panel and ask something like “list the tables in dataset X” or “show me the schema for orders”. The BigQuery tools should show up in Cursor’s tool list and the assistant’s tool calls should reference them.
If the tools do not appear, open ~/.cursor/mcp.json and confirm the bigquery entry under mcpServers points at the absolute path of the toolbox binary.
Troubleshooting
command not foundin Cursor’s MCP logs. The path inmcp.jsonis wrong, or~was stored literally instead of expanded. Thejqsnippet above uses$HOMEso this should not happen — check you ran it as your user, not via sudo.- Auth errors when running queries. You probably skipped Application Default Credentials. Run
gcloud auth application-default loginand restart Cursor. - Empty results. Confirm
BIGQUERY_PROJECTin the env is the project that actually owns the data — not a sandbox project that just has the API enabled.
What you learned
- How Cursor discovers MCP servers via
~/.cursor/mcp.json. - How to merge a new MCP server into that file with
jqwithout overwriting existing entries.
Related articles
Connect Claude Code to BigQuery in 2 steps with MCP
Wire Claude Code into BigQuery with Google's prebuilt MCP toolbox in two steps — list datasets, inspect schemas, and run SQL from any session.
Connect Tableau Server to Claude Code via MCP + PAT
Wire Claude Code into Tableau Server using the official MCP server, authenticated with a Personal Access Token — list workbooks and views from chat.
Give Claude Code system-wide memory with CLAUDE.md
Put your KPIs, role, and writing style in one file at ~/.claude/CLAUDE.md and Claude Code reads it on every prompt — across every project.