---
name: mercury-runway-with-pipeline
description: "Monthly: months of runway on cash alone, with the deals likely to close and without the accounts likely to churn, from Mercury, Stripe and HubSpot. Use when the user asks for this, or when it runs on a schedule."
---

# Runway with pipeline and churn risk: bank, Stripe and CRM

Monthly: months of runway on cash alone, with the deals likely to close and without the accounts likely to churn, from Mercury, Stripe and HubSpot.

One runway number hides the two things a founder is actually betting on: the deals in the pipeline and the customers who might leave. A board asks "what if the big deal slips" and the answer lives in three tools, so it gets guessed.

Once a month the agent takes cash and three months of net burn from the bank, MRR and the accounts showing churn signals from Stripe, and the open deals with their stage probability and close date from HubSpot. It projects cash month by month three ways and names the accounts and deals that move the range, so the card says "14 months, 19 if the pipeline closes, 11 if two accounts leave".

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Mercury Read Only token or the Mercury MCP server with `read` scope (or QuickBooks read access if your bank is not Mercury), and a Stripe restricted key with Read on Subscriptions and Invoices.
- HubSpot read access to deals and companies (`crm.objects.deals.read`, `crm.objects.companies.read`), with stage probabilities set on the pipeline and the same customer email domain in Stripe and HubSpot.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Read cash and three months of burn** (Mercury): Sum `currentBalance` from `GET /api/v1/accounts`, or `CurrentBalance` of QuickBooks `Bank` accounts if the books are where cash lives. Pull `GET /api/v1/transactions?start=<first day 3 months back>&end=<last day of last month>`, drop `internalTransfer` and `failed`, `cancelled` or `reversed` rows, and average money out minus money in over the 3 full months.
2. **Find MRR that is at risk** (Stripe): From `GET /v1/subscriptions?status=all`, sum MRR over `active` and `past_due` subscriptions. Mark a customer at risk when a subscription has `cancel_at_period_end: true`, is `past_due` or `unpaid`, or its latest invoice is open with `attempt_count` of 2 or more; keep each one's MRR and the date it would stop.
3. **Weight the open pipeline** (HubSpot): `POST /crm/v3/objects/deals/search` with `closedate` within the next 90 days and `dealstage` not in a closed stage (stages whose `metadata.isClosed` is `true` in `GET /crm/v3/pipelines/deals`), reading `amount`, `closedate`, `dealstage` and `hs_deal_stage_probability`. Weighted value is amount x probability, turned into monthly revenue (divided by 12 when deal amounts are annual, as set in settings) starting the month after `closedate`.
4. **Join Stripe customers to CRM companies**: Key: the domain of the Stripe customer's email, lowercased, against the HubSpot company `domain` without `www.`; for gmail.com and other free domains, match the full email to a contact instead. A deal whose company already pays in Stripe counts only its increase over current MRR, and renewals count nothing. At-risk customers get their HubSpot owner and any open renewal deal; unmatched ones keep their Stripe name.
5. **Project three runways**: Month by month from today: base is cash over average net burn; best lowers each month's burn by the weighted new MRR from its close month on; worst raises it by the at-risk MRR from the month it stops. Runway is the number of full months before cash goes below zero. Read last month's card at `GET https://briefkin.dev/v1/cards/insight-mercury-runway-with-pipeline` for the change.

## Route B: the browser

### What you need

- Signed in to Mercury (the person handles 2FA), Stripe with a role that can view subscriptions, and HubSpot with access to the deal pipeline.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://app.mercury.com/dashboard. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Read cash and burn in Mercury**: Note the total balance across accounts on the dashboard. Open Transactions, set the range to the last 3 full months, and read money in and money out per month, leaving out transfers between your own accounts; the average of out minus in is net burn.
2. **Find at-risk accounts in Stripe**: Open `https://dashboard.stripe.com/subscriptions` and filter Status `Past due` and `Unpaid`, then look for subscriptions marked as canceling at period end. Note each customer, email domain and monthly amount, and read MRR on Billing > Overview.
3. **Weight the pipeline in HubSpot**: Open `https://app.hubspot.com/` and go to CRM > Deals, board view, filtered to open deals with Close date in the next 90 days. View settings > Show metrics adds a card with the Weighted deal amount; note each deal's amount, deal probability and close date, and skip companies already paying in Stripe unless the deal adds to their plan.
4. **Project three runways**: Base is cash divided by net burn. Best: lower burn by each deal's weighted monthly value from its close month. Worst: raise burn by the at-risk MRR from next month. Count full months before cash runs out.

Note: Mercury's dashboard charts money in and out but not by full calendar month for every range, so reading three months can mean exporting Transactions as CSV. HubSpot's weighted amount uses the stage probability of each pipeline; deal amounts entered as annual values need dividing by 12.

## The report

- **Runway on cash alone** in months, with the monthly trend.
- **Best case** if weighted pipeline closes on schedule, and **worst case** if at-risk accounts churn.
- **Inputs**: cash, average net burn for 3 months, MRR, weighted new MRR, at-risk MRR.
- **At-risk accounts** with MRR, signal and owner, and the **top deals** by weighted value.
- One line on what to do first, for example "Call Acme Logistics about the failed card: it is $9,400 of the $16,200 at risk".

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "mercury-runway-with-pipeline/<date of this run, e.g. 2026-10-16>",
  "item_key": "mercury-runway-with-pipeline",
  "project": "Acme",
  "source": "Runway with pipeline and churn risk: bank, Stripe and CRM skill",
  "kind": "metric",
  "title": "Runway 14 months on cash, 19 with pipeline, 11 if 2 accounts churn",
  "metric": {
    "label": "Runway on cash alone",
    "value": 14,
    "unit": "months",
    "period_label": "",
    "better": "higher",
    "period_start": "<start of the period, ISO 8601>",
    "period_end": "<end of the period, ISO 8601>"
  },
  "glance": [
    {
      "type": "Grid",
      "props": {
        "columns": 3
      },
      "children": [
        {
          "type": "Stat",
          "props": {
            "label": "If pipeline closes",
            "value": 19,
            "unit": "mo",
            "tone": "ok"
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "If at-risk churn",
            "value": 11,
            "unit": "mo",
            "tone": "warn"
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "Net burn",
            "value": "$60k",
            "unit": "/mo",
            "better": "lower"
          }
        }
      ]
    }
  ],
  "widget": [
    {
      "type": "KeyValue",
      "props": {
        "items": [
          {
            "key": "Cash",
            "value": "$840,000 across 3 Mercury accounts"
          },
          {
            "key": "Net burn, 3-month average",
            "value": "$60,000 (Jul $58k, Aug $61k, Sep $61k)"
          },
          {
            "key": "MRR",
            "value": "$48,200"
          },
          {
            "key": "Weighted new MRR",
            "value": "$17,000 from 9 deals closing Oct to Dec"
          },
          {
            "key": "At-risk MRR",
            "value": "$16,200 from 2 accounts"
          }
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "At-risk account",
          "MRR",
          "Signal",
          "Owner"
        ],
        "align": [
          "left",
          "right",
          "left",
          "left"
        ],
        "rows": [
          [
            "Acme Logistics",
            "$9,400",
            "Card failed twice",
            "Dana"
          ],
          [
            "Northwind Foods",
            "$6,800",
            "Cancels at period end",
            "Sam"
          ]
        ]
      }
    }
  ],
  "size": "md"
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).

## Run it on a schedule

Suggested: 1st of the month at 8:00 (`0 8 1 * *`). From cron, with the agent signed in on that machine:

```bash
0 8 1 * * claude -p "Run the mercury-runway-with-pipeline skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/mercury-runway-with-pipeline#schedule

Source: https://briefkin.dev/skills/mercury-runway-with-pipeline
