BigQuery Analysis MCP Server
Enables execution of SQL queries against Google BigQuery with safety features including query validation, size estimation, rejection of data modification queries, and prevention of large data processing over 1TB.
Uses Google Cloud authentication for secure access to BigQuery services, supporting both gcloud CLI login and service account key methods.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BigQuery Analysis MCP Serverdry run a query to analyze customer purchase patterns from the last quarter"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BigQuery Analysis MCP Server
Overview
This server is an MCP server for executing SQL queries against Google BigQuery, providing the following features:
Query validation (dry run): Verifies if a query is valid and estimates its processing size
Safe query execution: Only runs SELECT queries under 1TB (prevents data modifications)
JSON-formatted results: Returns query results in structured JSON format
Related MCP server: BigQuery Validator
Features
Tools
dry_run_query- Perform a dry run of a BigQuery queryValidates the query and estimates its processing size
Checks query size against the 1TB limit
run_query_with_validation- Run a BigQuery query with validationDetects and rejects DML statements (data modification queries)
Rejects data processing over 1TB
Executes queries that pass validation and returns results
Development
Prerequisites
Node.js (v16 or higher)
Google Cloud authentication setup (gcloud CLI or service account)
Install Dependencies
npm installBuild
npm run buildDevelopment Mode (Auto-rebuild)
npm run watchInstallation
To use with Claude Desktop, add the server configuration:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"bigquery-analysis-server": {
"command": "/path/to/bigquery-analysis-server/build/index.js"
}
}
}Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector :
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Authentication Setup
This server uses Google Cloud authentication. Set up authentication using one of the following methods:
Login with gcloud CLI:
gcloud auth application-default loginUse a service account key:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
Usage Examples
Dry run a query:
dry_run_query("SELECT * FROM `bigquery-public-data.samples.shakespeare` LIMIT 10")Run a query with validation:
run_query_with_validation("SELECT word, word_count FROM `bigquery-public-data.samples.shakespeare` WHERE corpus='hamlet' LIMIT 10")
BigQuery Analysis MCP Server
overview
This is an MCP server for executing SQL queries in BigQuery. It validates (dry runs) and executes queries, and has safety features that prevent data processing and modification queries (DML) of more than 1TB.
function
This server is an MCP server for executing SQL queries against Google BigQuery, and provides the following features:
Query validation (dry run): Check if the query is valid and estimate the processing size
Safe query execution: Only execute SELECT queries of 1TB or less (prevent data modification)
Return results in JSON format: Return query results in structured JSON.
function
tool
dry_run_query- Execute a dry run of a BigQuery queryValidate queries and estimate processing size
Check query size against 1TB limit
run_query_with_validation- Run a BigQuery query with validationDetect and reject DML statements (data modification queries)
Refuse to process data over 1TB
Executes queries that pass validation and returns the results
Development method
Prerequisites
Node.js (v16 and above)
Google Cloud authentication settings (gcloud CLI or service account)
Installing dependencies
npm installBuild
npm run buildDevelopment mode (auto-rebuild)
npm run watchinstall
To use it with Claude Desktop, add your server configuration:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"bigquery": {
"command": "node",
"args": ["/path/to/bigquery-server/build/index.js"]
}
}
}debug
MCP servers can be difficult to debug because they communicate via standard input/output (stdio). We recommend using MCP Inspector :
npm run inspectorInspector provides a URL to access the debugging tools in your browser.
Authentication Settings
This server uses Google Cloud credentials, please set up authentication in one of the following ways:
Log in with gcloud CLI:
gcloud auth application-default loginUse a service account key:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
Usage Example
Dry run the query:
dry_run_query("SELECT * FROM `bigquery-public-data.samples.shakespeare` LIMIT 10")Query execution with validation:
run_query_with_validation("SELECT word, word_count FROM `bigquery-public-data.samples.shakespeare` WHERE corpus='hamlet' LIMIT 10")
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA server that connects to PostgreSQL databases and provides tools for safely exploring schemas, running read-only SQL queries, and performing data analysis with pre-built templates.62831MIT
- AlicenseBqualityAmaintenanceEnables validation and dry-run analysis of BigQuery SQL queries without execution. Provides cost estimates, schema previews, and syntax validation for BigQuery queries.91MIT
- Alicense-qualityBmaintenanceA read-only BigQuery MCP server with auto-LIMIT injection, dry-run cost guard, and ADC authentication. Allows safe SQL querying of BigQuery by LLMs without risk of data modification or unexpected costs.1MIT
- Alicense-qualityDmaintenanceMCP server for secure BigQuery access across multiple Google Cloud projects, enabling querying, schema exploration, and data analysis with SQL validation and read-only controls.2MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Read-only MCP server for wafergraph.com's semiconductor & AI supply-chain data: 30 tools, no auth.
MCP server for interacting with the Supabase platform
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gotalab/bigquery-analysis-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server