Skip to main content
Your billing stack is the one system you least want to context-switch into. The Model Context Protocol lets you skip the dashboard entirely: connect Claude, Cursor, ChatGPT, or any MCP-capable client and just ask. Macropay runs a hosted MCP server at https://mcp.macropay.ai that any of those clients can reach after a single OAuth click — no API key to paste, no SDK to install, no glue code.
MCP hands an AI agent auth-aware, structured tool access to the exact data the dashboard renders — read live from your organization, never cached. The rule of thumb: anything you can do by clicking in the dashboard, you can do by asking the agent.
Because Macropay is the Merchant of Record, the numbers the agent reads back are already net of the work most platforms leave to you — sales tax and VAT are remitted on your behalf, disputes are handled, and your tax liability is capped. The agent reports on settled, MoR-clean revenue, not a raw gateway feed.

Things to ask once you’re connected

Connect, then talk to your assistant in plain English. Every prompt below maps to real tools and works today. Revenue & growth
  • “What’s my MRR right now, and how does it compare to last week?”
  • “Total settled revenue this month vs. last month — show the delta.”
  • “Rank my top 10 customers by spend over the last 30 days.”
  • “What’s my 30-day churn rate? How many subscriptions did I lose?”
  • “Pull every order above $500 placed today.”
Customer operations
  • “Refund order ord_9f2c in full, then draft a confirmation email.”
  • “Pause cus_h4k2’s subscription indefinitely and note why.”
  • “Payment pay_3Ta1 was declined — what happened and what do I tell them?”
  • “Cancel every subscription that’s been past due longer than 14 days.”
Catalog & pricing
  • “Spin up a ‘Scale’ plan at $99/month with a 14-day trial.”
  • “Attach a $990 annual price to the Scale product.”
  • “List every product I sell with its active prices.”
Forensics
  • “Group every failed payment in the last 7 days by decline reason.”
  • “Find my newest dispute and tell me which evidence to file.”
  • “Which webhook endpoints failed delivery in the last 24 hours?”
Agentic teams: the same OAuth flow that authorizes Claude works for an autonomous agent you build. Mint a scoped token, point your agent’s MCP client at mcp.macropay.ai, and it can reconcile revenue or process refunds the same way a human operator would — every call captured in the audit log.

Connect in five minutes

The true one-click path.
  1. Open Claude Desktop, go to Settings (⌘,) → Connectors.
  2. Choose Add custom connector.
  3. Enter:
    • Name: Macropay
    • Server URL: https://mcp.macropay.ai/mcp/macropay-mcp
  4. Hit Connect.
  5. A browser tab opens at app.macropay.ai/oauth2/authorize. Sign in, choose the organization to grant, and click Allow.
  6. The tab closes on its own. Macropay’s tools now appear in Claude, ready to use.
Sanity check it with “What’s my MRR right now?” — Claude will show mrr_snapshot in its tool-use panel and answer.

Your first multi-tool prompt

With the connector live, open Claude (Desktop or Web) and paste this:
“Give me a snapshot of my Macropay account: today’s revenue, current MRR, 30-day churn, and my top 5 customers by 30-day spend.”
Claude chains four tools — revenue_today, mrr_snapshot, churn_30d, top_customers — and stitches the results into one answer. A “Calling Macropay…” indicator flashes per call. The first tool call surfaces a one-time consent dialog in your client. After that, reads run silently. Anything that mutates — refunds, plan creation, cancellations — always asks for explicit confirmation, every time.

The toolbox

55 tools, grouped by what they touch.

Read-only

The metering tools matter for usage-based and AI billing: ask “how many metered events has cus_h4k2 logged this cycle?” and the agent reads the customer’s meters straight from the same pipeline that aggregates ingested events into billable usage.

Mutations (client confirms each one)

Composed analytics

Each of these fans out to several primitives and returns one synthesized answer — faster and more reliable than asking the agent to assemble the calls itself.

Agentic commerce (opt-in)

Let the agent act, not just read — create payment links and meter usage on your behalf. These two are off by default; an org admin enables them under Settings → Integrations → MCP, and the connecting token must carry the write scope. Full guide: Agentic Commerce via MCP. If either gate is missing, the tool returns a clear agentic_commerce_disabled message instead of silently failing.

Health


How authorization works

Clicking Connect runs this flow:
1

Client opens the authorize endpoint

Your MCP client (Claude, Cursor, etc.) opens https://mcp.macropay.ai/oauth/authorize?....
2

Macropay prompts you to sign in

You’re redirected to app.macropay.ai/oauth2/authorize.
3

You pick one organization

The grant is scoped to a single org — if you run several, the token only ever sees the one you choose here.
4

You approve the scope list and click Allow

Macropay shows exactly which scopes the connector requests.
5

The client stores an Organization Access Token

It receives an Organization Access Token (macropay_oat_…) and sends it as a bearer on every subsequent tool call.
Scopes requested at install:
Tokens are org-scoped, revocable from the dashboard at any time (see revoking access), and structurally cannot read another organization’s data.

Token-based auth (Organization Access Token)

If your client can’t do OAuth, mint a long-lived Organization Access Token (OAT) and drop it into the client config.
1

Create the token

Dashboard → Settings → Developers → Organization Access Tokens → Create.
2

Name and scope it

Give it a descriptive name (e.g. cursor-ci-runner) and select scopes.
3

Copy it now

The value (starting macropay_oat_…) is shown once. Closing the modal hides it for good.
4

Wire it into the client as a bearer

OATs don’t expire by default and can be revoked from the dashboard whenever you want.

Revoking access

Three interchangeable routes, all immediate:
  • Dashboard — Settings → Developers → Organization Access Tokens → Revoke on the row.
  • Client — Claude Desktop → Connectors → Macropay → Disconnect (revokes server-side too).
  • APIDELETE /v1/organization-access-tokens/{id} with any valid auth.
The token dies on the spot. The next call from any client still holding it gets 401 invalid_token.

Security model

Macropay is PCI DSS Level 1 compliant. Card data is tokenized in our PCI-compliant vault and never reaches the MCP layer — tools operate on customers, orders, and subscriptions, never raw card numbers.

Troubleshooting

Give it 10 seconds and refresh. The first connect provisions the tool catalog from the server — usually instant, occasionally slower on a bad network. Still empty after 30s? Disconnect and reconnect.
Your client is using a redirect URL we haven’t pre-registered. Email support@macropay.ai with the URL — registering it is a one-line change.
The token was revoked — by you, an admin, or the dashboard’s rotation policy. Disconnect and reconnect in your client.
The connector holds a narrower scope set than the tool needs — usually because it was granted before a newer write scope existed. Reconnect; the OAuth screen will list the updated scopes.
Same root cause: the client requested read-only scopes. Reconnect with the write scopes ticked.
ChatGPT custom connectors need a paid plan (Pro / Team / Enterprise). Free accounts can’t use remote MCP servers yet.
Get specific. “Run revenue_today” forces the composed tool. If a generated tool’s description reads ambiguously, file an issue — we can hand-author a clearer override.

FAQ

Yes. The MCP server shares infrastructure with the Macropay dashboard — same SLA, same audit trail. Use a dedicated OAT per environment (not a Claude Desktop OAuth token) so you can rotate each one independently.
Yes. Connect with a sandbox-mode OAT (Dashboard → Sandbox → Settings → Developers → OATs) rather than the OAuth flow. The same mcp.macropay.ai URL serves it — your auth determines which org and mode you hit.
No. MCP usage adds nothing beyond your normal Macropay account — no per-call surcharge.
Mint an OAT scoped to *:read only and share it through your secrets manager. Finance pastes it into their MCP client, asks revenue / churn / customer questions all day, and can never mutate a thing.
Not in v1. Merchant-defined tools (e.g. “fetch the customer’s HubSpot record”) are on the table for v2 — tell us if you’d use it.
Tool calls run through the same FastAPI routes the dashboard uses. The MCP server stores, caches, and logs nothing about the responses — only that a call happened. Your AI client holds the response locally; it leaves your machine only if that client forwards it to its own backend (Anthropic, OpenAI, and Cursor do this for inference, per their privacy policies).
Dashboard → Settings → Developers → Audit Log. Filter by OAT name to scope it. Each row shows timestamp, tool, HTTP status, and response time.

Patterns worth keeping

Once connected, your assistant reaches as far into operations as a dashboard-fluent engineer. A few setups that pay off:
  • Daily digest — pin “Give me a morning Macropay digest” in your client and run it each morning. The agent calls revenue_today + mrr_snapshot + churn_30d + list_payments (filtered to failures) and writes you a brief.
  • Support triage — when a customer flags a failed charge, paste the payment id and say “explain this failure and draft a reply.” The agent runs explain_payment_failure + get_customer and produces the email.
  • Board-ready QBR“Build a QBR for Q3: revenue, MRR trajectory, top customers, churn, biggest disputes — output markdown.” The agent fans out a dozen calls and assembles the doc.

Stuck on a use case?

Email support@macropay.ai with your prompt and the agent’s output. We’re continuously tuning tool descriptions so agents reach for the right one.