Home

Awesome

BigQuery MCP Server

smithery badge

<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. 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? πŸ“Š

Quick Start πŸš€

Prerequisites

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:

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:

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:

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/dist/index.js",
        "--project-id",
        "your-project-id",
        "--location",
        "us-central1",
        "--key-file",
        "/path/to/service-account-key.json"
      ]
    }
  }
}

Current Limitations ⚠️

Support & Resources πŸ’¬

License πŸ“

MIT License - See LICENSE file for details.

Author ✍️

Salih ErgΓΌt

Version History πŸ“‹

See CHANGELOG.md for updates and version history.