Analyze your Stripe data with AI
Connect an AI agent to the Stripe MCP server to query metrics, run financial reports, and analyze your data.
You can use an AI agent to analyze aggregated data across your Stripe account. Instead of reading individual API objects one at a time, you can ask for metrics such as monthly recurring revenue (MRR), run financial reports, and run SQL queries against your reporting tables.
What you can analyze
You can ask an AI agent to do the following:
- Query Stripe-defined metrics such as MRR, churn rate, active subscribers, and gross volume (
stripe_).analytics - Run pre-built templates for subscription and billing metrics (
stripe_).analytics - Run financial reports such as balance, payouts, activity, tax, and Revenue Recognition (
stripe_).report - Run SQL queries against your reporting tables for custom analysis (
stripe_).analytics
Tools
Two tools are available in the Stripe Model Context Protocol (MCP) server to retrieve aggregated analytics data:
stripe_handles three kinds of requests:analytics - Metric queries for Stripe-defined metrics such as MRR and gross volume
- Template runs for subscription and billing metrics such as churn rate and subscriber counts (which you can break down by product or price)
- SQL query runs against your reporting tables for custom analysis
stripe_searches available financial report types and creates report runs for reports such as balance, payouts, activity, tax, and Revenue Recognition. Report runs generate downloadable CSV files.report
Connect your AI agent
To get started, install the official agent plugin. See Build on Stripe with AI for setup instructions. Afterwards, grant the required permissions to your AI agent.
You can authorize the analytics and reporting tools either using OAuth or with an API key.
OAuth
When you connect an MCP client that supports OAuth, authorize the following permissions in the consent screen:
- Analytics:
Write - Financial Reports:
Write - Sigma Queries:
Write
These tools require write permissions because they use HTTP POST operations. However, the tools don’t modify or write to your data.
API key
Protect your API keys
Don’t embed an API key in code. Provide keys to your agent through an environment variable or a secrets vault.
To create an API key with the required permissions:
- Go to the API keys page in the Dashboard.
- Create or edit a restricted key.
- Set the following permissions:
- Analytics:
Write - Reporting:
Write - Sigma:
Write
- Analytics:
These tools require write permissions because they use HTTP POST operations. However, the tools don’t modify or write to your data.
Example prompts
Ask your agent questions in plain language, and it selects the right tool and returns the results. Report runs and SQL queries run asynchronously, so some answers take a moment to complete. For the full list of metrics you can query, see Supported metrics.
Query metrics Private preview
The following prompts cause an agent to use stripe_ to pull Stripe-defined metrics over a time range. It discovers metrics with the list_ intent and queries them with execute_.
- What’s my MRR for the last 6 months, by month?
- Show my net MRR churn rate this year.
- How many active subscribers do I have, grouped by product?
Analyze subscriptions and billing Public preview
The following prompts cause an agent to use stripe_ for subscription and billing metrics, broken down by product or price. It starts a template with the execute_ intent and returns results through retrieve_.
- What’s my subscriber churn rate by product this quarter?
- How much revenue did I lose to churn last month?
- Compare new subscribers and churned subscribers by month this year.
- Show active subscriber growth for my top five products.
Run financial reports Public preview
The following prompts cause an agent to use stripe_ to find report types and generate report runs. It finds reports with the search_ and retrieve_ intents, then generates them with create_ and retrieve_.
- What report types are available for payouts?
- Run the balance summary report for last month.
Run SQL queries Public preview
The following prompts cause an agent to use stripe_ to run SQL against your reporting tables. It explores tables with the search_ and retrieve_ intents, then runs SQL with execute_ and retrieve_.
- What reporting tables can I query about charges?
- Total my refunds by month for this year.
Limitations
- The tools read data from your own account only. Connect platforms can’t use them to read connected account data.
- The available metrics and reports can change during public preview.
- If an agent calculates a metric itself from raw data, the result can differ from how Stripe officially calculates it. For example, an agent that sums subscription amounts to estimate MRR doesn’t match Stripe’s MRR definition.
stripe_is always accurate for Stripe-defined metrics.analytics