Connect your LLMs to BigQuery for natural language data queries with secure, easy setup
The BigQuery MCP Server acts as an intelligent intermediary between your machine learning models (such as Claude) and your BigQuery databases, enabling secure and efficient data interaction. By leveraging the Model Context Protocol (MCP), this server translates complex SQL queries into natural language conversations, allowing users to interact with their database without needing to write manual SQL commands.
The core capabilities of the BigQuery MCP Server revolve around enhancing AI applications like Claude Desktop with real-time data access. This MCP Server integrates seamlessly with various clients, providing a unified interface for querying and analyzing data stored in your BigQuery datasets. Key features include:
The architecture of the BigQuery MCP Server is designed to adhere closely to the Model Context Protocol (MCP) standard. This protocol allows for seamless integration between AI applications, databases, and other tools, ensuring a consistent interface across different systems. The implementation involves several key components:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
To get started with the BigQuery MCP Server, you need to follow these steps:
Install the MCP server quickly using Smithery:
npx @smithery/cli install @ergut/mcp-bigquery-server --client claude
Follow these prompts to configure your environment:
Once configured, Smithery will update your Claude Desktop configuration and restart the app.
For more control or specific configurations:
Authenticate with Google Cloud
gcloud auth application-default login
Add to Claude Desktop Config
Add this to your claude_desktop_config.json
:
Basic Configuration
{
"mcpServers": {
"bigquery": {
"command": "npx",
"args": [
"-y",
"@ergut/mcp-bigquery-server",
"--project-id",
"your-project-id",
"--location",
"us-central1"
]
}
}
}
With Service Account
{
"mcpServers": {
"bigquery": {
"command": "npx",
"args": [
"-y",
"@ergut/mcp-bigquery-server",
"--project-id",
"your-project-id",
"--location",
"us-central1",
"--key-file",
"/path/to/service-account-key.json"
]
}
}
}
The server uses the following arguments:
--project-id
: Required Google Cloud project ID.--location
: Optional BigQuery location, defaults to 'us-central1'.--key-file
: Optional path to service account key JSON file.Example using a service account:
npx @ergut/mcp-bigquery-server --project-id your-project-id --location europe-west1 --key-file /path/to/key.json
Imagine you're a business analyst wanting to extract insights from your BigQuery databases using Claude Desktop. You can simply ask, "Show me the top customers for this month," and Claude will automatically execute the query, presenting results directly.
As a data scientist, you might explore dataset schemas and access materialized views by asking questions like, "Tell me about the schema of the sales dataset." The MCP Server translates your question into SQL and pulls back relevant information for analysis.
Currently, the BigQuery MCP Server supports integration with these clients:
Metric | Value |
---|---|
1GB Query Limit | Default |
Real-Time Access | Supported |
Read-Only Access | Yes |
graph TD
A[BigQuery MCP Server] --> B[MCP Client: Claude Desktop]
B --> C[Features: Full Support, API Key]
C --> D[Compatibility: ✅]
A --> E[MCP Client: Continue]
E --> F[Features: Full Support, API Key]
F --> G[Compatibility: ✅]
A --> H[MCP Client: Cursor]
H --> I[Features: Tool Access Only]
I --> J[Compatibility: Tools Only]
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-[name]",
"--project-id",
"your-project-id",
"--location",
"us-central1",
"--key-file",
"/path/to/config.json"
],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Does this server support other BigQuery locations besides US Central1?
What is the maximum query size for data access?
Can I integrate this server with other AI applications besides Claude Desktop?
Is there a limit to the number of concurrent queries?
How do I handle service account keys securely during development?
Clone the repository:
git clone https://github.com/ergut/mcp-bigquery-server.git
cd mcp-bigquery-server
npm install
Build the package:
npm run build
Update your Claude Desktop config to point to the local build.
For more information about the Model Context Protocol and its community, visit the MCP documentation.
This project is proudly supported by:
This comprehensive documentation positions the BigQuery MCP Server as a critical component for integrating machine learning models with BigQuery databases efficiently.
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Python MCP client for testing servers avoid message limits and customize with API key
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Analyze search intent with MCP API for SEO insights and keyword categorization
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases