by ergut
mcp-bigquery-server is a Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to securely and efficiently interact with Google BigQuery datasets. It acts as a translator, allowing LLMs to query and analyze data in BigQuery using natural language instead of SQL.
mcp-bigquery-server is a Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to securely and efficiently interact with Google BigQuery datasets. It acts as a translator, allowing LLMs to query and analyze data in BigQuery using natural language instead of SQL.
There are two main ways to use mcp-bigquery-server:
npx @smithery/cli install @ergut/mcp-bigquery-server --client claude
gcloud auth application-default login
.--key-file
parameter.claude_desktop_config.json
file, replacing your-project-id
and optionally your-location
and /path/to/service-account-key.json
:
{
"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 accepts the following arguments:
--project-id
: (Required) Your Google Cloud project ID.--location
: (Optional) BigQuery location (defaults to 'us-central1').--key-file
: (Optional) Path to service account key JSON file.Q: What are the prerequisites for using mcp-bigquery-server? A: Node.js 14 or higher, a Google Cloud project with BigQuery enabled, either Google Cloud CLI installed or a service account key file, and Claude Desktop.
Q: What are the current limitations of mcp-bigquery-server? A: MCP support is currently only available in Claude Desktop (developer preview), connections are limited to local MCP servers, queries are read-only with a 1GB processing limit, and some complex view types might have limitations.
Q: What permissions are needed for mcp-bigquery-server?
A: You'll need either roles/bigquery.user
or both roles/bigquery.dataViewer
and roles/bigquery.jobUser
.
Q: Can I contribute to mcp-bigquery-server? A: Yes, you can set up a developer environment by cloning the repository, installing dependencies, and building the project. You can then point your Claude Desktop config to your local build.
This is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.
You: "What were our top 10 customers last month?"
Claude: *queries your BigQuery database and gives you the answer in plain English*
No more writing SQL queries by hand - just chat naturally with your data!
This server uses the Model Context Protocol (MCP), which is like a universal translator for AI-database communication. While MCP is designed to work with any AI model, right now it's available as a developer preview in Claude Desktop.
Here's all you need to do:
To install BigQuery MCP Server for Claude Desktop automatically via Smithery, run this command in your terminal:
npx @smithery/cli install @ergut/mcp-bigquery-server --client claude
The installer will prompt you for:
Once configured, Smithery will automatically update your Claude Desktop configuration and restart the application.
If you prefer manual configuration or need more control:
Authenticate with Google Cloud (choose one method):
gcloud auth application-default login
# Save your service account key file and use --key-file parameter
# Remember to keep your service account key file secure and never commit it to version control
Add to your 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"
]
}
}
}
Start chatting! Open Claude Desktop and start asking questions about your data.
The server accepts the following arguments:
--project-id
: (Required) Your Google Cloud project ID--location
: (Optional) BigQuery location, defaults to 'us-central1'--key-file
: (Optional) Path to service account key JSON fileExample using service account:
npx @ergut/mcp-bigquery-server --project-id your-project-id --location europe-west1 --key-file /path/to/key.json
You'll need one of these:
roles/bigquery.user
(recommended)roles/bigquery.dataViewer
roles/bigquery.jobUser
Want to customize or contribute? Here's how to set it up locally:
# Clone and install
git clone https://github.com/ergut/mcp-bigquery-server
cd mcp-bigquery-server
npm install
# Build
npm run build
Then update your Claude Desktop config to point to your local build:
{
"mcpServers": {
"bigquery": {
"command": "node",
"args": [
"/path/to/your/clone/mcp-bigquery-server/dist/index.js",
"--project-id",
"your-project-id",
"--location",
"us-central1",
"--key-file",
"/path/to/service-account-key.json"
]
}
}
}
MIT License - See LICENSE file for details.
Salih Ergüt
This project is proudly sponsored by:
See CHANGELOG.md for updates and version history.
Reviews feature coming soon
Stay tuned for community discussions and feedback