Blog
guide

How to Connect Stripe to Grok Bot Using Sequel

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

Stripe's dashboard answers "what happened to this customer" well and "what happened to revenue this quarter, by plan and country" badly. Grok Bot is xAI's bot builder, an agent that keeps context and reaches your tools through plugins. Connect Stripe through Sequel and the bot does the aggregation for you.

TL;DR

What you're connectingA Stripe account to Grok Bot
Setup timeAbout 5 minutes
Setup methodOne chat message. Grok Bot has no MCP config file
Auth to StripeRestricted Key (rk_) scoped read-only
Auth to the botOAuth to Sequel. No key in the chat
Access levelList, get, and search only. No writes
Test and liveSeparate connections, kept isolated

What You'll Accomplish

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

  • "What's our MRR trend for the last 6 months, by plan?"
  • "Which customers had a failed payment in the last 14 days and have not retried?"
  • "What's the refund rate by product this quarter compared to last?"

Prerequisites

  • A Sequel account: sign up free at sequel.sh
  • A Stripe account with Dashboard access
  • A Restricted Key scoped read-only to the resources you want
  • A Grok account with a bot you can send messages to

Step 1: Connect Stripe to Sequel

In Stripe, go to Developers → API keys → Create restricted key. Set the resources you want Sequel to read to Read, leave everything else None, and create the key.

ResourcePermission
Customers, Charges, Invoices, SubscriptionsRead
Products, Prices, Refunds, DisputesRead
Payouts, BalanceRead
Everything elseNone

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

Choose a connector

Paste the key into the API key field. Sequel verifies it against the Stripe API and the connection goes live.

Want both test and live data? Create two connections, one with an rk_test_… key and one with rk_live_…. Sequel keeps them isolated.

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

Attach @sequel and ask:

What's our MRR for each of the last 6 months, split by plan?
List customers with a failed payment in the last 14 days that has not been retried.
What's the refund rate by product this quarter versus last quarter?

What You Can Do Now

  • Revenue questions without an export: MRR, churn, expansion, and LTV asked in plain English.
  • Dunning follow-up: the bot runs unattended, so a daily failed-payment list arrives without anyone remembering.
  • Cohort revenue: "What's net revenue retention for customers acquired in Q1?" in one message.
  • Dispute and refund monitoring: spot the product driving chargebacks before the rate matters.
  • Cross-source joins: match Stripe customers against your database's accounts table to find billing and product drift.

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.
A resource comes back empty or errorsThe restricted key is not scoped to it. Edit the key in Stripe and set that resource to Read.
Numbers look like test dataYou used an rk_test_ key. Add a live connection with an rk_live_ key.
A write is rejectedExpected. The connector is read-only, and a restricted key enforces that at Stripe.

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.

Which kind of Stripe key should I use?

A Restricted Key starting with rk_, scoped read-only to the resources you want. A standard secret key works, but a restricted key means Sequel cannot modify your account even in principle.

Can Grok Bot issue refunds or cancel subscriptions?

No. The Stripe connector ships list, get, and search tools only. With a read-only restricted key, writes are blocked at Stripe's end too.

Can I query test mode and live mode?

Yes, as two separate connections. Use an rk_test_ key for one and rk_live_ for the other. Sequel keeps them isolated and the connection name tells them apart.

Which Stripe resources can the bot read?

Whatever you scope the restricted key to, typically customers, charges, invoices, subscriptions, products, prices, refunds, disputes, payouts, and balance.

Does the bot see my Stripe key?

No. The key is encrypted inside Sequel. The bot holds only an OAuth session scoped to your Sequel account.

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.