TrueCalc
Model Context Protocol · stdio

Your agent should not be doing arithmetic in its head.

TrueCalc’s MCP server gives any compatible client 518 spreadsheet functions and a workbook that survives the whole conversation. It runs on your machine, over stdio, with no account and no network.

The problem

Models are confident about numbers they cannot compute.

Not a prompting problem. These are questions where the correct answer depends on an algorithm, a calendar, or an engine’s rounding rule — none of which live in a model’s weights.

“What is 30 April plus 45 business days?”

Business-day arithmetic needs a calendar and a holiday list. A model pattern-matches its way to a plausible date.

“What is the IRR of these twelve cash flows?”

IRR has no closed form. It is solved iteratively — which is arithmetic a language model cannot actually perform.

“Round 2.675 to two decimals, the way my spreadsheet does.”

The answer depends on the engine, not on mathematics. Ask three models and you will get more than one answer.

With the MCP server connected, the model stops answering these and starts calling them. It writes the formula; the engine computes it; and the number that comes back is the same number Google Sheets gives.

Step one

Install the server.

A single binary. Pick whichever route suits your machine — they all produce the same executable.

Cargo

cargo install truecalc-mcp

Builds from source. Any platform with a Rust toolchain.

Homebrew

brew install truecalc/mcp/truecalc-mcp

macOS and Linux, Apple Silicon and x86_64.

Binstall

cargo binstall truecalc-mcp

Fetches the prebuilt binary — no compile.

Prebuilt binaries for macOS, Linux and Windows are attached to each core release if you would rather not build or install anything.

Step two

Point your client at it.

Four clients, one binary. Replace the path with wherever the install put it — `which truecalc-mcp` will tell you.

Claude Code

claude mcp add truecalc -- ~/.cargo/bin/truecalc-mcp

One command. Use an absolute path if your shell does not expand ~.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json

mcp config
{
  "mcpServers": {
    "truecalc": {
      "command": "/Users/you/.cargo/bin/truecalc-mcp"
    }
  }
}

On Windows: %APPDATA%\Claude\claude_desktop_config.json. Restart the app afterwards.

Cursor

~/.cursor/mcp.json — or .cursor/mcp.json for one project

mcp config
{
  "mcpServers": {
    "truecalc": {
      "command": "/Users/you/.cargo/bin/truecalc-mcp",
      "args": []
    }
  }
}

VS Code

.vscode/mcp.json

mcp config
{
  "servers": {
    "truecalc": {
      "type": "stdio",
      "command": "/Users/you/.cargo/bin/truecalc-mcp",
      "args": []
    }
  }
}

VS Code uses "servers", not "mcpServers". Everything else is identical.

What your agent gets

Twelve tools.

Six are stateless — ask a question, get an answer. The other six open a workbook that persists for the life of the session, so an agent can build a model across many turns instead of re-sending the whole sheet every time.

A session holds up to 32 workbooks, with imports capped at 256 MiB in aggregate. Everything stays in the server process on your machine.

evaluateEvaluate a formula, with optional variable bindings.
batch_evaluateEvaluate many formulas over one set of bindings.
validateCheck that a formula parses before you trust it.
explainDescribe a formula and list every function it reaches for.
list_functionsThe whole catalogue, with category, syntax and description.
get_statsFunction count, library version, per-category breakdown.
workbook_createOpen a workbook. The engine flavour locks at creation.
workbook_setWrite a value or a formula to a cell, in A1 notation.
workbook_getRead a cell’s effective value, spills resolved.
workbook_recalcRecalculate, and get back exactly which cells changed.
workbook_exportExport the session as canonical JSON.
workbook_importLoad a workbook from canonical JSON.

What it looks like

The workbook outlives the turn.

This is the difference between a calculator tool and a spreadsheet. The agent builds a model once, then interrogates and revises it — and every intermediate value stays addressable.

A session, abbreviated
// A workbook needs a sheet, and create makes none —
// so the agent imports one canonical JSON document.
workbook_import({ json: '{"engine":"sheets","version":"1",' +
                        '"sheets":[{"name":"Loan","cells":{}}],"names":[]}' })
// => { workbook_id: 'wb_2' }

// A formula is a value that starts with '='.
workbook_set({ workbook_id: 'wb_2', sheet: 'Loan',
               cell: 'A1', value: '250000' })
workbook_set({ workbook_id: 'wb_2', sheet: 'Loan',
               cell: 'A2', value: '0.065' })
workbook_set({ workbook_id: 'wb_2', sheet: 'Loan',
               cell: 'A3', value: '=PMT(A2/12, 360, -A1)' })
// => { ok: true }

workbook_recalc({ workbook_id: 'wb_2' })
// => { changes: [ { sheet: 'Loan', cell: 'A3',
//                   before: { type: 'empty', value: null },
//                   after:  { type: 'number', value: 1580.1700587324133 } } ] }

workbook_get({ workbook_id: 'wb_2', sheet: 'Loan', cell: 'A3' })
// => { type: 'number', value: 1580.1700587324133 }

// Twenty turns later the sheet is still there,
// and it exports as canonical JSON.
workbook_export({ workbook_id: 'wb_2' })

One command, and your agent can count.

claude mcp add truecalc -- ~/.cargo/bin/truecalc-mcp

MIT licensed. Runs locally. Nothing leaves your machine.

Every other way to install TrueCalc →