BigQuery MCP Server

BigQuery MCP Server

Mirror of

MCP-Mirror

Research & Data
Visit Server

README

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? 📊

  • 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:

# 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 ⚠️

  • 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
  • While both tables and views are supported, some complex view types might have limitations

Support & Resources 💬

License 📝

MIT License - See LICENSE file for details.

Author ✍️

Salih Ergüt

Sponsorship

This project is proudly sponsored by:

<div align="center"> <a href="https://www.oredata.com"> <img src="assets/oredata-logo-nobg.png" alt="OREDATA" width="300"/> </a> </div>

Version History 📋

See CHANGELOG.md for updates and version history.

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python