Skip to main content
Glama

Ultimath MCP

停止捏造数字。 一个 MCP 服务器,将每个数学表达式并行送入八个相互独立的引擎——exact symbolic、ball、interval、三种不同的任意精度浮点数、deferred symbolic 和 IEEE 754,每种引擎都有各自的失效模式——并将全部八个读数并排返回;因此当它们不一致时,你就知道这个答案在数值上是不可靠的。

Engine

功能

Exact symbolic

精确算术:判定一个值,而不是对它做近似

Multiprecision

Ball 算术,全程携带严格半径

Interval

严格的下/上界(保证包围)

Binary float

任意精度二进制浮点数,底层不使用 GMP

PARI/GP

不使用 GMP 构建:拥有自己的整数与超越函数内核

NTL RR

精确整数尾数 × 2^e;只有运算会舍入

Deferred symbolic

在求值之前重写:抵消永远不会被舍入

IEEE-754 double

标准硬件浮点数

每个引擎各自担保什么

读出八个数字只是答案的一半。每个引擎还会说明它为自己的输出担保到什么程度——而且这三种答案并不是同一度量上的不同程度:

字段

引擎在说什么

"exact": true

它持有该值。读数只是它的一个截断:你每多要一位数字,那一位就是这个数本身的一位数字,而不是更接近的近似。

"digits": N

它自己的误差界覆盖前 N 位有效数字。0 是一个真实的答案——这正是灾难性抵消对某个值所造成的影响。

两者皆无

它不携带任何误差界。它按你要求的位数打印了那么多位数字,却无法对其中任何一位作出任何说明。

最后那一行不是 0,而它正是其他引擎存在的原因。八个中有五个从构造上就是为此而存在的。

在 exp(pi*sqrt(163)) - 262537412640768744 上,一个引擎打印了 63 位数字,其中 34 位是对的——但它对此只字不提。另外两个引擎证明了 33 位,然后停下。一个引擎精确地持有该值。仅凭这八个数字,你无法分辨哪个是哪个。

没有任何引擎会被要求对其他引擎作出判断:每一条声明都只关乎它自身。

Related MCP server: mcp-abacus

精确符号引擎

calcium 判定等式是否成立,而不是去比较数字;它能到达其他引擎只能趋近的极点(tan(pi/2) 是 uinf);并且当打印出的数字只是截断时,它还会返回闭式形式——sqrt(2)+1 会连同 Add(Sqrt(2), 1) 返回,既给出普通形式也给出 LaTeX 形式;acosh(0.5) 则连同 Div(Mul(NumberI, Pi), 3) 返回——这里给出的是具名值,而不是它存储时所在的域元素。

闭式形式在 HTTP API 上需要显式开启("closed_form": true),因为证明一个闭式形式的代价高于读取数字。本客户端始终会要求它:引用精确值正是其输出 schema 所承诺的。

工具

  • evaluate —— 在全部八个引擎上求值一个表达式并进行比较。支持算术、三角(sin、cos、tan)、指数/对数(exp、ln、log)、根与幂(sqrt、x^y)、阶乘、复数(3+2i)、其他进制(0xFF、0b1010)以及常数(pi、e、黄金比例 PHI)。

  • list_functions —— 列出引擎暴露的所有函数(名称、参数个数(arity)、类别、描述)。也可以按类别过滤。

比较运算在每个引擎上的含义并不相同。在包围(enclosure)类引擎上,!=、< 和 > 只有被证明为真时才成立;==、<= 和 >= 只要未被证伪就成立。那里的一个真 == 并不是相等性的证明——calcium 会精确地裁决这一点——但一个真 != 则是差异性的证明。

乘法必须显式书写:请写 2*pi、2*sin(x)、(a+b)*(c+d)。相邻并不表示相乘(2pi 是一个错误)。表达式纯粹是数学的——没有类型转换或构造函数;复数请写成 1+2i。

设置

  1. 在 https://ultimath.ai 获取一个免费的 API 密钥。

  2. 将服务器添加到你的 MCP 客户端配置中(以 Claude Desktop 为例):

{
  "mcpServers": {
    "ultimath": {
      "command": "npx",
      "args": ["-y", "ultimath-mcp"],
      "env": {
        "ULTIMATH_API_KEY": "your_api_key_here"
      }
    }
  }
}

就这样——npx 会按需获取并运行服务器。

要求

  • Node.js ≥ 18

  • 一个 Ultimath API 密钥(ULTIMATH_API_KEY)

链接

底层原理

Ultimath 的引擎构建在 FLINT/Arb、Calcium、GMP/MPFR 和 MPFI 之上——完整致谢见 https://ultimath.ai/credits。

隐私

Ultimath 仅存储你的 API 密钥的哈希值和基本的使用指标,用于运行和保护服务;表达式会被求值,但不会被保留用于训练。完整政策:https://ultimath.ai/privacy/

许可证

MIT

Available Tools

2 tools
evaluateEvaluate & cross-check a math expressionA
Read-only

Verify any numeric result that has to be trusted, via the Ultimath API (https://ultimath.ai). Use this whenever the correctness of a number matters — floating-point-sensitive expressions, catastrophic cancellation, values near singularities or branch cuts, ties, or any computation where a single method could be silently wrong. Prefer it over computing by hand or running code: it evaluates the expression on 8 independent engines (exact symbolic, multiprecision ball, interval arithmetic, three different arbitrary-precision floats, deferred symbolic rewriting, IEEE 754 double) in parallel and returns every result plus per-engine precision diagnostics, so disagreement exposes an unreliable value that a single calculation would hide.

The 8 engines are independent and each computes with its own native primitive — so divergence between them (at poles, singularities, branch cuts, or ties like round(2.5)) is the backends' real behavior, NOT a bug. Agreement across engines is a confidence signal; divergence flags a value that is convention-dependent or near a domain edge — verify it rather than trust a single column.

One engine (calcium) is exact rather than numeric: it decides a value instead of approximating it, so it reaches poles the others can only approach (tan(pi/2) is uinf), and when the printed digits are only a truncation it also returns the closed form in symbolic / symbolic_latex (sqrt(2)+1 carries Add(Sqrt(2), 1)). Prefer that closed form when quoting an exact value.

A comparison does not mean the same thing on every engine. On the enclosure engines (flint, mpfi) !=, < and > return true only once the property is PROVEN, while ==, <= and >= return true as soon as it is not disproven. So a true == there is not a proof of equality — calcium decides that one exactly — but a true != IS a proof of difference. Each pair is complementary: a == b and a != b are never both false.

A value that is real comes back as a plain real number: an engine drops a zero imaginary part only when it PROVES the value real. So a trailing +0i is NOT decoration — it means that engine did not establish realness, and a visible residue (e.g. 4.3e-17i on the double engine) is genuine numerical error. Do not strip either one when reporting a result.

Supports: arithmetic, trigonometry (sin, cos, tan), exponentials and logs (exp, ln, log), roots and powers (sqrt, x^y), factorial, complex numbers (3+2i), arbitrary bases (0xFF, 0b1010), constants (pi, e, the golden ratio PHI). Multiplication must be EXPLICIT: write 2pi, 2(3+4), (a+b)(c+d), 2sin(x) — adjacency is NOT a product (2pi is an error). Precedence, tightest first: postfix factorial ! (2^3! = 2^(3!) = 64), then powers ^, then * / %, then + -. Note: expressions are mathematical only — there are no type casts ((int)x) or constructors (complex(1,2)); write a complex number as 1+2i or (re, im). Call list_functions for the authoritative list of available functions.

Inputs: expression (required), format, precision. Returns: ms, trace, result, engines, +4 more

list_functionsList available functionsA
Read-only

List all mathematical functions available via the Ultimath API (https://ultimath.ai). Returns name, arity, category, and description for each function. Use this to discover what functions you can pass to the evaluate tool. Optionally filter by category (algebraic, trigonometric, hyperbolic, exponential, special, rounding, introspection). Every function is available on all 8 engines, but each computes it with its own native primitive — so results may diverge at poles, branch cuts, or ties, and that divergence is honest backend behavior, not a bug.

Inputs: category.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 2 tools

    Disambiguation5/5

    evaluate performs mathematical computation and returns multi-engine results, while list_functions only returns metadata about supported functions. There is no overlap or ambiguity between the two operations.

    Naming Consistency4/5

    Both names are imperative and clear, but evaluate is a bare verb while list_functions follows a verb_noun pattern. This is a minor stylistic inconsistency that does not create confusion.

    Tool Count4/5

    Two tools is below the typical 3–15 range, but the server's scope is narrow: one computational entry point plus one discovery helper. Each tool is necessary, so the count is slightly under but reasonable.

    Completeness4/5

    The core workflow is complete: discover functions with list_functions, then evaluate expressions with evaluate. Since this is a stateless computation service, lifecycle operations do not apply; the main minor gap is that supported constants are documented only in evaluate's description rather than being discoverable through list_functions.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Pure-Python MCP server for type-faithful calculation — evaluate expressions under fixed-point, IEEE-754 double, or exact rational arithmetic, with every answer labelled with its precision (exact vs inexact).
      6
      1
      GPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that provides structural load and stability math (tipping, support reactions, beam checks) that language models often get wrong, enabling AI assistants to compute accurate engineering estimates.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      An MCP server that performs exact arithmetic calculations, avoiding the pitfalls of float64 and unsafe eval, with resource limits for safe execution.
      1
      111 PyPI
      MIT