Skip to content

RareMargin runs an MCP server at https://raremargin.com/mcp, so an AI assistant can read your books and draft entries for a person to approve. Claude Code, Claude Desktop, Cursor and OpenAI’s Codex connect to it today with a RareMargin API key. claude.ai and the ChatGPT app don’t yet, because they connect custom servers through OAuth sign-in.

AssistantWorks todayHow it connects
Claude CodeYesOne claude mcp add command, with the API key in a header
Claude DesktopYesThe mcp-remote bridge (needs Node.js), with the key in a headers file
CursorYesmcp.json, with the key in a header
OpenAI CodexYesconfig.toml, with the key in an environment variable
claude.ai, web and mobileNot yetCustom connectors there sign in with OAuth
ChatGPTNot yetIts apps sign in with OAuth

01Can I use RareMargin from Claude?

Yes, from Claude Code and Claude Desktop, with a RareMargin API key. On claude.ai and the Claude mobile apps, custom connectors sign in with OAuth, which RareMargin’s MCP server doesn’t offer yet.

02Can I use RareMargin from ChatGPT?

Not inside the ChatGPT app yet: its apps sign in with OAuth, and RareMargin’s MCP server takes an API key. OpenAI’s Codex connects to RareMargin today, reading the key from an environment variable.

03What can an AI assistant do in RareMargin?

It gets the same 17 tools as RareMargin’s built-in assistant: 15 read the books, and 2 draft a journal entry or an accrual that waits for a person to approve it.

So it can answer questions like these from your own books:

  • What is our runway, and what changed in burn since last month?
  • Which customers owe us money, and which invoices are overdue?
  • Which bank lines are still unmatched, and what do they probably match?
  • Did any control fail, and what is the evidence?
  • Which recurring vendors haven’t billed this month? Draft accruals for them.
ToolWhat it does
get_company_overviewCash, burn, runway, MRR, AR and AP, close status and what needs attention
list_accountsThe chart of accounts
get_financial_reportAny report, from the trial balance to SaaS metrics
search_journal_entriesFind entries by memo, account, dates, status or source
list_customersCustomers and what they owe
list_open_invoicesInvoices not yet paid
list_vendorsVendors and what is owed to them
list_open_billsBills not yet paid
list_unmatched_bank_transactionsUnmatched bank lines, with ranked match suggestions and reasons
run_controlsThe 11 continuous controls and their evidence
detect_anomaliesDuplicates, outliers and risky manual entries
flux_analysisChanges by account against the prior period, with what drove them
close_statusThe close checklist and what is left
accrual_suggestionsRecurring vendors that haven’t billed this month
verify_ledgerChecks the SHA-256 hash chain over posted entries
propose_journal_entryDrafts a journal entry for a person to approve
propose_accrualDrafts an accrual, reversing next month, for approval

04How do I get a RareMargin API key for an AI assistant?

An admin creates one in RareMargin under Settings, API & MCP, and picks its role: a Viewer key only reads, and an Accountant key can also draft entries and accruals for approval.

The full key, which starts with ck_, is shown once, so store it in a password or secret manager. Name the key after the assistant, such as “Claude Code”. An Admin key has full access, which an assistant doesn’t need.

05How do I connect Claude Code to RareMargin?

Run one command with your API key, and Claude Code lists RareMargin under /mcp. Add --scope user to use it in every project.

claude mcp add --transport http raremargin https://raremargin.com/mcp \
  --header "Authorization: Bearer $RAREMARGIN_API_KEY"

06How do I connect Claude Desktop to RareMargin?

Claude Desktop reaches RareMargin through mcp-remote, a small bridge that runs on Node.js. Add it to claude_desktop_config.json, and keep the API key in a separate headers file.

The file is ~/Library/Application Support/Claude/claude_desktop_config.json on a Mac and %APPDATA%\Claude\claude_desktop_config.json on Windows. Add:

{
  "mcpServers": {
    "raremargin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://raremargin.com/mcp",
        "--header-file",
        "/path/to/raremargin-headers.txt"
      ]
    }
  }
}

Put this one line in the headers file, then restart Claude Desktop:

Authorization: Bearer YOUR_API_KEY

07How do I connect Cursor to RareMargin?

Add RareMargin to Cursor’s mcp.json, in ~/.cursor for every project or in a project’s .cursor folder, with the API key in a header.

{
  "mcpServers": {
    "raremargin": {
      "url": "https://raremargin.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:RAREMARGIN_API_KEY}"
      }
    }
  }
}

Cursor fills in ${env:RAREMARGIN_API_KEY} from your environment, so the key stays out of the file.

08How do I connect OpenAI’s Codex to RareMargin?

Add RareMargin to ~/.codex/config.toml, and Codex sends the API key from an environment variable as a Bearer token.

[mcp_servers.raremargin]
url = "https://raremargin.com/mcp"
bearer_token_env_var = "RAREMARGIN_API_KEY"

09Is it safe to let an AI assistant into my books?

An assistant can do only what its key’s role allows, and RareMargin’s two write tools create approval requests, never postings, so a person decides what reaches the ledger.

API keys can’t approve anything. Every proposal made over MCP waits for a person, whatever approval rules the company has set, and records that it came over MCP. Revoking the key in Settings cuts the assistant off at once.

Sources

Continuous close

Stop closing the books. Keep them closed.

Start a 14-day trial on your own data, or on a sample SaaS company with 14 months of history. No card needed.

Three desk objects on a green stage: a tray of blue month cubes, a console of toggle switches with a lit button, and a keyboard of keycaps under a monitor of code.