The job: “Find out how sales, refunds and failed payments went this week without building reports in the Stripe Dashboard”
Ask your Stripe account questions in plain English with Claude (weekly sales, refunds, failed payments)
Connect Stripe's official MCP server to Claude, starting with a sandbox and read-only access, then ask about weekly sales, refunds and failed payments in plain English. Or skip the connection and get the same report from a Dashboard CSV export.
- Level Intermediate
- Time 30-45 minutes to set up safely, then a minute per question
- Works with
- Claude.ai
- Claude Desktop
- Claude Code
On this page8 sections
“How did we do this week?” should be a quick question. In the Stripe Dashboard it often means three filters, an export and a spreadsheet. With Stripe’s official MCP server, you can ask Claude instead: “sales per week this month, refunds, and why payments failed.”
That connection reaches real money. Stripe’s MCP server can read your data, and it can also create refunds and change subscriptions. So this guide sets it up in a deliberate order: a sandbox (Stripe’s test environment) first, read-only access, writes blocked in Claude, and only then your live account. If you’d rather not connect at all, Path B gets the same report from a CSV you export yourself.
What we tested and what we didn’t. We don’t have a Stripe account to connect, so the MCP steps (Path A) are not tested by us; they follow Stripe’s MCP docs as of 2026-10-31. We did test the analysis: one claude -p run in Claude Code on a made-up 60-row payments CSV. It named the columns it used, wrote a rerunnable script, and its totals (56 sales, 2,045.00 gross, 165.00 refunded, 4 failed payments) matched our own independent count. It also noticed the IDs looked like test data and that the last week was incomplete.
What you’ll have at the end
- Stripe connected to Claude with the least access that answers your questions (Path A), or
- A copy-paste prompt and an
analyze.pyscript that turn a Stripe payments export into a weekly report (Path B). - A
sales-report.mdwith weekly sales, best and worst week, refunds by customer, failed payments by decline reason, and “worth a look” notes.
What you need (and cost)
| Item | Details |
|---|---|
| A Stripe account | Path A connects to it. Stripe marks its MCP server as a public preview. |
| Claude | claude.ai or Claude Desktop with connectors, or Claude Code. Path B works in any of them with file uploads, but we tested it in Claude Code. |
| Admin access (Team/Enterprise) | Stripe says an owner must add the Stripe connector to the workspace before members can connect. |
The safety rules first
Stripe’s own docs say these, and they’re the whole point of this guide:
- Start in a sandbox. Stripe says sandboxes return simulated objects and no payments are processed, and each mode has its own keys. On the OAuth consent page you choose which live accounts or sandboxes to grant, with different permissions for each.
- Least access. For keys, Stripe recommends restricted keys whose permissions you set per resource to None, Read or Write. Read-only is enough for questions.
- Turn on tool approval. Stripe’s MCP page says to turn on your client’s tool-approval setting so you review calls before they run, and to be careful combining Stripe MCP with other servers because of prompt injection.
- Risky writes need you anyway. Stripe can require human confirmation in the Dashboard for some actions, such as refunds, through a link the agent gives you. It’s separate from Claude’s own approvals, and it expires after 24 hours.
- Key deadline. From December 2026, Stripe MCP stops accepting full-access secret keys and restricted keys without the Agent tag. Use OAuth or a new agent-tagged key; don’t paste your secret key anywhere.
Path A: Connect Stripe MCP (not tested by us)
A1. In claude.ai or Claude Desktop
- Open the official Stripe connector in Claude’s directory (link from Stripe’s docs) and select Connect to Claude.
- Sign in to Stripe. On the consent page, grant a sandbox only for now.
- In a chat, select + > Connectors and enable Stripe.
- When Claude asks to run a tool, read what it is.
stripe_api_readreads data.stripe_api_writechanges it. For questions, you should only ever see reads.
A2. In Claude Code
Stripe’s docs give this command:
claude mcp add --transport http stripe https://mcp.stripe.com/
Start Claude Code and run /mcp to sign in with OAuth (again, pick a sandbox). Then block the write tool for this project so Claude can’t call it even by mistake. Claude Code’s permission docs say a deny rule with a tool’s full name mcp__<server>__<tool> removes that tool. Add this to .claude/settings.json in your project:
{
"permissions": {
"deny": ["mcp__stripe__stripe_api_write"]
}
}
Using a key instead of OAuth. Stripe’s docs show putting the key in .mcp.json through an environment variable, never on the command line:
{
"mcpServers": {
"stripe": {
"type": "http",
"url": "https://mcp.stripe.com",
"headers": {
"Authorization": "Bearer ${AGENT_API_KEY}"
}
}
}
}
To make that key read-only: in the Stripe Dashboard, open API keys, click Create restricted key, and when Stripe asks how the key will be used, choose Authorizing agent access to your account so it gets the Agent tag. Every permission starts at None. Set Read only on the resources you’ll ask about (for this guide, things like charges, refunds, payment intents and customers; the Dashboard’s exact labels may differ) and leave everything else at None. Stripe adds default approval rules to agent-tagged keys for high-risk actions such as refunds and payouts. Create it in a sandbox first. Keep the key out of any file you commit.
A3. Ask questions (needs a live connection, not tested by us)
Start with this in the sandbox. Create a few test payments first, for example with Stripe’s test card 4242 4242 4242 4242 in the Dashboard, plus one of Stripe’s decline test cards.
Using Stripe, read-only. Do not create, update or refund anything.
For the last 28 days, list my charges and give me:
1. Per week (Monday to Sunday): successful payments, gross amount, refunded amount, and failed payments.
2. Refunds: how many, total, and which customers.
3. Failed payments: how many, total, and the most common failure reason.
Stripe amounts are in the smallest currency unit (cents), so convert them. Tell me which API calls you made. If a list is cut off by paging, say so instead of guessing.
Why the last two lines: Stripe’s API reference says amounts are in the smallest currency unit (100 means $1.00), and list calls return results in pages. Both are easy places for wrong totals. Check the first answer against the Dashboard’s Transactions page before you trust it.
Only when the sandbox answers match do you connect live mode, again read-only. Stripe also has a preview stripe_analytics tool for metrics and reports. We haven’t tested it, so check its docs before relying on its numbers.
To revoke access later, Stripe lists connected clients under OAuth sessions in your user settings; click the overflow menu and select Revoke access.
Path B: Export a CSV and ask (tested)
No connection, nothing to revoke. Claude only sees the file you give it.
B1. Export from Stripe
Stripe’s support article: open Transactions in the Dashboard, filter by date range (and “all payments” so failures and refunds are included), click Export, choose the columns, and the CSV downloads. Include at least the created date, amount, amount refunded, currency, status, decline or failure reason, fee and customer email. Stripe’s article doesn’t list exact column names, so the prompt below asks Claude to tell you which ones it used.
B2. Ask Claude
Put the file in a folder as payments_export.csv, open Claude Code there (or attach the file in claude.ai), and paste the exact prompt we tested:
Answer these questions about payments_export.csv, a payments export from Stripe:
1. Sales per week (Monday to Sunday): number of successful payments, gross amount, refunds, fees and net.
2. Which week was best and which was worst, and by how much?
3. Refunds: how many, total amount, and which customers.
4. Failed payments: how many, total amount, and the most common decline reason.
5. Anything unusual I should look at.
Rules:
- First tell me which columns you used for date, amount, status, refunds and fees. If a column you need is missing, stop and ask.
- Do the maths with a Python script, not in your head. Save it as analyze.py so I can rerun it next week.
- Amounts in the CSV are in major units (pounds, not pence). Say which currency.
- Count failed payments separately. They are not sales.
- Show a small table per question. Don't guess anything that isn't in the file.
- Save the answer as sales-report.md.
Change “pounds, not pence” to your currency. Before you rely on it, check one amount in your export against the same payment in the Dashboard, so you know which unit your file uses.
What our test showed
Our made-up file had 60 rows over four weeks: 51 paid, 5 refunded, 4 failed, in GBP. Claude:
- listed the columns it used, and stated its definitions up front: a sale is Paid or Refunded, failed rows never count, net is gross minus refunds minus fees;
- produced a weekly table (16, 15, 14 and 11 sales) and noted the last week was incomplete because the data stopped on a Friday, so it also gave best and worst among complete weeks;
- listed all 5 refunds with customer and amount, and the failed payments by reason (3
card_declined, 1expired_card); - flagged that every ID started with
ch_test, “so this may be test-mode data”, and that refunds clustered in the last two weeks; - said the file had no refund date, so each refund appears in the week of the original payment.
We added the numbers up separately; the totals matched. Next week, run python3 analyze.py new_export.csv sales-report.md without asking Claude again.
What can go wrong
- Totals off by 100. Cents versus dollars. Say which unit the data uses, every time.
- Refunds in the wrong week. If your export has no refund date column (our test file didn’t), refunds land in the week of the original payment. Ask Claude about this if refund timing matters.
- Missing payments. Paging (Path A) or a filter left on (Path B). Compare the row count with the Dashboard.
- Claude offers to “fix” something. For example, “shall I refund this duplicate?” Say no in chat and do it yourself in the Dashboard. The deny rule and read-only key make sure it can’t.
- Old keys stop working in December. Stripe returns a
401for unsupported keys. Reconnect with OAuth or an agent key. - Blocked on a work network. Stripe says IT may need to allow
mcp.stripe.com.
Make it yours
- A dashboard. Feed
sales-report.mdor the CSV into spreadsheet to dashboard for charts. - Every Monday. A scheduled task can run Path B’s script on the newest export and send you the summary.
- Connect the dots. Refund reasons often show up in support email; see the support-reply skill and the customer reviews report.
Next steps
Sources
- docs.stripe.com/mcp (opens in a new tab)
- docs.stripe.com/keys (opens in a new tab)
- docs.stripe.com/keys/restricted-api-keys (opens in a new tab)
- docs.stripe.com/testing (opens in a new tab)
- docs.stripe.com/api/charges/object (opens in a new tab)
- docs.stripe.com/api/charges/list (opens in a new tab)
- support.stripe.com/questions/exporting-payment-reports (opens in a new tab)
- code.claude.com/docs/en/permissions (opens in a new tab)
- code.claude.com/docs/en/mcp (opens in a new tab)
Related guides
Best MCP servers for non-developers: what to connect first
The best MCP servers and connectors for people who don't code: email, calendar, files, notes, meetings, design and automation, with plans, setup and safety.
Beginner10 minutes to pick, about 5 minutes per connector to set up
Claude Design vs Figma MCP: which to use for UI work
Claude Design drafts screens for you; Figma MCP lets Claude read and edit your Figma files. Compare plans, limits and handoff, then use both in one workflow.
Beginner10 minutes to decide, about 30 minutes for the hands-on workflow
Connect Claude to Notion (Notion MCP): setup, limits, safety
Connect Claude to Notion with Notion's official MCP server: setup in claude.ai, Desktop and Claude Code, what each Notion plan allows, and safe settings for edits and deletes.
Beginner10-15 minutes