Go implementation of an MCP server leveraging BigQuery for schema and query execution.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"bigquery-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
This repository provides a minimal Model Context Protocol (MCP) server written in Go. The server exposes tools backed by Google BigQuery:
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data / analytics
Query and manage PostgreSQL databases directly from AI assistants
MCP Server for GCP environment for interacting with various Observability APIs.
⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
MCP Security Weekly
Get CVE alerts and security updates for Bigquery Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
This repository provides a minimal Model Context Protocol (MCP) server written in Go. The server exposes tools backed by Google BigQuery:
schema – returns the schema of a BigQuery tablequery – executes an SQL query and returns up to 100 result rowsdryrun – performs a BigQuery dry run to validate SQL and estimate costsqueryfile – executes SQL read from a file and returns up to 100 rowsdryrunfile – dry runs SQL read from a filetables – lists tables in a BigQuery dataset (up to 100 entries)Query and table results are truncated to the first 100 rows to keep responses concise.
Install the bigquery-mcp-server command with:
go install github.com/masudahiroto/bigquery-mcp-server/cmd/bigquery-mcp-server@latest
This downloads the module and places the compiled binary in $(go env GOPATH)/bin. Ensure this directory is in your PATH so the command can be run directly.
If you've made local changes and want to run the development version without installing it globally, execute from the repository root:
go run ./cmd/bigquery-mcp-server
You can also build a binary directly:
go build -o bigquery-mcp-server ./cmd/bigquery-mcp-server
./bigquery-mcp-server
Run the server with your Google Cloud project and BigQuery region:
bigquery-mcp-server -project my-project -region US
The server listens on :8080 by default. Use an MCP client to call the registered tools.
Set the environment variable MAX_BQ_QUERY_BYTES to limit how many bytes a query may scan. The query tool performs a BigQuery dry run and refuses to execute if the estimated bytes processed exceed this value.
Use the -region flag to set the location for all BigQuery jobs. Specify US,
EU, or another region if your dataset is not in the default location.
Run unit tests:
go test ./...
End-to-end tests require access to BigQuery and therefore are not executed in CI. To run them locally:
Ensure Google Application Default Credentials are configured, e.g. run:
gcloud auth application-default login
Set the following environment variables to point to a test dataset:
export BQ_CLIENT_PROJECT=project-for-query-jobs
export BQ_PROJECT=project-with-dataset
export BQ_DATASET=your_dataset
export BQ_TABLE=your_table
export BQ_REGION=US
export BQ_SQL='SELECT 1 as id'
Execute the helper script:
./scripts/run_e2e.sh
The script runs go test -tags=e2e ./e2e which starts the server and exercises
the schema and query tools against your BigQuery data.