Imagine asking your BigQuery data questions like “Which products sold the most last month?” in plain English—and getting an immediate, accurate answer. This is now possible using the Model Context Protocol (MCP), which lets Claude Desktop securely connect to a BigQuery MCP server and turn natural language into actionable SQL queries.
In this article, you’ll learn:
- What MCP is and why it matters
- How to install and configure a BigQuery MCP server
- How to connect Claude Desktop to BigQuery
- How to test natural language queries
- Security best practices
- A full sample implementation with code
Understanding MCP and Its Benefits
The Model Context Protocol (MCP) is an open standard designed to unify how large language models (LLMs) communicate with external systems. Instead of creating custom connectors for every app, MCP standardizes integration using JSON-RPC 2.0 over stdio or HTTP. MCP servers expose “tools” (functions) such as:
list-tables
describe-table
execute-query
Claude Desktop acts as an MCP client, automatically recognizing these tools and using them to answer questions in context—without you writing SQL.
Selecting a BigQuery MCP Server
There are two main paths:
1. Open-source community server (ergut/mcp-bigquery-server
)
- Free and customizable
- Supports both default Google Cloud authentication and service account keys
- Can be installed manually or via Smithery
- Requires
roles/bigquery.user
ordataViewer
+jobUser
Enterprise solution (CData Connect Cloud MCP)
- Commercial product with UI setup
- OAuth or service account authentication
- Automatic Claude Desktop integration
We’ll focus on the open-source approach for full transparency and control.
Prerequisites
Before starting, ensure you have:
- BigQuery enabled in your Google Cloud project
- A service account key or
gcloud auth application-default login
- Claude Desktop installed on macOS or Windows
- Node.js installed (for the MCP server runtime)
- Appropriate IAM permissions:
roles/bigquery.user
or similar
Installing via Smithery (Fastest Way)
You’ll be prompted to:
- Enter your Google Cloud project ID
- Specify BigQuery location (e.g.,
us-central1
)
Smithery automatically updates Claude’s config and starts the server. Restart Claude Desktop, and you’re ready to query.
Manual Configuration (More Control)
- Authenticate with Google Cloud:
gcloud auth application-default login
Or use a service account key JSON for production environments.
- Update Claude Desktop configuration:Locate
claude_desktop_config.json
:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add:
{“mcpServers”: {“bigquery”: {“command”: “npx”,“args”: [“-y”,“@ergut/mcp-bigquery-server”,“–project-id”, “your-project-id”,“–location”, “your-location”,“–key-file”, “/path/to/key.json” // optional]}}} - macOS:
- Restart Claude Desktop.
Building Your Own MCP Server in Python
If you’d rather implement your own, here’s a minimal example using fastmcp
:
Then configure Claude:
Querying Data in Natural Language
Once connected, you can type into Claude:
- “List all tables in dataset
analytics
“ - “What columns are in
users
?” - “Show top 5 customers by revenue last quarter”
Claude automatically uses the MCP tools to generate SQL, execute it, and format results.
Security and Best Practices
- Use read-only roles:
roles/bigquery.user
ordataViewer
+jobUser
- Prefer local servers: Keeps data and credentials under your control
- Enforce query limits: Prevent runaway costs by capping query sizes
- Audit tools: Only use trusted MCP servers to avoid malicious behavior
Conclusion
Combining Claude Desktop, MCP, and BigQuery lets you move from rigid SQL commands to simple English questions. Whether you choose Smithery for quick setup, build your own Python MCP server, or use an enterprise connector, the result is the same:
- Faster insights: No SQL expertise required
- Secure integration: Credentials never leave your environment
- Extensibility: Add more tools or databases using the same protocol
In short, MCP unlocks conversational access to your most valuable data—helping you make decisions faster, collaborate better, and focus on strategy rather than syntax. Set up your server today, connect Claude, and start talking to BigQuery.