Blog
guide

How to Connect Dodo Payments to Claude Code Using Sequel

Musthaq Ahamad
Musthaq Ahamad
How to Connect Dodo Payments to Claude Code Using Sequel

Dodo Payments is a merchant of record for digital products: it sells one-time products and subscriptions, collects tax, and pays you out. Claude Code is Anthropic's AI coding CLI that runs in your terminal. Sequel's MCP server connects the two, so you can answer revenue questions from the same place you ship the product.

This guide covers the full setup in three steps.

What You'll Accomplish

By the end of this guide, you'll be able to run Claude Code and ask questions like:

  • "What was our revenue last month, by currency, and how much of it was refunded?"
  • "Which subscriptions are on hold because a renewal failed, and what was the error code?"
  • "How much has Dodo paid out this year, and what did the fees come to?"

Claude Code calls Sequel's MCP server, which queries the Dodo Payments API and returns the results inline.

Prerequisites

  • A Sequel account: Sign up free at sequel.sh
  • A Dodo Payments business in live or test mode
  • Permission to create an API key under Developer in the Dodo dashboard
  • Claude Code installed: run npm install -g @anthropic-ai/claude-code if you haven't already

Step 1: Connect Dodo Payments to Sequel

Sign in to sequel.sh and click Data Sources in the left sidebar.

Sequel Data Sources page

Click New Connection, then select Dodo Payments from the connector list.

Choose a connector

Now create the key in Dodo. Go to Developer → API Keys → Add API Key, give it a name, and leave Enable write access unchecked. Copy the key; Dodo shows it once.

Back in Sequel, fill in two fields:

  • API key: the key you just copied
  • Environment: live for real data, test if the key came from test mode

Click Connect. Sequel verifies the key against Dodo and names the connection after your brand.

Tip: keep write access off. The connector has no write tools, so a read-only key means an agent cannot refund, cancel, or create anything even by accident.

Step 2: Add Sequel to Claude Code

In your terminal:

claude mcp add sequel \
  --transport http \
  https://api.sequel.sh/mcp

Claude Code opens a browser so you can authorize Sequel. Once approved, the server persists across sessions. Add --scope user to install it globally rather than per project.

Verify it registered:

claude mcp list

sequel should appear in the list of configured MCP servers.

Step 3: Query Your Dodo Payments Data

Start a Claude Code session and try these:

What was our revenue last month by currency, and how much of it was refunded?
Which subscriptions are on hold or set to cancel at the next billing date, and who are the customers?
List payouts this year with the fee, refunds and chargebacks netted from each.

Claude Code calls the Sequel MCP server, which hits the relevant Dodo endpoint and returns the results in your terminal. Amounts come back in the currency's smallest unit, and the agent divides before reporting.

What You Can Do Now

  • Revenue checks without a dashboard: ask "What did we bill this week compared to last week?" mid-session.
  • Involuntary churn: ask "Which failed payments this month were card declines rather than customers leaving?" The error code on each payment answers it.
  • Refund and dispute rates: ask "Which products have the highest refund rate relative to successful payments?"
  • Reconciliation: ask "Walk me through the balance ledger for the last payout: payments, fees, refunds and adjustments."
  • Cross-source analysis: with Search Console and GA4 also connected, ask "Which organic landing pages brought in the customers who paid in Dodo last quarter?"

That last question spans billing and search data, which is exactly the shape Dodo cannot answer alone. Sequel's revenue playbooks already know how to run it. For more on why cross-source questions justify this setup, see the connector is the easy part and MCP for databases.

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

Do I need an API key for Claude Code?

Not for Claude Code itself. The `--transport http` flag triggers OAuth auto-discovery, so you authorize Sequel in a browser. You do need a Dodo Payments API key to create the data source connection in Sequel.

Where do I create a Dodo Payments API key?

In the Dodo dashboard under Developer, then API Keys, then Add API Key. Leave "Enable write access" unchecked so the key can only read.

Can Claude Code issue refunds or cancel subscriptions through this?

No. The connector ships read tools only, and a key created without write access cannot create or modify anything at Dodo's end either.

Does this work with Dodo's test mode?

Yes. Set the environment field to `test` when connecting a key from test mode. Test and live are separate deployments with separate keys and data, so a test key will fail against live.

Why are the amounts so large?

Dodo returns every amount in the currency's smallest unit, so $29.00 comes back as 2900. Sequel's agent knows this and divides before reporting. It also keeps currencies separate rather than adding them together.

Can I connect two Dodo businesses?

Yes. Each API key is bound to one business and one environment, so create one Sequel connection per business and name them so Claude Code can tell them apart.

How is this different from the Dodo dashboard?

The dashboard answers the questions it was built for. Claude Code composes the question you actually have, including ones that span Dodo and another source such as Search Console or your product database.

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.