Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Analyze your Stripe data with AI


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:

Tools

Two tools are available in the Stripe Model Context Protocol (MCP) server to retrieve aggregated analytics data:

  • stripe _ analytics handles three kinds of requests:
  • 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 _ reports 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.

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:

  • Data > Metrics : Read
  • Financial Reports : Read

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:

  1. Go to the API keys page in the Dashboard.
  2. Create or edit a restricted key.
  3. Set the following permissions:
  • Data > Metrics : Read
  • Reporting : Read

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_analytics to pull Stripe-defined metrics over a time range. It discovers metrics with the list_analytics intent and queries them with execute_analytics.

  • 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_analytics for subscription and billing metrics, broken down by product or price. It starts a template with the execute_query_template intent and returns results through retrieve_query_template.

  • 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 Private preview

The following prompts cause an agent to use stripe_reports to find report types and generate report runs. It finds reports with the search_report_type and retrieve_report_type intents, then generates them with create_report_run and retrieve_report_run.

  • What report types are available for payouts?
  • Run the balance summary report for last month.

Run SQL queries Public preview

To run SQL against your reporting tables, you need a Sigma subscription.

The following prompts cause an agent to use stripe_analytics to run SQL against your reporting tables. It explores tables with the search_query_tables and retrieve_query_table intents, then runs SQL with execute_query_run and retrieve_query_run.

  • 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 _ analytics is always accurate for Stripe-defined metrics .

See also

Last verified 2026-09-24

Is this helpful?