Sandbox
@LucasHild/mcp-server-bigquery

MCP server for BigQuery queries and schema access

This is an MCP server that connects an agent to BigQuery. It exposes tools for listing tables, describing table schemas, and running SQL queries in a project.

130 stars39 forksPythonUpdated 5mo ago
Who it's for

Builders who want their agent to inspect BigQuery data and run queries from Claude Code or Cursor.

What it delivers

You can ask your agent to look at BigQuery tables and query data without leaving your chat or editor.

What it does

Execute SQL queries

Provides an `execute-query` tool that runs SQL in BigQuery dialect.

List tables

Provides a `list-tables` tool to show the tables available in the connected BigQuery database.

Describe table schemas

Provides a `describe-table` tool to inspect the columns and schema for one table.

Configurable connection settings

Accepts project, location, dataset filters, service account key file, and timeout through arguments or environment variables.

Claude Code, Claude Desktop, and Cursor setup

Includes setup examples for `claude mcp add`, Claude Desktop config, and Cursor MCP settings.

How to get it

  1. 1To install BigQuery Server for Claude Desktop automatically via Smithery
    npx -y @smithery/cli install mcp-server-bigquery --client claude
  2. 2Run
    claude mcp add bigquery --scope user --transport stdio -- uvx mcp-server-bigquery --project {PROJECT_ID} --location {{LOCATION}}

README

BigQuery MCP server

smithery badge

A Model Context Protocol server that provides access to BigQuery. This server enables LLMs to inspect database schemas and execute queries.

Components

Tools

The server implements one tool:

  • execute-query: Executes a SQL query using BigQuery dialect
  • list-tables: Lists all tables in the BigQuery database
  • describe-table: Describes the schema of a specific table

Configuration

The server can be configured either with command line arguments or environment variables.

ArgumentEnvironment VariableRequiredDescription
--projectBIGQUERY_PROJECTYesThe GCP project ID.
--locationBIGQUERY_LOCATIONYesThe GCP location (e.g. europe-west9).
--datasetBIGQUERY_DATASETSNoOnly take specific BigQuery datasets into consideration. Several datasets can be specified by repeating the argument (e.g. --dataset my_dataset_1 --dataset my_dataset_2) or by joining them with a comma in the environment variable (e.g. BIGQUERY_DATASETS=my_dataset_1,my_dataset_2). If not provided, all datasets in the project will be considered.
--key-fileBIGQUERY_KEY_FILENoPath to a service account key file for BigQuery. If not provided, the server will use the default credentials.
--timeoutBIGQUERY_TIMEOUTNoMaximum time in seconds to wait for a query to complete. If not provided, queries will wait indefinitely.

Installation

Installing via Smithery

To install BigQuery Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-server-bigquery --client claude

Claude Code

claude mcp add bigquery --scope user --transport stdio -- uvx mcp-server-bigquery --project {PROJECT_ID} --location {{LOCATION}}

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": ["mcp-server-bigquery"],
      "env": {
        "BIGQUERY_PROJECT": "{{GCP_PROJECT_ID}}",
        "BIGQUERY_LOCATION": "{{GCP_LOCATION}}"
      }
    }
  }
}

Cursor

  1. Open Cursor Settings → MCP
  2. Click Add new global MCP server
  3. Add an entry for the BigQuery MCP, following the pattern below:
{
  "mcpServers": {
    "bigquery": {
      "command": "uvx",
      "args": ["mcp-server-bigquery"],
      "env": {
        "BIGQUERY_PROJECT": "{{GCP_PROJECT_ID}}",
        "BIGQUERY_LOCATION": "{{GCP_LOCATION}}"
      }
    }
  }
}

Files in the repo

Repository payload11 top-level entries
  • .github
  • src
  • .gitignore
  • .python-version
  • CONTRIBUTING.md
  • Dockerfile
  • LICENSE
  • pyproject.toml
  • README.md
  • smithery.yaml
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k