Back to Discover

core

connector

truecalc

MCP server exposing TrueCalc spreadsheet formula evaluation as tools for AI assistants.

View on GitHub
0 starsSynced Aug 5, 2026

Install to Claude Code

/plugin marketplace add truecalc/core

README

@truecalc/core

npm npm downloads truecalc-core truecalc-mcp docs.rs license functions Google Sheets Conformance

WebAssembly-powered spreadsheet formula engine for JavaScript/TypeScript.

DeepWiki

A comprehensive library of spreadsheet functions (see the live count above). Runs in Node.js, Bun, Deno, and the browser — no server needed. Ground-truth conformance against real Google Sheets. The same engine is also available as a Rust crate and as an MCP server for AI assistants.

const { evaluate } = require('@truecalc/core');
evaluate('SUM(A1, B1)', { A1: 100, B1: 200 })
// => { type: 'number', value: 300 }

Install

npm install @truecalc/core

Usage

Node.js (CJS)

Works out of the box — no bundler configuration needed.

const { evaluate, validate, list_functions } = require('@truecalc/core');

const result = evaluate('SUM(A1, B1)', { A1: 100, B1: 200 });
// => { type: 'number', value: 300 }

Vite

Install the wasm plugin first:

npm install -D vite-plugin-wasm

Add it to vite.config.js:

import wasm from 'vite-plugin-wasm';

export default {
  plugins: [wasm()],
};

Then import and use normally:

import { evaluate } from '@truecalc/core';

const result = evaluate('IF(A1 > 0, "yes", "no")', { A1: 1 });
// => { type: 'text', value: 'yes' }

webpack 5

webpack 5 supports WebAssembly natively. Enable the experiment in webpack.config.js:

module.exports = {
  experiments: {
    asyncWebAssembly: true,
  },
};

API

evaluate(formula, variables)

Evaluates a formula with the given variable bindings.

evaluate('SUM(A1, B1)', { A1: 100, B1: 200 })
// => { type: 'number', value: 300 }

evaluate('CONCAT("Hello, ", name)', { name: 'world' })
// => { type: 'text', value: 'Hello, world' }

Return value shape:

typeShape
number{ type: 'number', value: 6 }
text{ type: 'text', value: 'yes' }
boolean{ type: 'boolean', value: true }
error{ type: 'error', error: '#NAME?' }
empty{ type: 'empty', value: null }

validate(formula)

Checks whether a formula is syntactically valid without evaluating it.

validate('SUM(A1, B1)')  // => { valid: true }
validate('SUM(A1,')      // => { valid: false, error: '...' }

list_functions()

Returns metadata for all built-in functions.

const fns = list_functions();

Documentation

docs.truecalc.app

Rendered live from truecalc/core's GitHub README — not stored, always reflects the source repo.

1 Install Method

NameDescriptionCategorySource
cargo packageInstall via cargo (stdio transport)mcp-servertruecalc-mcp

0 Comments

Login required
Log in to post a comment or update on this repo.

No comments yet — be the first to share an update.