BigQuery MCP Server

by MCP-Mirror

284 downloads
Not rated
GitHub

About

It is a server that connects LLMs like Claude to BigQuery via the Model Context Protocol, allowing natural language queries to databases. It acts as a secure translator between AI assistants and BigQuery data.

Details

Author
MCP-Mirror
Downloads
284
Categories
Database, AI

- Translate natural language questions into SQL queries.
- Access both tables and materialized views in datasets.
- Explore dataset schemas with labeled resource types.
- Enforce a 1GB query limit for safe analysis.
- Read-only access ensures data security.
- Integrates with MCP, available in Claude Desktop.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name BigQuery MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Smithery by running npx @smithery/cli install @ergut/mcp-bigquery-server --client claude or manually by adding a configuration to Claude Desktop's claude_desktop_config.json. Provide your Google Cloud project ID, location (defaults to us-central1), and optionally a service account key file. Then start asking questions in Claude Desktop.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "bigquery mcp server": {
            "ergut_mcp-bigquery-server": {
                "command": "npx",
                "args": [
                    "@smithery/cli",
                    "install",
                    "@ergut/mcp-bigquery-server",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "ergut_mcp-bigquery-server": {
        "command": "npx",
        "args": [
            "@smithery/cli",
            "install",
            "@ergut/mcp-bigquery-server",
            "--client",
            "claude"
        ]
    }
}

BigQuery MCP Server

smithery badge <div align="center"> BigQuery MCP Server Logo </div>

What is this? 🤔

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.

Quick Example

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!

How Does It Work? 🛠️

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:
1. Set up authentication (see below)
2. Add your project details to Claude Desktop's config file
3. Start chatting with your BigQuery data naturally!

What Can It Do? 📊

- Run SQL queries by just asking questions in plain English
- Access both tables and materialized views in your datasets
- Explore dataset schemas with clear labeling of resource types (tables vs views)
- Analyze data within safe limits (1GB query limit by default)
- Keep your data secure (read-only access)

Quick Start 🚀

Prerequisites

- Node.js 14 or higher - Google Cloud project with BigQuery enabled - Either Google Cloud CLI installed or a service account key file - Claude Desktop (currently the only supported LLM interface)

Option 1: Quick Install via Smithery (Recommended)

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:

- Your Google Cloud project ID
- BigQuery location (defaults to us-central1)

Once configured, Smithery will automatically update your Claude Desktop configuration and restart the application.

Option 2: Manual Setup

If you prefer manual configuration or need more control:

1. Authenticate with Google Cloud (choose one method):
- Using Google Cloud CLI (great for development):

     gcloud auth application-default login

- Using a service account (recommended for production):
     # 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

2. 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"
]
}
}
}

3. Start chatting!
Open Claude Desktop and start asking questions about your data.

Command Line Arguments

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

Example using service account:

npx @ergut/mcp-bigquery-server --project-id your-project-id --location europe-west1 --key-file /path/to/key.json

Permissions Needed

You'll need one of these:
- roles/bigquery.user (recommended)
- OR both:
- roles/bigquery.dataViewer
- roles/bigquery.jobUser

Developer Setup (Optional) 🔧

Want to customize or contribute? Here's how to set it up locally:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.