Blog
guide

How to Connect Polar to Grok Bot Using Sequel

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

Polar handles billing for a lot of developer-first products, and its dashboard is better at the current state than at the trend. Grok Bot is xAI's bot builder, an agent that keeps context and reaches your tools through plugins. Connect Polar through Sequel and the bot can answer revenue questions, including metered usage, without an export.

TL;DR

What you're connectingA Polar organization to Grok Bot
Setup timeAbout 5 minutes
Setup methodOne chat message. Grok Bot has no MCP config file
Auth to PolarOrganization Access Token (polar_oat_), read scopes only
Auth to the botOAuth to Sequel. No token in the chat
Access levelRead-only, enforced by Polar scopes
EnvironmentsProduction and sandbox, as separate connections

What You'll Accomplish

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

  • "What's MRR and churn for the last 6 months?"
  • "Which customers crossed their meter limit this month?"
  • "What's LTV by product for customers acquired this year?"

Prerequisites

  • A Sequel account: sign up free at sequel.sh
  • A Polar organization whose settings you can access
  • A read-only Organization Access Token
  • A Grok account with a bot you can send messages to

Step 1: Connect Polar to Sequel

In Polar, go to Organization Settings → Developers → New Token. Name it, pick an expiry, and enable the read scopes:

metrics:read, orders:read, subscriptions:read, customers:read, products:read, payments:read, refunds:read, disputes:read, discounts:read, checkouts:read, events:read, meters:read, customer_meters:read, organizations:read

Leave every :write scope off. Copy the token, Polar shows it once.

Then sign in to sequel.sh, open Data Sources, click New Connection, and choose Polar.

Choose a connector

FieldWhat to enter
API keyThe polar_oat_… token
ServerLeave blank or production for your live org, sandbox for a sandbox org

Sequel verifies the token and names the connection after your organization.

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 Polar Data

Attach @sequel and ask:

What's MRR and churn rate for each of the last 6 months?
Which customers exceeded their metered usage allowance this month?
Show LTV by product for customers acquired this year.

What You Can Do Now

  • Revenue trends without an export: MRR, ARR, churn, and LTV asked in plain English.
  • Usage billing checks: the bot runs unattended, so a weekly over-limit list arrives on its own.
  • Failed payment follow-up: "Who failed a payment in the last week and has not retried?"
  • Product mix analysis: which products carry revenue and which carry support load.
  • Cross-source joins: match Polar customers against your database to see whether billing and product state agree.

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.
Token rejectedConfirm the token is an Organization Access Token and has not expired. Polar shows the secret once, so create a new one if lost.
A report is empty or errorsA read scope is missing. Recreate the token with the full read scope list.
Sandbox data where you expected productionSandbox and production are separate deployments. Check the Server field on the connection.

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.

What kind of Polar token do I need?

An Organization Access Token starting with polar_oat_, created under Organization Settings, Developers, New Token, with read scopes only.

Which scopes should I enable?

metrics:read, orders:read, subscriptions:read, customers:read, products:read, payments:read, refunds:read, disputes:read, discounts:read, checkouts:read, events:read, meters:read, customer_meters:read, and organizations:read. Leave every write scope off.

Can I query a Polar sandbox organization?

Yes, as a separate connection. Polar's sandbox is a fully isolated deployment with its own tokens, so a sandbox token will not authenticate against production.

Can Grok Bot refund or cancel anything in Polar?

No. The connector ships read tools only, and read-only scopes enforce that at Polar's end as well.

Does usage-based billing data come through?

Yes. Meters and customer meters are included, so metered usage questions work alongside subscription and order questions.

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.