roas-to-cash-mcp
Reconciles Meta Ads campaign exports (ad_spend.csv) against CRM deals and settlement data, exposing where Meta's reported ROAS overstates performance by showing which campaigns claim credit for the same deal_id and what real net cash results.
Joins CRM invoices against Stripe processor settlement rows so refunds, non-refundable Stripe fees, unpaid/overdue contracts, and true net cash per deal surface in the reconciliation waterfall.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
roas-to-cash-mcp — Deterministic ROAS-to-Net-Cash SQLite Reconciliation Engine & MCP Server
roas-to-cash-mcpis a zero-dependency Python SQLite engine and Model Context Protocol (MCP) server that reconciles ad-manager ROAS claims against CRM deal stages, processor settlements, refunds, fees, and fulfillment labor. Out of the box, its/demodataset proves how a reported4.2xMeta ROAS masks-$14,200in net cash loss in<2mswith0 MB VRAM.
Quick Start
No terminal wrestling required: click GitHub's Copy button on the top-right of any snippet below, or hand the single prompt in Step 1 directly to your AI coding agent (Claude Code, Cursor, Antigravity, Codex, or OpenCode) and let it handle setup end-to-end via llms.txt.
1. Let Your AI Agent Install It For You (1-Click Copy)
Install and configure https://github.com/cynthiaschomp/roas-to-cash-mcp in this project using its llms.txt and docs/getting-started.md, then run a quick check to confirm everything works.2. Terminal Install (1-Click Copy)
git clone https://github.com/cynthiaschomp/roas-to-cash-mcp.git && cd roas-to-cash-mcp && python3 -m roas_to_cash.mcp_server --demo3. 5-Line MCP Config (Claude Desktop, Cursor, Antigravity, OpenCode)
{
"mcpServers": {
"roas-to-cash-mcp": {
"command": "python3",
"args": [
"-m",
"roas_to_cash.mcp_server",
"--mcp"
]
}
}
}4. Programmatic SDK / CLI Usage
from roas_to_cash import reconcile_roas_to_cash
report = reconcile_roas_to_cash()
print(report["meta_reported_roas_label"], report["net_cash_usd"])
# -> 4.2x -14200.0Related MCP server: ecommerce-mcp-automation
Documentation
Getting Started & Full Setup Guide — Step-by-step installation, configuration, and examples
AI Agent Context (
llms.txt) — Single-fetch<1,500-token SDK, CLI & architecture referenceMCP Registry Manifest (
server.json) — Officialstdiotool & registry metadata
Why Founders, Operators & Finance Teams Need This
Ad platforms double-claim the same customer — Prospecting, retargeting, and branded search routinely claim 100% credit for identical
deal_idconversions—inflating dashboard ROAS while bank balances shrink.CRM Closed-Won does not equal settled cash — Joins CRM invoices directly against processor settlement rows so overdue unpaid contracts and full refunds with non-refundable Stripe fees surface immediately.
SaaS attribution tools require pixels, cloud syncs & $500+/mo contracts — Runs 100% locally in embedded SQLite over standard CSV exports via CLI or MCP (
Claude Code,Cursor,Antigravity) with zero third-party data sharing.
Comparison
Feature |
| Triple Whale | HubSpot Attribution | Northbeam |
Joins Stripe refunds, processor fees & labor COGS | Yes (SQLite waterfall) | Partial | CRM booked only | Ad-centric |
Catches intra-platform + cross-channel deal overlap | Yes (Exact | Model-weighted | Tier-gated | Model-weighted |
100% local CSV execution ( | Yes ( | Cloud SaaS | Cloud SaaS | Cloud SaaS |
Native | Yes (Apache-2.0) | Paid API tier | No | No |
Architecture
ad_spend.csv + crm_deals.csv + ledger_settlements.csv -> [SQLite Foreign-Key Loader] -> [Overlap & Unpaid Detector] -> [Refund/Fee/Labor Waterfall] -> JSON / MCP ReportBenchmarks
Metric | Measured Value | Conditions |
3-CSV SQLite load + waterfall query latency |
| In-memory SQLite foreign-key join on standard laptop CPU |
Auxiliary daemon / GPU VRAM footprint |
| Pure Python 3.10+ stdlib ( |
MCP tool schema + |
| Compact |
FAQ
How do I run the 4.2x Meta ROAS vs -$14,200 net cash demo locally?
Clone the repository and run python3 -m roas_to_cash.mcp_server --demo. It loads demo/ad_spend.csv, demo/crm_deals.csv, and demo/ledger_settlements.csv into SQLite and prints the complete JSON waterfall.
How do I reconcile my own Meta Ads, CRM, and Stripe CSV exports with Claude Code or Cursor?
Register python3 -m roas_to_cash.mcp_server --mcp in mcpServers (or load SKILL.md) and pass your three local CSV file paths to roas_reconcile_csvs.
How do I inspect why a specific Closed-Won deal lost money after refunds and fulfillment labor?
Call roas_audit_deal (or --deal-id D-104 on the CLI) to see every ad campaign claiming credit for that deal alongside its Stripe settlement, refund, processor fee, and labor cost.
Who Built It
Cynthia Schomp
I run a web design, marketing, and AI systems studio—building practical software, agent infrastructure, and developer tools I need in production first, and sharing reusable building blocks openly so other builders can move faster too.
Connect: GitHub  ·  Website  ·  Contact
Feedback
Questions, bug reports, benchmark comparisons, or ideas for what you need next? Open an issue or start a thread in Discussions—real-world developer feedback directly shapes the roadmap.
License: Apache-2.0 · Attribution required via NOTICE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only tools for finding where a small business leaks deals, time, and cash.
Read-only Shopify and WooCommerce profit analytics: P&L, COGS, product margins, ROAS and LTV.
Amazon Seller Central + Ads data for AI agents: true SKU profit with COGS, inventory, ads, orders.
Amazon Seller Central + Ads: settlement-accurate P&L, full PPC, every write staged for approval.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceSelf-hosted analytics for a single Amazon seller account, pulling Seller Central and Advertising data into Postgres and serving it to Claude via a bearer-token-guarded HTTP endpoint.MIT
- AlicenseAqualityCmaintenanceEnables connecting to Shopify and Meta Ads through MCP tools to retrieve orders, revenue, COGS, and ad-performance metrics, and to generate a combined daily P&L and ad-performance spreadsheet.2MIT
- FlicenseAqualityBmaintenanceEnables LLMs to answer small business finance questions about spending, sales trends, cash flow projections, and profitability using a local SQLite database.6-
- FlicenseBqualityBmaintenanceEnables analysis of cross-border e-commerce data from imported JSON reports, providing tools for order, product, inventory, profit, advertising, creator, and customer service analytics using deterministic formulas.12-