Server implementation for Google BigQuery integration that enables direct BigQuery database access and querying capabilities
6 stars2 watching1 forks

BigQuery MCP Server

<div align="center"> <img src="assets/mcp-bigquery-server-logo.png" alt="BigQuery MCP Server Logo" width="400"/> </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. Authenticate with Google Cloud (one-time setup)
  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
  • Explore your dataset schemas
  • 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
  • Google Cloud CLI installed
  • Claude Desktop (currently the only supported LLM interface)

Setup in 3 Easy Steps

  1. Authenticate with Google Cloud

    gcloud auth application-default login
    
  2. Add to your Claude Desktop config Add this to your claude_desktop_config.json:

    {
      "mcpServers": {
        "bigquery": {
          "command": "npx",
          "args": [
            "-y",
            "@ergut/mcp-bigquery-server",
            "your-project-id",
            "location"  // Optional, defaults to us-central1
          ]
        }
      }
    }
    
  3. Start chatting! Open Claude Desktop and start asking questions about your data.

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:

# 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/src/dist/index.js",
        "your-project-id",
        "location"  // Optional, defaults to us-central1
      ]
    }
  }
}

Current Limitations ⚠️

  • MCP support is currently only available in Claude Desktop (developer preview)
  • Connections are limited to local MCP servers running on the same machine
  • Queries are read-only with a 1GB processing limit

Support & Resources πŸ’¬

License πŸ“

MIT License - See LICENSE file for details.

Author ✍️

Salih ErgΓΌt

Version History πŸ“‹

See CHANGELOG.md for updates and version history.

Features

Direct database access
Query capabilities
BigQuery integration

Category

Databases