Build an MRR MCP server

Updated 2026-08-04

Model Context Protocol lets an AI client call tools rather than guess. For revenue data that means asking "what's my MRR?" and getting the actual number, computed from your actual subscriptions.

Adding the FRGMNT server

claude mcp add frgmnt -- npx tsx /path/to/frgmnt/mcp/server.mts

Then ask naturally:

what's my MRR right now? list today's Stripe transactions over $100 which platform grew most this month?

The tools it exposes

Tool Arguments Returns
get_mrr { demo?: boolean } True MRR, ARR, active subs, per-platform split
get_today { demo?: boolean } Gross, refunds, fees, net
list_transactions { platform?, limit? } Recent transactions, newest first
validate_key { platform, key } Whether a key works
send_test_push { token, message } Fires a test notification

Why every tool is read-only

This is the design decision that matters. An MCP server is invoked by a model, and models are steerable by whatever text lands in their context — including text from a source you don't control.

If a tool could issue a refund, a sufficiently unlucky prompt could issue a refund. So none of them can. The underlying credentials are restricted read-only keys that cannot move money, alter subscriptions or create further keys. The worst case is that the assistant reports a number you didn't ask for.

Build your own with the same constraint. Read-only is not a limitation here; it's the safety property.

Implementation notes

The server runs over stdio, which means no network listener and no port — the client spawns it as a subprocess. That's the right transport for something holding credentials.

It's an .mts file because the MCP SDK is ESM-only and uses top-level await. This trips people up: a .ts file with CommonJS interop will fail on import.

The tools themselves are thin. Each one calls the same framework-free adapters the app and CLI use, so get_mrr runs the identical interval normalisation as the phone. There is no second implementation to drift.

Where it's genuinely useful

Less "chat with my revenue" novelty, more:

Full tool reference: the developer page.

Frequently asked

What is an MCP server?

A Model Context Protocol server exposes tools an AI client can call. Instead of pasting numbers into a chat, the assistant queries your data directly through a defined tool interface.

Is it safe to give an AI assistant access to revenue data?

It depends on the scope. An MCP server built on read-only API keys can report figures but cannot change anything. The assistant sees your numbers, so the same disclosure considerations as any analytics tool apply.

Read next