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.
| Assistant | Works today | How it connects |
|---|---|---|
| Claude Code | Yes | One claude mcp add command, with the API key in a header |
| Claude Desktop | Yes | The mcp-remote bridge (needs Node.js), with the key in a headers file |
| Cursor | Yes | mcp.json, with the key in a header |
| OpenAI Codex | Yes | config.toml, with the key in an environment variable |
| claude.ai, web and mobile | Not yet | Custom connectors there sign in with OAuth |
| ChatGPT | Not yet | Its 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.
| Tool | What it does |
|---|---|
| get_company_overview | Cash, burn, runway, MRR, AR and AP, close status and what needs attention |
| list_accounts | The chart of accounts |
| get_financial_report | Any report, from the trial balance to SaaS metrics |
| search_journal_entries | Find entries by memo, account, dates, status or source |
| list_customers | Customers and what they owe |
| list_open_invoices | Invoices not yet paid |
| list_vendors | Vendors and what is owed to them |
| list_open_bills | Bills not yet paid |
| list_unmatched_bank_transactions | Unmatched bank lines, with ranked match suggestions and reasons |
| run_controls | The 11 continuous controls and their evidence |
| detect_anomalies | Duplicates, outliers and risky manual entries |
| flux_analysis | Changes by account against the prior period, with what drove them |
| close_status | The close checklist and what is left |
| accrual_suggestions | Recurring vendors that haven’t billed this month |
| verify_ledger | Checks the SHA-256 hash chain over posted entries |
| propose_journal_entry | Drafts a journal entry for a person to approve |
| propose_accrual | Drafts 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_KEY07How 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.
