A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator)

by carlomagnoglobal

210 downloads
Not rated
GitHub

About

A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator) that works as:

Details

Author
carlomagnoglobal
Downloads
210
Categories
Other, Finance

- 351 builtins (100%+ coverage of calc’s ~350 functions)
- Exact rational arithmetic – no floating‑point approximations
- Three interfaces: CLI, web REPL, and MCP server
- Arbitrary‑precision transcendentals via Taylor series and Newton’s method
- User‑defined functions, control flow (if/else, while, for), and lists
- Session‑configurable precision and display mode

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Build with cargo build --release. Use the CLI via rcalc 'expression', the web REPL with rcalc-web (served on localhost:8888), or the MCP server with toRustCalcMCP --mcp. For MCP, perform the initialize handshake then call tools like calc_eval, calc_config, or calc_functions. A detailed MCP tool schema is provided in the repository.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "a rust port of calc (landon curt noll's arbitrary-precision calculator)": {
            "toRustCalcMCP": {
                "command": "docker",
                "args": [
                    "run",
                    "-i",
                    "--rm",
                    "ghcr.io/carlomagnoglobal/torustcalcmcp:latest"
                ]
            }
        }
    }
}

McpServers

{
    "toRustCalcMCP": {
        "command": "docker",
        "args": [
            "run",
            "-i",
            "--rm",
            "ghcr.io/carlomagnoglobal/torustcalcmcp:latest"
        ]
    }
}

toRustCalcMCP

A Rust port of calc (Landon Curt Noll's
arbitrary-precision calculator) that works as:

- rcalc — a calc-compatible command-line calculator
- Web REPL — browser-based interactive calculator
- MCP server — JSON-RPC 2.0 over stdio for LLM/agent integration

Three interfaces, one engine. The numeric core uses exact rational arithmetic
(num-rational over num-bigint), which is the same model calc uses natively —
so 1/3 * 3 is exactly 1, and 2^256 is computed to the last digit.

👉 Getting Started in 2 minutes — new to rcalc? Start here.
👉 Install as Claude Desktop MCP — integrate with Claude Desktop.

Build

```sh
cargo build --release

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.