Connect Stripe to AI Agents
Connect Stripe with a read-only restricted key and ask about revenue, MRR, subscriptions, payments, refunds, disputes and payouts in plain English. Claude, ChatGPT, Claude Code and any other MCP client answer from your own account, and if you have Stripe Sigma they can run SQL over your data too.
What you'll need
- A Stripe account where you can create restricted keys, under Developers and then API keys.
- A key with Read on the resources you want your agent to see. Customers, Charges, Subscriptions, Invoices, Balance and Payouts cover most questions.
- Optional: a Stripe Sigma subscription, and Read on Financial Reports, if you want SQL queries.
Stripe connects with that restricted key, which starts with rk_live_ or rk_test_. A full secret key is refused on purpose, because a restricted key can be limited to Read and a secret key cannot. Every operation only reads from your account.
Connect it
rk_test_ connects your test data and one starting with rk_live_ connects real payments. You can connect both, and they show as separate connections.Nothing in your Stripe account can be changed. Every request your agent makes counts towards your account's own read allowance, so SourcetoMCP counts them, reports the number with each answer and stops at 3,000 requests a day across Stripe operations. Sigma queries run read-only SQL and leave a query record in your account for 90 days. They stop at 20 a day.
Try it
- "What was net revenue last month after refunds and Stripe fees?"
- "What is our MRR today, and which price brings in the most?"
- "Which subscriptions are past due?"
- "Why are payments failing, and is the success rate falling?"
- "Which disputes are due for evidence in the next seven days?"
- "How many new customers did we add each week this quarter?"
- "Which refunds over $200 were issued this quarter?"
- "Run a Sigma query for churn by plan by signup month."
Join it with other sources
"Compare Stripe revenue by week with Google Ads spend for the same weeks, in one thread."
Troubleshooting
| Symptom | Likely fix |
|---|---|
| The key is refused as a full-access secret key | Stripe secret keys start with sk_. Create a restricted key with Read only and paste that one. Publishable keys (pk_) and webhook secrets (whsec_) are refused too. |
| An answer says the key lacks permission | The key has no Read on that resource. Edit its permissions in Stripe, then ask again. There is nothing to reconnect, and asking your agent which resources the key can read lists them all. |
| The connection shows Needs attention | Stripe says the key is invalid, expired or revoked. Create a new restricted key and reconnect. |
| Sigma says it needs a subscription | Sigma queries need your own Sigma subscription from Stripe and a key with Read on Financial Reports. A slow query returns a query run ID first, so ask your agent for the result a moment later. |
| The daily request budget has been reached | SourcetoMCP stops at 3,000 Stripe requests a day to protect your read allowance. Try again tomorrow. Narrower date ranges use fewer requests, and every answer reports how many it used. |
| Revenue differs from the Stripe dashboard | Revenue is built from your balance transactions, with days taken in your account's time zone. A dashboard report built on invoice dates or accrual can differ. MRR is before discounts and tax and is a snapshot of today. |
Related
- Stripe MCP Server. The marketing page, with a comparison against Stripe's own MCP server and the full FAQ.
- Shopify. Orders, stock and customers, to sit beside your payments.
- Browse all integrations. Every source SourcetoMCP connects to, by category.