npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

stripe-insights-mcp

v1.0.0

Published

Talk to your Stripe data in natural language. An MCP server for Claude.

Readme

Stripe Insights MCP

Talk to your Stripe data in natural language.

An MCP server for Claude that turns your Stripe account into a question-answering assistant.

You:    What's my MRR this month vs last month?
Claude: [calls mrr_breakdown + query_revenue]
        Current MRR: $4,820 (+12% MoM). Pro plan drove $530 of the gain;
        Starter plan churn cost you $90. ARR run-rate: $57,840.

You:    Which customers are at risk of churning?
Claude: [calls refund_risk]
        Top 5 at-risk: acct_123 (3 failed attempts, 11 days), ...
        Recommend: send personalized "update card" email to top 3 today.

What's inside

6 tools, accessible from any MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.):

| Tool | What it does | |---|---| | query_revenue | Gross / net revenue over a window. Optionally daily/weekly/monthly series. | | mrr_breakdown | Current MRR, ARR, plan mix, trialing count. | | analyze_churn | Cancellations: count, voluntary vs involuntary, MRR lost, top reasons. | | top_customers | Top N customers by lifetime value or current MRR. | | recent_failed_payments | Open invoices with failed attempts — who, how much, when next retry. | | refund_risk | Heuristic ranking of customers most likely to churn next. |

Plus 2 named prompts (saved workflows):

  • monthly_review — generates a 1-page exec summary
  • diagnose_drop — investigates a revenue drop end-to-end

Pricing & licensing

Three ways to use it:

🆓 Self-hosted (free, BYOK)

Bring your own Stripe API key. Run on your machine. Unlimited queries. MIT license.

💼 Hosted Pro — $19/mo

Stripe-Connect OAuth (no key sharing). Hosted server (we run it; you point Claude Desktop at our URL). Multi-account support. Free 14-day trial.

👥 Team — $49/mo

Everything in Pro + multi-user, shared dashboards, audit logs, priority support.

Sign up for hosted | Self-host below


Self-hosted setup

1. Install

npm install -g stripe-insights-mcp
# OR run directly without install:
npx stripe-insights-mcp

2. Get a Stripe restricted key (read-only)

Best practice: use a restricted key with read-only permissions, not your secret key.

  1. https://dashboard.stripe.com/apikeys → "Create restricted key"
  2. Permissions:
    • Charges: Read
    • Customers: Read
    • Invoices: Read
    • Subscriptions: Read
    • Balance: Read
    • All others: None
  3. Copy the rk_live_... (or rk_test_... for testing)

3. Add to your Claude client

Claude Desktop

Edit your Claude Desktop config (location varies by OS):

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "stripe-insights": {
      "command": "npx",
      "args": ["-y", "stripe-insights-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "rk_live_..."
      }
    }
  }
}

Restart Claude Desktop. The Stripe tools appear automatically in any conversation.

Claude Code

claude mcp add stripe-insights -e STRIPE_SECRET_KEY=rk_live_... -- npx -y stripe-insights-mcp

Or edit ~/.config/claude/claude_code_config.json directly with the same JSON shape.

Cursor / other clients

Same mcpServers config block as Claude Desktop. Cursor uses ~/.cursor/mcp.json.

4. Try it

Open a chat in your client and ask:

  • "What's my MRR right now?"
  • "Show me revenue for the last 30 days, grouped by day."
  • "Which 5 customers are most at risk of churning?"
  • "Run the monthly review."

Examples

See examples/ for ready-to-paste configs and sample prompts.

Tools reference

See docs/TOOLS.md for full tool input/output specs.

Architecture

  • Stdio transport — works with all MCP clients
  • Pure read-only — never writes to Stripe; safe to use with restricted keys
  • No data leaves your machine (self-hosted mode) — calls go directly Stripe → MCP server → Claude client → Anthropic
  • Streaming pagination — handles accounts with 100k+ customers without loading everything into memory

Roadmap

  • [ ] Hosted multi-tenant version (stripemcp.dev)
  • [ ] Webhook-driven push (notify Claude of important events)
  • [ ] Cohort analysis tool (retention by signup month)
  • [ ] LTV:CAC tool (with manual CAC input)
  • [ ] Export to CSV / Google Sheets

License

  • Self-hosted: MIT (free forever)
  • Hosted Pro / Team: Commercial license — see LICENSE.md

Credits

Built with the Anthropic MCP SDK and Stripe Node SDK.

Part of the SaaS Shipping Kits collection.