execute-queryLABSCO SUMMARY
Schema first, then the query - the loop that usually costs two failed attempts.
It lists tables and describes them before anything runs, so column names get copied rather than guessed. Restricting it to named datasets happens at launch, which means the reach of the query tool is decided before the model ever sees it.
What it is
Three tools over a BigQuery project: the tables it can see, the schema of one of them, and a query in BigQuery dialect.
What you get
- Every table in the project, or only in the datasets you name
- The schema of a specific table
- A SQL query executed in BigQuery dialect, with rows returned inline
Requirements
A GCP project and its location - both required, given either as launch arguments or as environment variables. An optional dataset setting narrows the server to named datasets, and several can be listed.
Setup effort
Add the configuration to your client
USE CASES
Getting oriented in a project you did not build
List what tables exist, then read the schema of the ones that sound relevant, before writing a line of SQL.
Answering a data question where it was asked
Run the query in the conversation and get the rows back inline, rather than switching to the console and pasting the result.
Writing a query against a table you have never read
Read the schema first so column names and types are copied rather than guessed, then run it.
3 tools
Listed in project docs. Your client may show a different list.
list-tablesdescribe-tableBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
- uvx on PATH
- A Google Cloud project with BigQuery: BIGQUERY_PROJECT and BIGQUERY_LOCATION (or --project and --location)
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
MCP Clients
Claude Code
claude mcp add bigquery --scope user --transport stdio -- uvx mcp-server-bigquery --project <YOUR_BIGQUERY_PROJECT> --location <YOUR_BIGQUERY_LOCATION><YOUR_BIGQUERY_PROJECT> is your GCP project ID, and <YOUR_BIGQUERY_LOCATION> is your BigQuery location (for example europe-west9), braces included. The server uses your machine's default Google Cloud credentials unless you give it a service-account key file.
Claude Desktop, Cursor
{
"mcpServers": {
"bigquery": {
"command": "uvx",
"args": [
"mcp-server-bigquery"
],
"env": {
"BIGQUERY_PROJECT": "<YOUR_BIGQUERY_PROJECT>",
"BIGQUERY_LOCATION": "<YOUR_BIGQUERY_LOCATION>"
}
}
}
}<YOUR_BIGQUERY_PROJECT> is your GCP project ID, and <YOUR_BIGQUERY_LOCATION> is your BigQuery location (for example europe-west9), braces included. The server uses your machine's default Google Cloud credentials unless you give it a service-account key file.