Blog
guide

How to Connect BigQuery to Grok Bot Using Sequel

Musthaq Ahamad
Musthaq Ahamad
How to Connect BigQuery to Grok Bot Using Sequel

BigQuery is where most teams park the data that is too big or too joined-up for the app database: warehouse tables, GA4 exports, event streams. Grok Bot is xAI's bot builder, an agent that keeps context and reaches your tools through plugins. Sequel's MCP server lets that bot run read-only BigQuery jobs, so a warehouse question gets answered in the chat instead of in a ticket.

TL;DR

What you're connectingA Google Cloud project's BigQuery datasets to Grok Bot
Setup timeAbout 5 minutes
Setup methodOne chat message. Grok Bot has no MCP config file
AuthGoogle OAuth to Sequel, then OAuth from the bot to Sequel
Scope requestedbigquery.readonly only
IAM neededbigquery.dataViewer and bigquery.jobUser
AvailabilityAccount-wide, including scheduled and background runs

What You'll Accomplish

Once this is wired up, you can ask your bot:

  • "What's daily revenue for the past 30 days, split by country?"
  • "Which marketing channels drove the most first-time purchasers last quarter?"
  • "List the tables in our analytics dataset with row counts and last-modified dates."

Prerequisites

  • A Sequel account: sign up free at sequel.sh
  • A Google Cloud project with the BigQuery API enabled
  • A Google account with bigquery.dataViewer and bigquery.jobUser on that project
  • Your GCP Project ID, for example my-company-analytics-123
  • A Grok account with a bot you can send messages to

Step 1: Connect BigQuery to Sequel

Sign in to sequel.sh and open Data Sources.

Sequel Data Sources page

Click New Connection and choose BigQuery.

Choose a connector

Then:

StepWhat happens
Sign in with GoogleSequel requests only the read-only bigquery.readonly scope
Enter your GCP Project IDUse the project ID, not the project name or number
Test and saveSequel confirms the API is enabled, lists datasets, and reads table schemas

Use a least-privilege Google account. Sign in with an account that can only read the datasets you intend to expose. The read-only scope means Sequel can run SELECT but can never modify your data.

Step 2: Add Sequel to Grok Bot

Grok Bot has no MCP config file and no settings form to fill in. You add a server by asking the bot.

Open a chat with your bot and send this:

Add a custom MCP server called sequel at https://api.sequel.sh/mcp

Say custom server explicitly. Leave those words out and the bot searches the plugin marketplace instead of registering your endpoint.

Sequel's Grok Bot install card

The bot reads the name and URL back to you. Check both, confirm, and it posts a connect card in the chat. Click Authorize, sign in to Sequel, and approve access. The OAuth token stays on the connector side, so there is no API key to copy and nothing to keep in sync.

To confirm it registered, open Settings → Plugins → Yours. Every server on your account is listed there, including the ones you added by chat.

Grok's plugins panel

Then attach it to a task: type @ in the chat and pick sequel.

Using Grok chat rather than a bot? The steps do not carry over. On grok.com, open Plugins → New Connector → Custom, set the name to Sequel and the Server URL to https://api.sequel.sh/mcp, click Add Connector, and sign in.

Grok custom connector form

Step 3: Ask Grok Bot About Your BigQuery Data

Attach @sequel and ask:

What was daily revenue for the last 30 days, and which day was the worst?
Which traffic sources produced the most first-time purchasers last quarter?
List every table in the analytics dataset with its row count and size in GB.

What You Can Do Now

  • Warehouse answers without a seat: people who never log into the console can still ask the warehouse a question.
  • Scheduled reporting: a server you add is available to every bot on your account and works unattended, so a Monday morning revenue digest is a bot schedule.
  • Cost-aware exploration: with a partition-filter instruction on the connection, exploratory questions stay cheap.
  • Schema discovery: "What is in this dataset and how do these tables join?" answered from the real schema.
  • Cross-source joins: combine warehouse facts with live Postgres rows or Search Console clicks in a single question.

Troubleshooting

SymptomLikely fix
The bot searched the marketplace instead of adding the serverResend the message with the words "custom server" in it.
The server is not listed under Settings → Plugins → YoursThe registration did not complete. Resend the message and confirm the name and URL when the bot reads them back.
The bot answers without touching your dataYou did not attach it. Type @ in the chat and pick sequel before asking.
Access denied or a 403Enable the BigQuery API and grant bigquery.dataViewer plus bigquery.jobUser to the signed-in account.
Project not found or a 404Use the project ID, not the project name or project number.
Queries scan too many bytesAdd a connection instruction to always filter partitioned tables on their partition column.

Related Guides

Try Sequel

Build your company brain.

Sequel connects the systems your company runs on and learns how your team defines every metric, so any AI agent can answer from it. Free for up to 3 seats, no credit card required.

Get started free

Frequently asked questions

How do I add Sequel to Grok Bot?

Ask the bot. Send "add a custom MCP server called sequel at https://api.sequel.sh/mcp", confirm the name and URL it reads back, then click Authorize on the connect card and sign in to Sequel. Say "custom server" explicitly so the bot adds the endpoint instead of searching the plugin marketplace.

Do I need a Sequel API key for Grok Bot?

No. Sequel is a remote MCP server with OAuth. The bot posts a connect card, you authorize in the browser, and the token stays on the connector side. There is no key to paste into a chat.

Is this the same as Grok chat or Grok Build?

No, and the steps do not carry over. Grok chat on grok.com adds servers under Plugins, New Connector, Custom. Grok Build is the terminal coding agent and uses grok mcp add. Grok Bot is the bot builder, where you add servers by asking the bot.

Do I need a service account JSON key for BigQuery?

No. Sequel connects over Google OAuth and requests only the read-only bigquery.readonly scope. There is no key file to create, store, or rotate.

Which IAM roles does my Google account need?

roles/bigquery.dataViewer to read tables and roles/bigquery.jobUser to run queries, on the project you enter. Nothing broader is required.

Will the bot run up a large BigQuery bill?

It can if your tables are large, because BigQuery bills per byte scanned. Add a connection instruction telling Sequel to always filter partitioned tables on their partition column, and the generated SQL will respect it.

Can Grok Bot modify my BigQuery datasets?

No. The bigquery.readonly scope permits SELECT queries and schema reads only. Writes are rejected by Google, not just by Sequel.

Can I restrict which datasets the bot sees?

Yes. After connecting you can limit schema introspection to specific datasets from the connection settings, so the bot never learns about the rest.

Written by

Musthaq Ahamad
Musthaq Ahamad

Co-founder and CEO of Sequel. Previously built developer tools and data infrastructure. Passionate about making data accessible for everyone.