stripe-analytics-mcp

stripe-analytics-mcp

Provides real-time Stripe subscription analytics including MRR, churn, failed payments, and expiring trials. Enables AI assistants to answer business health questions like 'How's my business doing?'

Category
Visit Server

README

stripe-analytics-mcp

CI npm License: MIT Node.js 18+ Docs

Ask your AI assistant "how's my business doing?" and get your MRR, churn, failed payments, and expiring trials in one answer.

The problem

You check your Stripe dashboard for MRR, churn, and revenue breakdown every day. Stripe's official MCP server only does operations — create customers, send invoices. It can't tell you what your MRR is. ChartMogul and Baremetrics compute these metrics but cost $100+/month and have no MCP interface. You're switching between your editor and browser tabs just to check a number.

The morning check

"How's my business doing?" / "Morning check" / "What happened overnight?"

One question, one answer, 30-second scan. Everything you'd normally check across 4 Stripe dashboard pages:

Dashboard — 2026-02-24

MRR: $4,280 (+$120 this week)
Subscriptions: 42 active, 3 trialing, 1 past due

MRR Movement (last 7 days)
- New: +$198 (2 new customers)
- Expansion: +$49 (1 upgrade)
- Contraction: -$0
- Churned: -$127 (1 cancellation)
- Net: +$120

Quick Ratio: 1.9 (healthy)

Failed Payments (2 — $147 at risk)
- alice@acme.com — $98 — card_declined — attempt 2
- bob@startup.io — $49 — insufficient_funds — attempt 1

Trials Expiring Soon (3 — $147 potential MRR)
- carol@bigco.com — Pro — 2 days left — $49/mo
- dave@agency.net — Basic — 1 day left — $19/mo
- eve@freelance.co — Pro — 3 days left — $49/mo

Recover failed payments

"Am I losing money to failed payments?"

Failed payments are the easiest revenue to recover — these customers already want to pay you. Get the list with failure reasons so you can reach out today:

Failed Payments

Total at risk: $245.00
Failed invoices: 3

| Customer          | Amount | Reason            | Attempts | Last Attempt | Plan |
|-------------------|--------|-------------------|----------|--------------|------|
| alice@acme.com    | $98.00 | card_declined     | 2        | 2026-02-23   | Pro  |
| bob@startup.io    | $49.00 | insufficient_funds| 1        | 2026-02-22   | Pro  |
| carol@agency.net  | $98.00 | expired_card      | 3        | 2026-02-21   | Pro  |

Track MRR growth

"How did my MRR change this month?"

See exactly where growth is coming from and where you're leaking:

MRR Movement — Last 30 days

Net New MRR: +$840
- New MRR: +$570 (from new customers)
- Expansion MRR: +$390 (from upgrades)
- Contraction MRR: -$49 (from downgrades)
- Churned MRR: -$71 (from cancellations)

Watch your trial funnel

The dashboard flags trials expiring within 3 days — customers about to decide whether to convert or leave. The highest-leverage moment to intervene.

Understand churn

"What's my churn rate?"

Both customer churn and revenue churn — because losing one $500/mo customer hurts more than losing five $10/mo customers:

Churn Analysis — Last 30 days

Customer Churn Rate: 3.2%
Revenue Churn Rate: 1.8%
Churned Customers: 4
Churned MRR: $127.00

Know which plans work

"Which plan makes the most money?"

| Plan       | Subscribers | MRR       | % of Total |
|------------|-------------|-----------|------------|
| Pro        | 28          | $2,744.00 | 64.1%      |
| Basic      | 35          | $665.00   | 15.5%      |
| Enterprise | 3           | $871.00   | 20.4%      |

Quick start

STRIPE_SECRET_KEY=sk_test_... npx stripe-analytics-mcp

Then ask your AI assistant: "How's my business doing?"

Install

npx stripe-analytics-mcp

Add to your Claude Code / Cursor / Windsurf MCP config:

{
  "mcpServers": {
    "stripe-analytics": {
      "command": "npx",
      "args": ["stripe-analytics-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_test_..."
      }
    }
  }
}

How it works

Connects to Stripe (read-only), computes metrics from live subscription data, returns markdown your AI assistant renders naturally.

  • MRR: Sums subscription items, normalizes annual/weekly to monthly, applies discounts, excludes trials
  • Movement: Tracks new, expansion, contraction, and churn MRR from Stripe events
  • Quick Ratio: (New + Expansion) / (Contraction + Churn) — above 1.0 means growing
  • Failed payments: Scans open invoices with failed attempts
  • Trials: Identifies trialing subscriptions about to expire

Stateless — every query hits Stripe fresh. No data cached. No database. No account needed.

Configuration

Variable Required Description
STRIPE_SECRET_KEY Yes Stripe secret key (sk_test_... or sk_live_...). Read-only access is sufficient.

Development

git clone https://github.com/npow/stripe-analytics-mcp
cd stripe-analytics-mcp
npm install
npm run build
npm test

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured