Skip to main content

MCP Server

lim includes a native Model Context Protocol (MCP) server. Any MCP-compatible AI client — Claude Code, Claude Desktop, Cursor, or custom agents — can connect to lim and perform accounting operations.

Quick Setup

Register lim as an MCP server with a single command:
This adds lim to your MCP configuration file (~/.config/claude/claude_desktop_config.json or .claude/mcp.json depending on your client). The generated configuration looks like:
Run lim auth login first to ensure you have valid credentials. The MCP server uses the same authentication token as the CLI.

Manual Configuration

If you prefer to configure manually:

MCP Resources

Resources are read-only data that AI agents can access for context. They do not modify any data.

trial-balance

Returns the current trial balance — all account balances for the current fiscal year. The agent uses this to understand the company’s financial position. Example interaction:

accounts

Returns the full chart of accounts with codes, names, types, and normal balance directions. Essential for the agent to know which accounts exist when creating journal entries.

journal-entries

Returns recent journal entries. The agent uses this to understand transaction patterns and verify its own work.

bank-transactions

Returns bank transactions, including unmatched ones that need classification. This is the primary input for autonomous bookkeeping.

alerts

Returns currently triggered alerts (cash runway low, unusual spending, budget overrun, etc.). The agent can proactively notify humans about issues.

cash-runway

Returns cash runway calculation: current cash balance, monthly burn rate, and estimated months remaining. Computed from the last 3 months of data. Example response:

scenario diff

Returns the impact of a scenario on the trial balance. Shows what changes if the scenario’s virtual entries were real.

MCP Tools

Tools are actions that modify data. Each tool call creates audit-logged events.

create_journal_entry

Create a new journal entry with explicit debit/credit lines. Input schema:
Example interaction:
Total debits must equal total credits. The tool will return an error if the entry doesn’t balance.

match_bank_transaction

Run the 3-step judgment engine on a bank transaction to suggest the correct journal entry. Input schema:
Returns: A judgment result with the suggested account classification, confidence score, and which step resolved it (rule, history, AI, or escalated). Example interaction:

generate_scenario

Generate virtual journal entries for a scenario (e.g., “What if we hire 2 engineers?”). Input schema:

apply_scenario

Promote a scenario’s virtual entries to real journal entries. This is irreversible. Input schema:
Example interaction:

Combining Resources and Tools

The real power of MCP is combining reads and writes in a single conversation:

Troubleshooting

”Company not found” error

Make sure LIM_COMPANY_ID is set in your MCP configuration or that you’ve run lim companies use <id>.

”Unauthorized” error

Your auth token may have expired. Run lim auth login to refresh it.

Tools not appearing

Restart your MCP client after adding the lim server. Most clients require a restart to pick up new MCP servers.