Skip to content

Cash Runway MCP server ​

@cashrunway/mcp is a Model Context Protocol server that hands your Cash Runway data to any MCP-capable AI client (Claude Desktop, Cursor, Continue, your own agent harness) over stdio. The server is read-only — it never writes to your Cash Runway account.

Once configured, you can ask the agent things like:

  • "How's my business doing today?"
  • "What's my YTD revenue?"
  • "Who are my top 5 customers?"
  • "What invoices are overdue?"
  • "How much have I spent on AWS this quarter?"

The server registers a set of tools that map 1:1 onto the Agent API. LLMs are biased toward the first few tools in the list — the three new summary tools sit at the top so an agent asking "how much…" or "who's top…" reaches for an aggregate endpoint before paging through individual records (50× cheaper on tokens).

Install ​

bash
npm install -g @cashrunway/mcp

Requires Node.js ≥ 20. Or run without installing globally via npx -y @cashrunway/mcp.

Get an API token ​

  1. Sign in to Cash Runway.

  2. Open Settings → API keys and click Create API key.

  3. Give the key a label (e.g. "Claude — finance assistant").

  4. Tick the scopes the agent needs. Pick the narrowest set that does the job — every scope is a separate decision:

    ScopeWhat it unlocks
    READ_BANKBank accounts and balances.
    READ_FORECASTCash position + 13-week forecast.
    READ_PIPELINEProjected revenue (pipeline view).
    READ_INVOICESAR invoices + AP bills, with optional line-item expansion.
    READ_CONTACTSCustomer / supplier list and the per-contact drill (LTV, cadence, ABC).
    READ_SUMMARYThe composite daily-summary endpoint plus the three new aggregate summaries (revenue/summary, expenses/summary, contacts/summary). Strongly recommended starting point.
    READ_SENSITIVEDanger zone. Lifts the redaction filter on accounts / contacts the operator has flagged sensitive (wages, equity, director loans). Off by default — only enable for keys you fully trust.
  5. Copy the secret. The token starts with cr_live_… and is shown once — Cash Runway stores a one-way hash and cannot reveal it again. See API keys for rotation, audit, and the sensitive-data toggle.

Configure your MCP client ​

The server reads two environment variables:

VariableWhenExample
CASHRUNWAY_API_URLAlwayshttps://api.cashrunway.ai
CASHRUNWAY_API_KEYSingle company (most users)cr_live_xxxxxxxxxxxxxxxxxxxx
CASHRUNWAY_API_KEYSMultiple companies (advanced){"acme":"cr_live_…","globex":"cr_live_…"}

Set exactly one of CASHRUNWAY_API_KEY or CASHRUNWAY_API_KEYS — setting both is a configuration error.

Claude Desktop ​

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

jsonc
{
  "mcpServers": {
    "cashrunway": {
      "command": "cashrunway-mcp",
      "env": {
        "CASHRUNWAY_API_URL": "https://api.cashrunway.ai",
        "CASHRUNWAY_API_KEY": "cr_live_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

If you'd rather not install globally, swap "command": "cashrunway-mcp" for "command": "npx" with "args": ["-y", "@cashrunway/mcp"]. Restart Claude Desktop — the tools appear under the 🔧 icon.

Cursor ​

Edit ~/.cursor/mcp.json (or the per-project .cursor/mcp.json):

json
{
  "mcpServers": {
    "cashrunway": {
      "command": "cashrunway-mcp",
      "env": {
        "CASHRUNWAY_API_URL": "https://api.cashrunway.ai",
        "CASHRUNWAY_API_KEY": "cr_live_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Continue (VS Code / JetBrains) ​

Edit ~/.continue/config.json:

json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "cashrunway-mcp",
          "env": {
            "CASHRUNWAY_API_URL": "https://api.cashrunway.ai",
            "CASHRUNWAY_API_KEY": "cr_live_xxxxxxxxxxxxxxxxxxxx"
          }
        }
      }
    ]
  }
}

Tool reference ​

The tools below are registered in this relative order. Tool ordering is load-bearing — LLMs preferentially pick the first tool that plausibly fits the question, so the three aggregate summary tools sit at the top.

Summary tools (start here) ​

ToolPurposeExample prompt
cashrunway_get_revenue_summaryAR totals + by-status + by-month + top customers, with no individual records. 50× cheaper on tokens than paging through list_invoices for aggregate questions."What's my YTD revenue and who are my top 10 customers?"
cashrunway_get_expenses_summaryAP-side mirror of get_revenue_summary."What did I spend last quarter by month? Top 5 suppliers?"
cashrunway_get_contacts_summaryContact-population aggregates: byType, ABC distribution (80/20 tiering), top customers by LTV, top suppliers by spend."How many customers do I have? Show me my ABC tier breakdown."
cashrunway_get_daily_summaryComposite "how's my business going today?" surface — cash today, last-7d activity, AR aging, 13-week forecast headline, prose narrative field. Best single-call session bootstrap for a generic assistant."How's my business doing today?"

Snapshot tools ​

ToolPurposeExample prompt
cashrunway_get_statusSubscription, key scopes, environment, and the creditSummary — your remaining query credits on the rolling 5-hour window plus a reset estimate. Not a daily quota: the reset is minutes away, never "tomorrow". Exempt from credit counting, so it is safe to poll on session start and to pace a batch against."How many credits do I have left, and when do they reset?"
cashrunway_get_cash_positionToday's cash across all bank accounts, with per-account breakdown."How much cash do I have right now?"
cashrunway_get_forecast13-week forecast — opening, inflow (with optional guaranteed/forecast split), outflow, net, closing."When do I run out of cash?"
cashrunway_get_bank_accountsList of configured bank accounts with reconciled + statement balances."What bank accounts is Cash Runway tracking?"

List tools (for record-level drill-in) ​

ToolPurposeExample prompt
cashrunway_list_invoicesAR invoices, filterable by status / contact / date range / sent. Supports autoPaginate: true (one call, up to 5,000 rows) and totals: true (byStatus + grandTotal across the full filtered set). Add lines: true for line-item expansion, credits: true for credit-note links. Every row carries sent, amountDue, amountPaid."Which invoices did we raise but never send?" / "What does Globex actually still owe?"
cashrunway_list_purchase_ordersXero purchase orders (PO-####) raised against suppliers, filterable by raw Xero status / contact / itemCode / issue-date range. Same autoPaginate + totals flags. Each row carries itemCodes and suppressedReason. Requires the dedicated READ_PURCHASE_ORDERS scope."Which purchase orders commit us to item ZC-RELAY?"
cashrunway_get_purchase_orderDrill into one purchase order by Xero GUID or PO-#### number: adds lineItems (description, quantity, unit amount, line amount, itemCode, accountCode)."What's on PO-0042?"
cashrunway_list_quotesXero sales quotes (QU-####), filterable by raw Xero status (an array of DRAFT, SENT, DECLINED, ACCEPTED, INVOICED, DELETED), contactId, createdBy (part of the creator's name, case-insensitive), issue-date range (dateFrom/dateTo) and expiry-date range (expiryDateFrom/expiryDateTo). limit 1-200 (default 50), cursor (opaque; ignored with autoPaginate), autoPaginate and totals as for invoices. Dates take YYYY-MM-DD, or an ISO-8601 timestamp ending in Z or a numeric offset (e.g. +11:00); anything else, including a timestamp with no zone, is rejected before the request. DELETED is excluded unless you ask for it in status. totals.grandTotal sums every returned status, so filter status: ["DRAFT","SENT"] for the open quoted value (mixed currencies come back as a mixedCurrency block instead of a sum). Requires the dedicated READ_QUOTES scope."What is our open quoted value?" / "Which sent quotes expire this month?"
cashrunway_get_quoteDrill into one quote by Xero GUID (id) or quote number: adds terms and lineItems (description, quantity, unit amount, line amount, discount rate, tax amount, itemCode; no account code)."What's on QU-0042?"
cashrunway_list_billsAP bills — same shape and flags as list_invoices."Which bills are due this week?"
cashrunway_list_credit_notesCredit notes — customer (AR, CN-####) by default; the API also serves supplier (AP) credits via type (customer / supplier / all), with every row carrying type. Filterable by status / contact / date range, plus invoiceNumber / invoiceExternalId for the reverse lookup. Same autoPaginate + totals flags."What credited invoice LR-4359?"
cashrunway_get_credit_noteDrill into one credit note (customer or supplier) by Xero GUID or number: adds lineItems and allocations. A number shared by several credit notes returns an ambiguous error listing each candidate's externalId — re-ask by GUID."What's on CN-0441?"
cashrunway_list_contactsCustomers and suppliers; sort by revenue_desc / spend_desc / recent_desc. Same autoPaginate + totals flags (totals are count-only for contacts — no $ axis)."List my top 20 customers by revenue."
cashrunway_get_contactDrill into one contact: LTV, payment cadence, payment-days median, ABC tier, last invoice / bill, recent paid invoices."Tell me about my relationship with Globex."

A meta-tool, cashrunway_list_companies, is only registered when the server runs in multi-tenant mode (see below).

Invoice send status (sent) ​

cashrunway_list_invoices returns sent on every row — whether the invoice was ever sent to the customer, from Xero's SentToContact. Pass sent: false to find invoices raised but never delivered: money the customer has never actually been asked for. It ANDs with the status / contactId / date filters and narrows totalCount and totals alongside the rows.

It has three states, and conflating two of them produces false accusations:

ValueMeaning
trueSent, or marked as sent by hand in Xero. Not proof an email was delivered.
falseNever sent. The actionable state.
nullUnknown — not yet checked against Xero (records predating this field). The one-off backfill covers open invoices only, so paid history stays unknown until a sync happens to touch it.
  • Never report null as "not sent". It means nobody has looked, not that the invoice was never delivered. Saying otherwise tells an operator they failed to bill a customer they did bill.
  • The filter matches exactly, so sent: false returns only known-unsent rows and never leaks null ones. A small or empty result on an org that hasn't been backfilled is correct, not a bug.
  • Always null on cashrunway_list_bills — you don't send a supplier their own bill. That tool accepts no sent filter, so never answer "which bills did we never send?" from it; every bill reads null, which means unknown, not unsent.
  • An org where every row is null simply hasn't been backfilled yet. Say that, rather than reporting that nothing has been sent.

Outstanding balances (amountDue / amountPaid) ​

cashrunway_list_invoices and cashrunway_list_bills return amountDue (what is still owed) and amountPaid (cash received) alongside amount.

Chase on amountDue — but know why, because amount is probably not what you assume. On an open invoice, amount carries the same number as amountDue; it is not an independent face value. Once the invoice settles it is usually rewritten to the gross total — though not dependably, since an invoice settled by a payment we saw before we re-read the invoice keeps the balance it already had.

Treat amount as not a trustworthy figure on its own: never report a sum of it as invoiced revenue or AP spend. totals: true aggregates the same field, so it carries the same caveat rather than solving it. If asked what was invoiced rather than what is owed, say the available figure is balance-based and name the limitation.

amountDue is the field to read, for two reasons that hold regardless:

  • Honest nulls. Where Xero gave us no balance, amount says 0 — which reads as "settled" — while amountDue says null, meaning unknown. Never render null as 0; say "we haven't checked".
  • Stable meaning. amountDue means outstanding on every row, whatever the status. amount does not.

amountPaid is nullable on the same rule. Never derive it as amount − amountDue: on an open invoice those are the same figure, so you get 0 no matter how much has been paid.

A paid invoice can come back with amountDue: null. When we see a payment for an invoice we have not re-read, we settle the row and retract both money fields to null rather than leave figures that predate the payment — those would show a balance owing on a row the same response calls PAID. We do not write 0 either: one payment does not prove the invoice is settled in full. So null on a paid row means "not re-read yet", and a later sync resolves it.

Credit notes applied to an invoice ​

Two ways to answer "was this invoice credited down?", and both of them are asking rather than inferring — that is the point:

  • From the invoice — pass credits: true to cashrunway_list_invoices / cashrunway_list_bills. Each row gains creditedAmount and creditNotes[] (number, allocation date, amount applied). One call, no search.
  • From the credit-note side — cashrunway_list_credit_notes accepts invoiceNumber / invoiceExternalId, returning only the credits allocated to that invoice.

Do not try to spot a credit from the amounts. Because amount and amountDue hold the same figure on an open invoice, amount − amountDue − amountPaid gets it wrong in both directions:

SituationamountamountDueamountPaidThe subtraction
Open, $296.12 credited down to $22222200 — misses the credit
Open, $500 with $200 paid in cash300300200−200 — invents a credit

The second row is the dangerous one: you would tell an operator an invoice had been credited, and creditedAmount: "0" would contradict you on the next call. On a paid invoice, amountDue: "0" with amountPaid: "0" is a fair hint that a credit note closed it — still confirm with credits: true before saying so.

creditedAmount follows the same three-state discipline: "0" means known-and-none, null means unknown. Both keys are absent when credits: true isn't passed, so their null never means "you didn't ask". Voided credit notes are excluded from the total. Without the sensitive-data scope, a sensitive credit note (sensitive contact, or a line on a sensitive account) is left out of creditNotes[] and creditedAmount becomes null, which withholds the itemisation (the amount may still be inferable from the invoice's own figures). If creditNotes is an array with no null-amount entries, say "credit has been applied that this key cannot see"; a null-amount entry makes it ambiguous, since both can happen at once.

null is not a "wait and it'll fill in" state. An org that has never had a credit note holds no allocation rows either, so it reads nullpermanently — there is nothing pending and nothing to wait for. Report null as "no credit-note data recorded for this org", never as "the backfill is still running": telling an operator their data is still arriving, every day, forever, is the same false-certainty failure this field exists to prevent, just pointed the other way.

Store invoice numbers in their full Xero form when looking them up — 00007717, not 7717. The match is exact, and a short-form lookup reports a credit as absent when it is not.

Voided and deleted documents ​

Voided documents are kept as tombstones and carry voidedAt (when the sync observed the void — Xero does not expose when the operator performed it). They are excluded from every list by default, including from totalCount and totals, and appear only when you name VOIDED or DELETED in status.

So "no invoice matching LR-4371A" is now a reportable fact rather than a hedge — with two limits worth stating out loud when you report it:

  • History reaches back 90 days, or to the sync cursor if that is earlier. Documents voided before this feature shipped were deleted and are gone.
  • As a filter, VOIDED and DELETED are aliases — both select every tombstone. Read each row's xeroStatus to tell a cancelled document from a discarded draft.

Client version

These fields ride the agent API and the MCP/CLI clients mirror them in a paired release. On an older client Zod silently strips them from the wire, and a running MCP server must be restarted after upgrading.

Contact reachability (email) and account classification ​

An AR chase needs a send-to address. GET /api/agent/contacts now returns email, accountNumber, contactStatus and contactDetailsSyncedAt on every row, and GET /api/agent/contacts/{id} adds contactPersons, paymentTerms and contactGroups. Same READ_CONTACTS scope as before — no new scope, no key re-mint.

Take the addresses off the list call, not from a drill per contact. A sweep over 40 customers is one list_contacts call, not 1 + 40. The drill is for when you also need contact persons, payment terms or contact groups.

null means UNKNOWN — never "none". Read it against contactDetailsSyncedAt, the provenance stamp recording when the contact's details were last read from Xero:

emailcontactDetailsSyncedAtWhat you may say
an addressanySend to it.
nulla timestamp"Xero holds no AR contact for this customer." State it plainly — no hedge.
nullnull"We haven't read this contact's details from Xero yet." Never "they have no email."
  • contactDetailsSyncedAt is not lastSyncedAt. The latter only records when the row was last touched and is set on every contact, including ones whose detail fields have never been read.
  • contactPersons and contactGroups distinguish [] (Xero confirms there are none) from null (never read). Don't conflate them.
  • paymentTerms is always present, with null leaves — an absent term is null, never 0. Together with accountNumber and contactGroups it answers "is this counterparty on account, or prepay?"; prefer all three over inferring from any one.
  • Archived contacts are excluded from list_contacts and get_contacts_summary by default — archiving in Xero says the relationship is finished, so they don't belong on a chase list. Pass includeArchived: true to see them. The drill still returns an archived contact by id; check contactStatus.
  • Until the one-off contact-details backfill runs for an org, every row reads contactDetailsSyncedAt: null. That is "not yet synced", not "no contacts on file" — say so.

These fields need MCP 0.1.10 or newer. The MCP server validates responses against its own schema and silently drops fields it does not know, so an older server returns none of this even against an up-to-date API — and a running server keeps the version it started with. If a field documented here is missing, check the server version and restart it before assuming the data is absent.

Purchase-order item codes ​

cashrunway_list_purchase_orders returns itemCodes on every row — the distinct Xero item codes across that PO's line items, stored verbatim, so an agent can see which items a PO covers without a drill per PO. It is always an array ([] when the PO has no coded lines), so no null branch is needed.

Pass itemCode to return only POs containing that code. It ANDs with the status / contactId / date filters and narrows totalCount and totals alongside the rows.

  • Matching is fully case-insensitive in both directions — zc-relay finds a PO stored as ZC-RELAY, and a mixed-case stored code such as TCI-DALI Supply Fit Leads is found by any casing of the query.
  • Single value only. Unlike status, itemCode is not comma-split — a comma-separated list matches nothing.

suppressedReason is unrelated to item codes: when non-null the PO has been matched to a supplier bill and is excluded from the cash-flow forecast to avoid double-counting the outflow.

Quotes ​

cashrunway_list_quotes and cashrunway_get_quote need the dedicated READ_QUOTES scope. It is not implied by READ_INVOICES: a key that can read invoices and bills cannot read quotes unless the scope was granted explicitly. Quotes are read-only and do not feed the forecast.

  • Status. With no status the server returns every status except DELETED; pass status: ["DELETED"] (alone or with others) to include them. totals.grandTotal sums every returned status, so for "open quoted value" pass status: ["DRAFT","SENT"].
  • Sensitive customers. Quotes whose customer is marked sensitive are excluded from quotes, totalCount and totals unless the key carries READ_SENSITIVE. redactedItemCount on the list response is a 0/1 flag, not a count: 1 means this organisation has quotes withheld from this key, independent of the filters; it is always 0 with READ_SENSITIVE. cashrunway_get_quote on a withheld quote is a not-found error, the same as an unknown id.
  • Paging. Default mode returns at most limit rows (default 50, max 200) plus an opaque nextCursor; loop until it is null, passing back the exact nextCursor from the previous page. A malformed or made-up cursor is not rejected and gives unpredictable results (it may restart from the first page or return nothing). With autoPaginate: true the server returns every match in one response (capped at 5,000, truncated: true on overflow) and a cursor passed alongside it is ignored.
  • Dates. dateFrom, dateTo, expiryDateFrom and expiryDateTo are inclusive and take a bare YYYY-MM-DD, or an ISO-8601 timestamp ending in Z or a numeric offset (2026-07-31T00:00:00Z, 2026-07-31T00:00:00+11:00). The tool rejects anything else before calling the server: a timestamp with no zone (2026-12-03T10:00:00), an impossible date such as 2026-13-40, and any other format. The server silently ignores a date it cannot parse (the list comes back unfiltered), and it would read a zone-less timestamp in its own local timezone, shifting the boundary.
  • Money. Amounts are decimal strings in the quote's own currency; total is tax-inclusive. subTotal, totalTax and totalDiscount are null when Xero did not send them, never "0".
  • Numbers are not unique. A quote-number lookup prefers a non-deleted quote, then the most recently updated. lineItems is null when not yet fetched and [] when fetched with no lines.
  • People. Each quote carries createdBy / createdAt, lastEditedBy / lastEditedAt and lastSentBy / lastSentAt. Xero has no such fields on a quote, so the names come from its quote history: they are null until that history has been fetched (newest quotes first, a batch per sync), or when Xero has no such event (a quote never edited has no lastEditedBy). createdBy is who raised the quote in Xero, which is not always the deal owner. createdAt is the Xero creation time. The createdBy input matches part of the creator's name, ignoring case, and narrows the rows, totalCount and totals together; quotes with no history yet never match.

Quote tools need MCP 0.3.0 or newer; the people fields and createdBy need 0.3.1. A running server keeps the version it started with and silently drops fields it does not know.

Example prompts the agent should reach for first ​

These five questions cover ~80% of the agent's day-one usage. Each maps to one or two tools; the rest of the surface is for follow-up drills.

  1. "How's my business doing today?" → get_daily_summary.
  2. "What's my YTD revenue?" → get_revenue_summary (no dateFrom/dateTo — defaults to the current financial-year YTD).
  3. "Who are my top 5 customers?" → get_revenue_summary with topN: 5, or get_contacts_summary for LTV-based tiering.
  4. "What invoices are overdue?" → list_invoices with status: "AUTHORISED" and a to date in the past.
  5. "How much have I billed this month?" → get_revenue_summary with dateFrom / dateTo set to the calendar month.

Pagination and token savings ​

Three flags / fields exist on the list tools to keep agent-driven calls cheap and correct:

  • totalCount (always present in every list response) — the pre-redaction count of rows matching the filter. Cheapest way to answer "how many?" without paying for autoPaginate or totals. May exceed the page array length when sensitive contacts/accounts are dropped — see redactedItemCount for the delta.
  • autoPaginate: true — the server walks every page of the filtered set in one response, capped at 5,000 rows. If the cap is hit, the response sets truncated: true and the agent should drop autoPaginate and fall back to cursor pagination. Replaces the cursor-loop pattern for "give me everything matching this filter".
  • totals: true — folds an opt-in byStatus + grandTotal aggregation across the full filtered set into the response (not just the current page). Lets an agent answer "how much is outstanding on AR?" without scanning rows. Multi-currency sets short-circuit to mixedCurrency: true (no fake cross-currency sum); matched sets above 100,000 rows set totalsTruncated: true and the agent should narrow the filter.

When the question is aggregate ("how much / how many / who's top"), the summary tools are still the right answer — they're ~50× cheaper than even a totals: true list call because they don't ship row records at all.

Sensitive-data handling ​

By default, the server drops contacts and accounts the operator has flagged sensitive from list endpoints and rewrites their display name to "Sensitive contact" / "Sensitive account" on composite endpoints. Totals always reconcile against the operator's ledger — only names are gated. Each response carries a redactedItemCount so the agent knows it's operating on a masked view.

Issue a key with READ_SENSITIVE only when the agent genuinely needs full visibility (e.g. an internal CFO copilot). The scope cannot be added to an existing key — rotate-and-recreate to keep the grant auditable. See Sensitive accounts and contacts for the full audit trail.

Advisory partner keys (multi-client) ​

Advisors install the same @cashrunway/mcp server — they just authenticate with a partner key instead of a single-org user key. A partner key starts with crun_… and reaches every client org linked to your practice, where a cr_live_… user key is bound to one org. Partner keys are minted in the Partner Portal → API keys, not under an individual business's Settings → API keys. Wire it in exactly like a user key:

json
{
  "mcpServers": {
    "cashrunway": {
      "command": "cashrunway-mcp",
      "env": { "CASHRUNWAY_API_KEY": "crun_…" }
    }
  }
}

Two tools power the partner flow:

  • cashrunway_list_orgs — call it on connect. It reports keyKind (PARTNER vs USER) and the reachable client orgs, returning { keyKind, orgs: [{ id, name, slug }], summary }. For a partner key the summary reads "Connected as partner → N clients."; for a user key it lists the single org the key belongs to.
  • cashrunway_get_daily_brief — takes a required org argument (an id from list_orgs) and returns that client's latest daily brief. Partner keys are multi-client and have no implicit default org, so the agent must name the client per call.

Usage is metered to each client's account. Point the agent at one client at a time by passing its org.

Multi-tenant routing (advanced) ​

If you manage several Cash Runway companies from one MCP client, set CASHRUNWAY_API_KEYS to a JSON object of {company_key: cr_live_…}. Each tool then exposes an optional company argument that becomes required in multi-tenant mode, and an extra tool cashrunway_list_companies is registered so the agent can discover the configured keys.

Company keys must match ^[a-z0-9_-]+$. Most users are better served by registering the binary once per company under different MCP names — see the MCP README for both patterns side by side.

  • API keys — provisioning, rotation, audit, sensitive scope.
  • Agent API — endpoint surface and daily-summary tour.
  • API Reference — full schema catalogue.
  • CLI — same surface as a cashrunway shell binary.

Released under a proprietary license. · cashrunway.ai