bigquery-mcp logo

bigquery-mcp

by PaddyAlton

bigquery-mcp is a Model Context Protocol (MCP) Server designed for BigQuery. It helps AI Agents write better SQL queries by providing context about the contents of a BigQuery data warehouse.

View on GitHub

Last updated: N/A

What is bigquery-mcp?

This is a Model Context Protocol (MCP) server for BigQuery. It provides AI Agents with tools to examine the contents of a BigQuery data warehouse (datasets, tables, columns, query history).

How to use bigquery-mcp?

  1. Ensure you have the prerequisites installed (uv, gcloud or service account credentials, Taskfile for development). 2. Clone the repository. 3. Run uv sync to install dependencies. 4. In Cursor settings > MCP Servers, start a server with the command: uv run --with mcp --directory /path/to/bigquery-mcp mcp run /path/to/bigquery-mcp/src/server.py. 5. Write a contextual rule in .cursor/rules/tool-use-rule.mdc for Cursor Agent instructions.

Key features of bigquery-mcp

  • Provides context about BigQuery data warehouse contents

  • Enables AI Agents to write better SQL queries

  • Exposes datasets, tables, columns, and query history

  • Integrates with Cursor IDE via MCP

Use cases of bigquery-mcp

  • Improving SQL query generation by AI Agents

  • Assisting AI in data analysis tasks on BigQuery

  • Providing context for AI-powered data exploration

  • Enabling AI to understand BigQuery schema and data

FAQ from bigquery-mcp

What is MCP?

MCP stands for Model Context Protocol. It is a protocol for AI Agents to interact with external tools and services.

Why use this MCP server?

This server helps AI Agents write better SQL queries by providing context about the contents of your BigQuery data warehouse.

What are the prerequisites?

You need uv for dependency management and either gcloud installed or service account credentials for BigQuery access. For development, you also need Taskfile.

How do I install dependencies?

Run uv sync in the repository directory.

How do I start the server?

In Cursor settings > MCP Servers, start a server with the command: uv run --with mcp --directory /path/to/bigquery-mcp mcp run /path/to/bigquery-mcp/src/server.py.