BigQuery MCP Server

BigQuery MCP Server

Enables LLMs to securely converse with BigQuery data using natural language.

129
Stars
31
Forks
129
Watchers
7
Issues
BigQuery MCP Server acts as a bridge between large language models and Google BigQuery, allowing natural language interactions with database data through the Model Context Protocol. Designed for integration with Claude Desktop, it securely processes user queries and translates them into SQL, streamlining data access and minimizing manual query writing. The tool ensures safe and read-only data operations, supports both tables and materialized views, and labels resource types for easier exploration. Installation is possible via Smithery or manual setup, with a focus on developer-friendliness and robust authentication options.

Key Features

Translates natural language into SQL queries for BigQuery
Integrates with Claude Desktop for conversational AI interfaces
Supports both table and materialized view access
Clear labeling of dataset resource types
1GB query limit for safe data analysis
Read-only database interactions to ensure security
Configurable authentication via Google Cloud CLI or service account keys
Easy installation via Smithery CLI or manual setup
Automatic configuration updates for Claude Desktop
Command-line argument support for flexible server management

Use Cases

Conversational querying of business data without SQL knowledge
Securely providing AI assistants with access to cloud databases
Exploring BigQuery dataset schemas through AI interfaces
Enabling non-technical users to gain insights from BigQuery
Prototyping AI-powered database tools for enterprise use
Supporting analysts in natural language-driven data discovery
Facilitating compliance with safe, read-only database access
Reducing manual query effort in reporting tasks
Enhancing data accessibility within organizations using Claude Desktop
Automating report generation by translating plain English questions into SQL

README

BigQuery MCP Server

smithery badge

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

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

bash
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):
      bash
      gcloud auth application-default login
      
    • Using a service account (recommended for production):
      bash
      # 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:

      json
      {
        "mcpServers": {
          "bigquery": {
            "command": "npx",
            "args": [
              "-y",
              "@ergut/mcp-bigquery-server",
              "--project-id",
              "your-project-id",
              "--location",
              "us-central1"
            ]
          }
        }
      }
      
    • With service account:

      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"
            ]
          }
        }
      }
      
  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:

bash
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
# 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:

json
{
  "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:

Version History πŸ“‹

See CHANGELOG.md for updates and version history.

Star History

Star History Chart

Repository Owner

ergut
ergut

User

Repository Details

Language JavaScript
Default Branch main
Size 295 KB
Contributors 3
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

JavaScript
100%

Tags

Topics

bigquery google-cloud mcp mcp-servers model-context-protocol sql

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • BigQuery MCP Server

    BigQuery MCP Server

    MCP server enabling LLMs to access and interact with BigQuery databases.

    BigQuery MCP Server provides a Model Context Protocol-compliant interface that allows large language models to inspect database schemas and execute SQL queries on BigQuery. It exposes tools for executing queries, listing tables, and describing table schemas, supporting both CLI and environment-based configuration. The server integrates with Claude Desktop and can be easily installed via Smithery, facilitating seamless interaction between LLMs and BigQuery data sources.

    • ⭐ 120
    • MCP
    • LucasHild/mcp-server-bigquery
  • PGMCP

    PGMCP

    Natural language PostgreSQL interface via the Model Context Protocol.

    PGMCP enables seamless interaction with any PostgreSQL database through natural language queries, translating user intent into structured SQL results. It acts as a Model Context Protocol (MCP) server, connecting AI assistants and MCP-compatible clients to databases with features like streaming, robust error handling, and optional AI-powered SQL generation. The tool ensures secure, read-only access to existing databases using HTTP/MCP protocol. Compatibility includes tools such as Cursor, Claude Desktop, and VS Code extensions.

    • ⭐ 499
    • MCP
    • subnetmarco/pgmcp
  • mcp-graphql

    mcp-graphql

    Enables LLMs to interact dynamically with GraphQL APIs via Model Context Protocol.

    mcp-graphql provides a Model Context Protocol (MCP) server that allows large language models to discover and interact with GraphQL APIs. The implementation facilitates schema introspection, exposes the GraphQL schema as a resource, and enables secure query and mutation execution based on configuration. It supports configuration through environment variables, automated or manual installation options, and offers flexibility in using local or remote schema files. By default, mutation operations are disabled for security, but can be enabled if required.

    • ⭐ 319
    • MCP
    • blurrah/mcp-graphql
  • XiYan MCP Server

    XiYan MCP Server

    A server enabling natural language queries to SQL databases via the Model Context Protocol.

    XiYan MCP Server is a Model Context Protocol (MCP) compliant server that allows users to query SQL databases such as MySQL and PostgreSQL using natural language. It leverages the XiYanSQL model, providing state-of-the-art text-to-SQL translation and supports both general LLMs and local deployment for enhanced security. The server lists available database tables as resources and can read table contents, making it simple to integrate with different applications.

    • ⭐ 218
    • MCP
    • XGenerationLab/xiyan_mcp_server
  • Databricks Genie MCP Server

    Databricks Genie MCP Server

    Bridge natural language queries to Databricks Genie via Model Context Protocol.

    Databricks Genie MCP Server enables interaction between large language models and the Databricks Genie API using the Model Context Protocol. It allows users to ask natural language questions, start and manage conversations, and run SQL queries in Genie spaces. The tool provides structured results, supports follow-up queries, and facilitates connection through both standard and Docker-based setups. Designed for use with Claude Desktop, it streamlines conversational analytics within Databricks workspaces.

    • ⭐ 12
    • MCP
    • yashshingvi/databricks-genie-MCP
  • greptimedb-mcp-server

    greptimedb-mcp-server

    A Model Context Protocol (MCP) server for secure, structured AI access to GreptimeDB.

    greptimedb-mcp-server implements a Model Context Protocol (MCP) server for GreptimeDB, enabling AI assistants to securely explore and analyze database contents. It provides controlled operations such as listing tables, reading data, and executing SQL queries, ensuring responsible access. The server offers integration with Claude Desktop and supports prompt management for structured AI interactions.

    • ⭐ 23
    • MCP
    • GreptimeTeam/greptimedb-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results