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

financeops-mcp

v0.1.0

Published

Unified financial intelligence MCP server — Stripe + Xero

Readme

npm version License: MIT Tests TypeScript Node MCP

Financial intelligence for AI coding agents. Connect Stripe and Xero, then ask your AI agent anything about your business finances — health checks, P&L, cash flow forecasts, reconciliation, and anomaly detection.

Quick Start · Tools · Pro Features · Security · Architecture


See it in action

 Agent     "What's our financial health right now?"

 FinanceOps  financial_health({ providers: ["stripe", "xero"] })

 Result:

 Financial Health Report
 ──────────────────────────────────────────────────
 MRR              $12,450.00     ▲ +8.3% vs last month
 ARR              $149,400.00
 Burn Rate        $4,200.00/mo
 Runway           29.6 months
 Churn Rate       2.1%
 Active Customers 187

 Stripe balance:  $8,320.50 (available)
 Xero balance:    $41,200.00 (bank)

 Status: HEALTHY  ✓
 Generated in 340ms
 Agent     "Generate a P&L for this quarter"

 FinanceOps  generate_pnl({
               providers: ["stripe", "xero"],
               period: "quarter",
               date_from: "2026-01-01",
               date_to: "2026-03-31"
             })

 Result:

 Profit & Loss — Q1 2026
 ──────────────────────────────────────────────────
 Revenue
   Stripe Payments     $34,210.00
   Xero Invoices       $18,940.00
   Total Revenue       $53,150.00

 Expenses
   SaaS & Subscriptions  $1,840.00
   Payroll               $9,000.00
   Other                 $2,100.00
   Total Expenses       $12,940.00

 Net Profit             $40,210.00   (75.7% margin)

Architecture

graph LR
    A["AI Agent<br/>(Claude, Cursor, Windsurf)"] -->|MCP Protocol| B["FinanceOps MCP"]
    B --> C["Stripe API<br/>(Payments & Billing)"]
    B --> D["Xero API<br/>(Accounting & Invoices)"]
    B --> E["Analysis Engine<br/>(P&L · Cash Flow · Anomaly)"]
    B --> F["Audit Trail<br/>(SQLite)"]

    style A fill:#1f2937,stroke:#10b981,color:#f0f6fc
    style B fill:#0d1117,stroke:#10b981,stroke-width:2px,color:#10b981
    style C fill:#0a1f16,stroke:#635bff,color:#f0f6fc
    style D fill:#0a1f16,stroke:#13b5ea,color:#f0f6fc
    style E fill:#0a1f16,stroke:#10b981,color:#f0f6fc
    style F fill:#161b22,stroke:#30363d,color:#8b949e

Quick Start

npx financeops-mcp

Set your provider credentials as environment variables:

# Stripe
export STRIPE_SECRET_KEY=sk_live_...

# Xero (OAuth2)
export XERO_CLIENT_ID=...
export XERO_CLIENT_SECRET=...
export XERO_TENANT_ID=...

Add to your claude_desktop_config.json:

  • macOS / Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "financeops": {
      "command": "npx",
      "args": ["financeops-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_...",
        "XERO_CLIENT_ID": "...",
        "XERO_CLIENT_SECRET": "...",
        "XERO_TENANT_ID": "..."
      }
    }
  }
}

Add to .cursor/rules/mcp_servers.json in your project root:

{
  "mcpServers": {
    "financeops": {
      "command": "npx",
      "args": ["financeops-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_..."
      }
    }
  }
}

Open settings (Cmd+Shift+P / Ctrl+Shift+P then search "MCP") and add:

{
  "mcpServers": {
    "financeops": {
      "command": "npx",
      "args": ["financeops-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_..."
      }
    }
  }
}

Set the PRO_LICENSE environment variable to unlock premium analysis tools:

{
  "mcpServers": {
    "financeops": {
      "command": "npx",
      "args": ["financeops-mcp"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_...",
        "PRO_LICENSE": "your-license-key"
      }
    }
  }
}

Or from the command line:

PRO_LICENSE=your-license-key npx financeops-mcp

Tools

Free Tools (6)

| Tool | Description | |:-----|:------------| | list_transactions | Fetch paginated transactions from Stripe or Xero with date range and status filters | | get_balances | Get current account balances — Stripe available/pending, Xero bank accounts | | list_invoices | Fetch invoices with status filtering (paid, pending, overdue) and date range | | revenue_summary | Calculate revenue metrics for a period — total, average transaction, top customers | | expense_tracker | Categorize and summarize expenses by type with period filtering | | financial_health | Quick health check across providers — MRR, ARR, burn rate, runway, churn rate |

Pro Features (6)

| Tool | Description | |:-----|:------------| | generate_pnl | Full Profit & Loss statement from Stripe + Xero data for any period (PRO) | | cash_flow_forecast | 3/6/12-month cash flow forecast — conservative, realistic, and optimistic scenarios (PRO) | | reconcile | Cross-reference Stripe payments with Xero records to find discrepancies (PRO) | | detect_anomalies | Statistical anomaly detection — flag unusual transactions, spikes, and drops (PRO) | | tax_summary | VAT/sales tax calculation and period summary by jurisdiction (PRO) | | multi_currency_report | Consolidated reporting across EUR, USD, GBP with live rate conversion (PRO) |


Feature Comparison


Analysis Algorithms

P&L Generation

Aggregates income transactions from Stripe (charges, refunds) and Xero (invoices, credit notes), subtracts categorized expenses, and produces a structured statement with gross profit, operating expenses, and net profit with margin percentages.

Cash Flow Forecasting

Uses a weighted moving average over the last 3 months of historical data (weights: 1, 2, 3 oldest to newest). Applies a linear trend multiplier derived from first-vs-last net cash flow change. Outputs three scenarios:

| Scenario | Income Adjustment | Use Case | |:---------|:------------------|:---------| | Conservative | −20% | Worst-case planning, fundraising | | Realistic | Baseline trend | Default projection | | Optimistic | +20% | Best-case, growth planning |

Minimum 3 months of historical data required.

Reconciliation

Cross-references Stripe payment_intent IDs against Xero invoice references using fuzzy amount matching (±1% tolerance for currency conversion). Flags unmatched, duplicate, and reversed transactions.

Anomaly Detection

Statistical Z-score analysis over rolling 30-day windows. Configurable sensitivity:

  • Low — flags transactions >3σ from mean
  • Medium — flags >2σ (default)
  • High — flags >1.5σ

Supported Providers

Credentials

# Stripe — secret key from dashboard.stripe.com/apikeys
STRIPE_SECRET_KEY=sk_live_...

# Xero — OAuth2 app from developer.xero.com
XERO_CLIENT_ID=...
XERO_CLIENT_SECRET=...
XERO_TENANT_ID=...           # Organisation ID from Xero connections

Security

Read-Only Default No Stored Credentials MIT License Audit Trail

FinanceOps MCP is read-only by design. It calls provider APIs with read scopes only — it cannot move money, create invoices, or modify accounting records.

| Principle | Details | |:----------|:--------| | Read-only by default | All tools only read data — no write operations, no fund transfers | | No stored credentials | API keys are passed via environment variables and never written to disk | | No telemetry | Zero analytics, zero phone-home. Your financial data stays local | | Audit trail | Every tool call is logged locally in SQLite with timestamp, tool name, provider, and success/failure | | Least privilege | Use restricted Stripe keys (read-only) and Xero connections with Reader scope |

Best Practices

# Use restricted Stripe keys — create at dashboard.stripe.com/apikeys
# Toggle off all write permissions, keep only: Read balance, Read charges, Read invoices

# Use environment variables — never hardcode API keys
STRIPE_SECRET_KEY=sk_restricted_... npx financeops-mcp

# Rotate credentials regularly
# Xero OAuth tokens expire — implement refresh token rotation in production

Pro License

Unlock P&L generation, cash flow forecasting, reconciliation, anomaly detection, tax summaries, and multi-currency reporting.

Get your license:

# Activate
export PRO_LICENSE=your-license-key
npx financeops-mcp

# Or inline
PRO_LICENSE=your-license-key npx financeops-mcp

Built by Craftpipe — AI-powered developer tools

GitHub · npm · Support

MIT License © 2026 Craftpipe