Tooling

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.

··3 min read·Koppelvlak

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.

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
Requirements
  • Cursorinstalled and signed in.
  • A Google Cloud projectwith 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.

  • jqfor editing the JSON config. On macOS: brew install jq.
Your values

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

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"

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 found in Cursor’s MCP logs. The path in mcp.json is wrong, or ~ was stored literally instead of expanded. The jq snippet above uses $HOME so 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 login and restart Cursor.
  • Empty results. Confirm BIGQUERY_PROJECT in 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 jq without overwriting existing entries.