home / mcp / bigquery mcp server

BigQuery MCP Server

Provides access to BigQuery data by inspecting schemas and executing SQL queries through the MCP server.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "codearranger-mcp-server-bigquery": {
      "command": "uv",
      "args": [
        "run",
        "mcp-server-bigquery",
        "--project",
        "{{GCP_PROJECT_ID}}",
        "--location",
        "{{GCP_LOCATION}}"
      ],
      "env": {
        "GCP_DATASETS": "sales,inventory",
        "GCP_LOCATION": "europe-west9",
        "GCP_PROJECT_ID": "my-gcp-project",
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/key.json"
      }
    }
  }
}

You can run an MCP server that connects to BigQuery and lets language models inspect database schemas and run queries. This server exposes tools for listing tables, describing schemas, and executing SQL queries against BigQuery datasets, enabling seamless integration between LLMs and your data.

How to use

You run the MCP server locally and connect to it from your MCP client. Start the server, then call its tools to list BigQuery tables, describe a table’s schema, or execute a query using BigQuery dialect. The server accepts a project ID and location and can be restricted to specific datasets if you wish. When you interact with it, you’ll see results returned in a structured format you can feed back into your prompts to guide your data exploration and analysis.

How to install

Prerequisites you need before installing include Node.js and Python tooling commonly used in MCP ecosystems. Ensure you have a working environment for running MCP servers and that you can install runtime runners used by MCP.

Choose one of the following two installation paths depending on how you want to run the server.

Install path A: Development / local run

# Development: run the MCP server via the local development command
uv run mcp-server-bigquery --project YOUR_GCP_PROJECT_ID --location YOUR_GCP_LOCATION

Install path B: Published server configuration

uvx mcp-server-bigquery --project YOUR_GCP_PROJECT_ID --location YOUR_GCP_LOCATION

Available tools

execute-query

Executes a SQL query against BigQuery using the configured dialect and returns results.

list-tables

Retrieves a list of all tables available in the selected BigQuery datasets.

describe-table

Provides the schema details for a specified table, including column names and data types.