# mcp-server-bigquery

> MCP Server

This repository provides a Model Context Protocol (MCP) server for accessing BigQuery, enabling LLMs to inspect schemas and execute SQL queries. It supports listing tables, describing schemas, and running queries

## Overview

- **Category:** Database
- **Language:** Python
- **Stars:** 128
- **Forks:** 5
- **Owner:** LucasHild
- **GitHub:** https://github.com/LucasHild/mcp-server-bigquery
- **Created:** 2024-12-03T18:09:19+00:00
- **Updated:** 2025-03-28T20:28:48+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-bigquery-access-schemas-queries

## Setup

## Setup

### Install

#### Installing via Smithery

To install BigQuery Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-server-bigquery):

```bash
npx -y @smithery/cli install mcp-server-bigquery --client claude
```

#### Claude Desktop

On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

##### Development/Unpublished Servers Configuration</summary>

```json
"mcpServers": {
  "bigquery": {
    "command": "uv",
    "args": [
      "--directory",
      "{{PATH_TO_REPO}}",
      "run",
      "mcp-server-bigquery",
      "--project",
      "{{GCP_PROJECT_ID}}",
      "--location",
      "{{GCP_LOCATION}}"
    ]
  }
}
```

##### Published Servers Configuration

```json
"mcpServers": {
  "bigquery": {
    "command": "uvx",
    "args": [
      "mcp-server-bigquery",
      "--project",
      "{{GCP_PROJECT_ID}}",
      "--location",
      "{{GCP_LOCATION}}"
    ]
  }
}
```

Replace `{{PATH_TO_REPO}}`, `{{GCP_PROJECT_ID}}`, and `{{GCP_LOCATION}}` with the appropriate values.

## Tools

## Available Tools

		1. `execute-query` (Executes a SQL query using BigQuery dialect)
		2. `list-tables` (Lists all tables in the BigQuery database)
		3. `describe-table` (Describes the schema of a specific table)
