SubRadar
README.md
# SubRadar
**100% offline subscription, silent price-hike, and duplicate-charge finder.** Drop bank, PayPal, or credit-card exports (`CSV`, `OFX`, `QFX`, `MT940`, `PDF`) and audit your recurring spend locally in under 1 millisecond — zero bank logins, zero cloud uploads, zero npm dependencies. Runs on macOS, Windows, and Linux.

## Why SubRadar
Apps like Rocket Money, Monarch, and Finanzguru ask you to hand over live banking credentials (Plaid / Open Banking) and sell you another subscription just to cancel your old ones.
SubRadar takes the opposite approach:
- **Zero network requests, enforced by the browser:** The local server binds strictly to `127.0.0.1` and sends `Content-Security-Policy: default-src 'self'; connect-src 'none'`. Open DevTools → Network to verify that zero bytes leave your machine.
- **Zero dependencies:** Pure ES Modules running on Node.js 18+ (no `npm install`, no Docker, no database).
- **Works as a Web Studio, CLI, and MCP Server** from the exact same core engine.
## What It Detects
- **Recurring Subscriptions:** Detects weekly, monthly, bi-monthly, quarterly, and annual billing cycles across European and US banks (Sparkasse, ING, DKB, N26, Revolut, PayPal, Chase, Amex, Wise) while filtering out everyday variable retail spend (supermarkets, cafes, transit).
- **Silent Price Hikes:** Flags subscriptions whose latest charge jumped above their earlier baseline (e.g., `Adobe Creative Cloud: €35.99 → €66.45, +84.6%, +€365.52/yr`).
- **Duplicate / Ghost Charges:** Flags identical merchant charges billed twice within 3 days.
- **Annual Renewal Traps:** Surfaces once-a-year charges from known subscription merchants before they sneak up again.
- **What-If Cancel Simulator:** Tick rows in the ledger to see 1-year and 5-year cash reclaimed live.
- **1-Click Cancellation Notices (EN & DE § 312k BGB):** Generates copy-ready cancellation emails with exact last charge date, amount, and direct billing portal links for 50+ built-in services.
## Quick Start (macOS, Windows, Linux)
Requires **Node.js 18+** (zero `npm install` needed):
```bash
git clone https://github.com/zm57cdj9yb-beep/subradar.git
cd subradar
node ./bin/subradar.mjs
```
Opens the local studio at `http://127.0.0.1:4321` preloaded with a synthetic 12-month demo statement (zero personal data). Drag and drop your own bank exports to audit them locally.
### CLI Mode
```bash
# Audit your own statement files in the terminal
node ./bin/subradar.mjs scan ./examples/sample-sparkasse-de.csv ./examples/sample-statement.ofx
# Machine-readable JSON output
node ./bin/subradar.mjs scan ./examples/sample-paypal-us.csv --json
# Run built-in 12-month demo audit
node ./bin/subradar.mjs demo
```
### MCP Server Mode (for Claude Code, Antigravity, Cursor, Codex)
Add SubRadar to your MCP config to let local AI agents audit local statement files without uploading them to a third-party finance cloud:
```json
{
"mcpServers": {
"subradar": {
"command": "node",
"args": ["/absolute/path/to/subradar/bin/subradar.mjs", "mcp"]
}
}
}
```
Exposes 4 local stdio tools: `analyze_statements`, `run_demo_audit`, `generate_cancellation`, and `list_supported_services`.
## Supported Formats
| Format | Details | Tested Example |
|---|---|---|
| **CSV** | Auto-detects `;` / `,` / `\t`, preamble rows, `€/$` decimals (`-14,99` & `-$14.99`), `DD.MM.YYYY`, `MM/DD/YYYY`, `YYYY-MM-DD`, separate Debit/Credit columns | [`sample-sparkasse-de.csv`](examples/sample-sparkasse-de.csv), [`sample-paypal-us.csv`](examples/sample-paypal-us.csv) |
| **OFX / QFX** | Standard Open Financial Exchange statements | [`sample-statement.ofx`](examples/sample-statement.ofx) |
| **MT940 / STA** | European SWIFT bank statements (`:61:` / `:86:`) | Covered in `npm test` |
| **PDF** | Built-in zero-dependency text & `FlateDecode` stream extraction for text-based bank PDFs | Covered in `npm test` |
## Benchmarks (Apple M2, Node.js v26.12.1)
Reproducible via `npm run bench` (full output in [`benchmarks/RESULTS.md`](benchmarks/RESULTS.md)):
| Workload | Result | Throughput |
|---|---|---:|
| Parse 10,000-row European CSV | **`22.5 ms`** | **`443,936 rows/sec`** |
| Audit 12-month statement (160 rows, 100-run avg) | **`0.55 ms`** | ~1,818 audits/sec |
| Full analysis on 10,000 transactions | **`21.8 ms`** | **`43.3 MB` RSS** |
## Comparison
| Tool | Price / License | Requires Bank Login | Cloud Upload | Silent Price-Hike Alert | MCP Server |
|---|---|---|---|---|---|
| **SubRadar** | **MIT (Free)** | **No** | **No (`connect-src 'none'`)** | **Yes** | **Yes** |
| Rocket Money | Commercial (\$6–\$12/mo) | Yes (Plaid) | Yes | Partial | No |
| Finanzguru | Freemium (Germany) | Yes (Open Banking) | Yes | Partial | No |
| Actual Budget | MIT (Free) | Optional | Self-hosted | No | No |
## Current Limitations
- **Scanned image PDFs:** Built-in PDF extraction reads text and `FlateDecode` streams directly; scanned paper PDFs require running OCR first.
- **Merchant catalog size:** 50 common global & DACH services have direct cancellation links; unknown recurring merchants are still detected and normalized automatically, just without a prefilled portal URL.
- **Manual statement export:** Because SubRadar refuses to ask for banking passwords, you export CSV/OFX/PDF from your bank's web portal once a quarter (takes ~30 seconds).
## Testing
```bash
npm test
```
Runs 9 end-to-end tests covering German/US CSVs, OFX, MT940, compressed PDF streams, price-hike & duplicate detection, DE/EN cancellation letters, strict CSP header verification, and MCP JSON-RPC tool calls.
## License
MIT — see [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues