Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsOct 3, 2026·8 min de lectura

Jacobian — Typed Math Tools for AI Agents

Give AI agents typed math tools through MCP. Inspect contracts, run exact operations, and compose results with a pinned Python release.

Listo para agents

Staging seguro para este activo

Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.

Stage only · 17/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp Config
Instalación
Stage only
Confianza
Confianza: Established
Entrada
.mcp.json
Comando de staging seguro
npx -y tokrepo@latest install 5489e797-e716-4097-a3d2-f394b66972a8 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

Introducción

Jacobian gives AI agents a typed mathematical vocabulary through MCP, plus a Python API and CLI. Use it to inspect an operation's contract and compute exact results instead of asking the model to approximate them in text. Best for agents working with algebra, graphs, or bounded symbolic computation; works with MCP hosts such as Claude Code, Cursor, and Codex.

The 0.22.0 release was checked on 2026-10-03: an isolated Python 3.12 installation returned gcd 6 and coefficients -1 and 3 for inputs 84 and 30. MCP initialization and tool discovery were also checked. This smoke test does not validate every mathematical operation; upstream's supported binary-install contract remains CPython 3.12/3.13 on glibc Linux x86-64, with some optional system backends.

Quick Use

Install Python 3.12 and uv first, then stage the included .mcp.json entry and merge it into your MCP client configuration after reviewing it. The package version is pinned.

{
  "mcpServers": {
    "jacobian": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "jacobian==0.22.0",
        "jacobian-mcp"
      ]
    }
  }
}

Intro

Jacobian gives AI agents a typed mathematical vocabulary through MCP, plus a Python API and CLI. Use it to inspect an operation's contract and compute exact results instead of asking the model to approximate them in text. Best for agents working with algebra, graphs, or bounded symbolic computation; works with MCP hosts such as Claude Code, Cursor, and Codex.

The 0.22.0 release was checked on 2026-10-03: an isolated Python 3.12 installation returned gcd 6 and coefficients -1 and 3 for inputs 84 and 30. MCP initialization and tool discovery were also checked. This smoke test does not validate every mathematical operation; upstream's supported binary-install contract remains CPython 3.12/3.13 on glibc Linux x86-64, with some optional system backends.

Original upstream README

English · 简体中文

Jacobian

An executable mathematical vocabulary for agents: discover one typed operation, run it, and compose its result.

CI PyPI npm Supported Python versions MIT license

Jacobian is an MCP server that gives AI agents a searchable vocabulary of typed mathematical operations. math.find matches a mathematical need or inspects one exact contract, and math.run executes it and returns its typed result. The same mathematical library is also available through a CLI and native Python API.

Each operation establishes one stable, reusable mathematical postcondition rather than prescribing a workflow or proof strategy. Results are exact where claimed and make approximation, incompleteness, or uncertainty explicit.

Jacobian's hypothesis is that mathematical reasoning benefits from an executable vocabulary of semantically scoped, bounded operations. Rather than exposing large domain solvers or precomposed workflows, Jacobian exposes mathematical primitives that agents can search for and compose into solutions beyond what any individual operation was designed to solve. The library supplies trustworthy mathematical moves; the reasoning model decides which moves to make, how to combine their results, and when to stop. Keeping the operations semantically narrow and domain-owned preserves that search space instead of baking one proof strategy or workflow into the tools themselves.

See Executable mathematical vocabulary for what semantic atomicity means and how the operation vocabulary grows.

Quickstart

Set up Jacobian for your agents with a single command. The setup command requires Node.js 20.17+, 22.13+, or 23.5+ and uvx on your PATH.

npx jacobian@latest setup

Choose detected agents and review the changes before they are written. Setup does not install Node.js, Python, uv, or an agent. For automation, preview an explicit plan with npx jacobian@latest setup --codex --dry-run; use --yes only with explicit agent flags or --all.

To refresh an existing registration explicitly, run npx jacobian@latest upgrade and select the agents to update. The generated launcher pins the exact release resolved by npm.

Run the canonical Python MCP command without installing Jacobian globally:

uvx --python 3.12 --from jacobian jacobian-mcp

Where an MCP host requires an npm command, the npm package is a deterministic carrier for that same command:

npx jacobian mcp

For a persistent installation:

python -m pip install jacobian
jacobian-mcp

That package includes Jacobian's exact maintained Python backend stack: SymPy, NetworkX, Z3, and Python-FLINT. A normal Python or npm installation therefore exposes the same built-in Python-backed operation portfolio. The tested binary-install contract is CPython 3.12 or 3.13 on glibc Linux x86-64; the release gate installs the built wheel and starts Jacobian on both Python versions. Other systems may have compatible upstream wheels, but are not part of the tested release contract yet. In particular, Alpine/musl cannot install the complete mandatory stack from PyPI.

Singular and QEPCAD are optional system runtimes for a small subset of operations. The Python installation does not provision them, and ordinary operations do not require Docker. Python callers can use jacobian.backends.check_backend; MCP inspection reports availability in the server environment. See backend requirements for exact coverage and setup.

The Python distribution contains the mathematical kernel, CLI, and MCP server. The npm package deterministically maps its exact package version to the corresponding uvx invocation.

Compute one bounded result

An ordinary operation returns mathematics first. For example, matrix.determinant.compute accepts one exact rational matrix and returns its determinant directly. Callers compose results by passing their typed values to a subsequent operation.

For a local terminal workflow, inspect the exact installed contract and run one of its examples with the CLI:

jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

The second command returns the gcd and Bézout coefficients as JSON. In an MCP host, use math.find in inspection mode to read the same contract and math.run with the same payload shape. See Discover and invoke operations for that agent workflow.

Available mathematics

The built-in portfolio covers work in:

  • polynomial maps and polynomial algebra;
  • exact linear algebra;
  • graphs, paths, colorings, and isomorphism;
  • bounded SAT and SMT solving;
  • finite algebra, probability, geometry, and topology.

SAT and SMT operations use the maintained Z3 Python binding directly. Use math.find to match the mathematical result needed, then use its inspection mode on a promising operation before calling math.run once.

See the domain operation library for the maintained operation portfolio and backend requirements.

Status

Jacobian 0.22.0 is pre-stable. Its published package and operation contracts describe the supported surface; experimental operation contracts may change between releases.

Documentation

Contributing

Jacobian uses Python 3.12, uv, and a small Makefile:

make setup
make affected AFFECTED_BASE=origin/main

Read CONTRIBUTING.md before changing code. It documents focused test commands, verification rules, documentation placement, and pull-request expectations.

License

MIT

FAQ

Q: Does installing this asset automatically edit my global MCP configuration? A: No. TokRepo stages the supplied files. Review and merge .mcp.json in the client you use.

Q: Which version and Python runtime does this entry use? A: The supplied configuration pins Jacobian 0.22.0 and requests Python 3.12 through uvx. Upstream documents its tested platform contract and optional backends in the README.

Q: Has every operation been checked? A: No. The local check covered server initialization, tool discovery, and one exact extended-GCD result. Check each operation's typed contract and backend availability before relying on it.

Source & Thanks

Created by morluto. Licensed under MIT.

Source: morluto/jacobian, commit 0144d037894e6c33938fd66b841d336e15a79611, package 0.22.0.

MIT License

Copyright (c) 2026 Jacobian contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

快速使用

先安装 Python 3.12 和 uv,再检查随资产提供的 .mcp.json,将其中 jacobian 项合并到你使用的 MCP 客户端配置。这里固定使用 0.22.0,避免安装时版本悄悄变化。

{
  "mcpServers": {
    "jacobian": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "jacobian==0.22.0",
        "jacobian-mcp"
      ]
    }
  }
}

简介

Jacobian 为 AI Agent 提供带类型约束的数学运算,支持 MCP、Python API 和 CLI。Agent 先查看运算契约,再调用具体运算并组合结果,适合代数、图论和符号计算任务。可用于支持 MCP 的 Claude Code、Cursor、Codex 等客户端。

2026-10-03 的隔离测试使用 Python 3.12 和 0.22.0:输入 84、30,扩展最大公约数运算返回 6,系数为 -1、3;MCP 初始化和工具发现也通过。这只证明这一组检查通过,不代表全部运算已验证。上游正式测试的平台范围仍为 glibc Linux x86-64 上的 CPython 3.12/3.13,部分运算需要额外后端。

上游原始中文 README

English · 简体中文

黑白档案照:黑板上雅可比行列式为常数,三个不同输入映到同一输出。

Jacobian

为智能体提供可执行的数学词汇:发现一个类型化操作,运行它,并组合其结果。

CI PyPI npm 支持的 Python 版本 MIT 许可证

Jacobian 是一个 MCP 服务器,为 AI 智能体提供一套可搜索、类型化的数学操作。math.find 用来匹配候选操作或读取一个操作的精确契约,math.run 执行该契约并返回类型化结果。同样的数学库也可以通过 CLI 和原生 Python API 直接使用。

每个操作只确立一个稳定、可复用的数学后置条件,而不是规定工作流或证明策略。声称精确的地方就会保持精确,近似、不完备或不确定性也会显式标出。

Jacobian 的假设是:数学推理会受益于一套语义范围明确、有界且可执行的词汇。 与其提供庞大的领域求解器或预先排好的工作流,Jacobian 只提供可搜索、可组合的数学原语——智能体可以把它们拼成超出单个操作设计目标的解法。库负责提供可信的数学步骤,模型决定怎么选、怎么组合、何时停。操作保持语义范围明确并由所属领域维护,避免把某种证明策略固化到工具里。

更多关于语义原子性的讨论,见可执行的数学词汇。

快速开始

用一条命令为你的智能体配好 Jacobian,需要 Node.js 20.17+、22.13+ 或 23.5+,并确保 uvx 在 PATH 中:

npx jacobian@latest setup

它会检测已安装的智能体,让你在写入前确认改动。它不会帮你安装 Node.js、Python、uv 或智能体本身。需要自动化预览时,可用 npx jacobian@latest setup --codex --dry-run 查看计划;只有在明确指定 --codex、--all 等参数时才加 --yes。

不用全局安装,也可直接运行标准的 Python MCP 命令:

uvx --python 3.12 --from jacobian jacobian-mcp

若 MCP 客户端只能通过 npm 命令启动,npm 包会原样转发到同一条命令:

npx jacobian mcp

需要长期安装时:

python -m pip install jacobian
jacobian-mcp

这个包自带了 Jacobian 维护的完整 Python 后端栈:SymPy、NetworkX、Z3 和 Python-FLINT。所以无论是常规的 Python 安装还是 npm 安装,你拿到的都是同一套基于 Python 的内置操作。官方测试过的环境是 glibc Linux x86-64 上的 CPython 3.12 / 3.13,发版时会在这两个版本上安装构建好的 wheel 并启动验证。其他系统也可能有可用的上游 wheel,但不在官方测试范围内。特别地,Alpine/musl 无法从 PyPI 装全必需的后端。

Python 发行包里包含了数学内核、CLI 和 MCP 服务器。npm 包本身不提供 JavaScript API,只是把当前 npm 包的精确版本映射到对应的 uvx 调用。

计算一个有界结果

普通操作直接返回数学结果。例如,matrix.determinant.compute 接收一个精确的有理数矩阵,直接返回它的行列式。你可以把类型化的结果传给下一个操作,串起来完成更复杂的计算。

在本地终端中,先查看已安装操作的精确契约,再运行其中一个示例:

jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

第二条命令会以 JSON 返回最大公约数和 Bézout 系数。在 MCP 主机中,用 用 math.find 的检查模式查看同一份契约,再用相同形状的 payload 调用 math.run。具体的 智能体调用流程见发现和调用操作。

可用的数学能力

内置能力覆盖:

  • 多项式映射与多项式代数;
  • 精确线性代数;
  • 图、路径、着色与同构;
  • 有界 SAT 和 SMT 求解;
  • 有限代数、概率、几何与拓扑。

SAT 和 SMT 操作直接调用 Z3 的 Python 绑定。用 math.find 匹配所需的数学结果并查看候选操作的契约,最后用 math.run 执行一次。

请参阅领域操作库了解操作契约与准入规则,用 math.find 查找实际操作,并参阅后端要求。

状态

Jacobian 0.22.0 仍为预稳定版本。已发布包和操作契约即为受支持的接口,实验性契约可能在后续版本中调整。

文档

贡献

Jacobian 使用 Python 3.12、uv 和精简的 Makefile:

make setup
make handoff LANE=math TESTS=tests/math/graphs/test_graph_distance_matrix.py

改代码前请先读 CONTRIBUTING.md,里面有聚焦的测试命令、校验规则、文档组织和 PR 要求。

许可证

MIT

常见问题

会自动修改全局 MCP 配置吗? 不会。TokRepo 先暂存资产文件,由你或 Agent 检查后合并 .mcp.json。

为什么固定版本? 这次测试的是 0.22.0,配置同时指定 Python 3.12。升级前应再次查看上游运算契约和后端要求。

全部数学能力都已经测试了吗? 没有。本轮验证了服务器初始化、工具发现和一次扩展最大公约数计算;其他运算应根据其具体契约及后端可用性验证。

Source & Thanks

Created by morluto. Licensed under MIT.

Source: morluto/jacobian, commit 0144d037894e6c33938fd66b841d336e15a79611, package 0.22.0.

MIT License

Copyright (c) 2026 Jacobian contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Jacobian MCP Companion: Staging the Pinned Config

Companion guide for staging the supplied .mcp.json Jacobian entry, checking versions and platform limits, and verifying one result.

Quick Use

This companion guide explains how to reuse the two files staged with this asset: .mcp.json and README.md. Source reviewed; runtime not tested — no command below was executed while preparing this guide.

  1. Confirm prerequisites: Python 3.12 and uv are installed, so uvx is available on your PATH.
  2. Open the staged .mcp.json and read it before copying anything.
  3. Merge the jacobian entry from that file into the MCP client configuration you actually use (Claude Code, Cursor, Codex, or another MCP host), keeping any servers already listed there.
  4. Reload or restart the client so it re-reads its configuration.
  5. Check the output: the Jacobian server should appear in the host's MCP server list and expose math.find / math.run.

The staged entry pins both the release and the interpreter, so merging it does not silently pull a newer version:

{
  "mcpServers": {
    "jacobian": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "jacobian==0.22.0",
        "jacobian-mcp"
      ]
    }
  }
}

What this asset stages, and what it does not

Staged with the asset:

  • .mcp.json — the pinned server entry shown above, the asset entrypoint;
  • README.md — upstream documentation text.

Not done for you:

  • Python 3.12 and uv are not installed by this asset, although the dependency record lists both as required.
  • Your client configuration is not edited automatically. Nothing here modifies global MCP configuration; you merge the entry yourself.
  • The only documented step is merging .mcp.json. The staging record lists no installer script, no package manifest, and no extra setup file.

Version and platform limits

  • The staged entry pins 0.22.0 and requests Python 3.12.
  • The README.md shipped in this snapshot describes a pre-stable release and states upstream's tested binary-install contract is CPython 3.12 or 3.13 on glibc Linux x86-64. Other systems may have compatible wheels but fall outside that tested contract; in particular, Alpine/musl cannot install the complete mandatory stack from PyPI.
  • Singular and QEPCAD are optional system runtimes for a small subset of operations. The Python installation does not provision them, and ordinary operations do not require Docker.
  • The earlier staged README text reports that, for a previous release, an isolated Python 3.12 run returned gcd 6 with coefficients -1 and 3 for inputs 84 and 30, and that MCP initialization and tool discovery were checked. Treat that as a claim in the supplied documents, not as verification performed here. It says nothing about other operations; check each operation's typed contract and backend availability before relying on it.
  • Because the pinned package version and the snapshot's README release line do not necessarily agree, verify the actual version after installation (for example with uvx --python 3.12 --from jacobian==0.22.0 jacobian --version if that subcommand exists) rather than assuming documentation matches the resolved package.

Alternate documented launches

These alternatives come from the upstream README text; the staged .mcp.json uses the uvx --from jacobian==0.22.0 form above.

uvx --python 3.12 --from jacobian jacobian-mcp
npx jacobian mcp
python -m pip install jacobian
jacobian-mcp
jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

The CLI pair is the documented way to read one operation's contract and run its example; the README says the second command returns the gcd and Bézout coefficients as JSON. It was not run while preparing this guide.

FAQ

Does merging this entry modify my global MCP configuration automatically? No. The asset only stages files. You review .mcp.json and merge the jacobian entry into the client configuration you choose.

Can I skip installing Python 3.12 and uv? No. They are listed as required dependencies and the entry invokes uvx --python 3.12. Without them the entry cannot start.

Are all operations validated? No. Nothing was executed for this guide. The supplied README reports checks for one earlier release only; verify each operation's contract and backend availability yourself.

Source & Thanks

Created by morluto. Licensed under MIT.

Source: morluto/jacobian, commit bad9b899715992bd2a72ed79e726a7deb89e9395. Source reviewed; runtime not tested.

Complete upstream material

English · 简体中文

Jacobian

An executable mathematical vocabulary for agents: discover one typed operation, run it, and compose its result.

CI PyPI npm Supported Python versions MIT license

Jacobian is an MCP server that gives AI agents a searchable vocabulary of typed mathematical operations. math.find matches a mathematical need or inspects one exact contract, and math.run executes it and returns its typed result. The same mathematical library is also available through a CLI and native Python API.

Each operation establishes one stable, reusable mathematical postcondition rather than prescribing a workflow or proof strategy. Results are exact where claimed and make approximation, incompleteness, or uncertainty explicit.

Jacobian's hypothesis is that mathematical reasoning benefits from an executable vocabulary of semantically scoped, bounded operations. Rather than exposing large domain solvers or precomposed workflows, Jacobian exposes mathematical primitives that agents can search for and compose into solutions beyond what any individual operation was designed to solve. The library supplies trustworthy mathematical moves; the reasoning model decides which moves to make, how to combine their results, and when to stop. Keeping the operations semantically narrow and domain-owned preserves that search space instead of baking one proof strategy or workflow into the tools themselves.

See Executable mathematical vocabulary for what semantic atomicity means and how the operation vocabulary grows.

Quickstart

Set up Jacobian for your agents with a single command. The setup command requires Node.js 20.17+, 22.13+, or 23.5+ and uvx on your PATH.

npx jacobian@latest setup

Choose detected agents and review the changes before they are written. Setup does not install Node.js, Python, uv, or an agent. For automation, preview an explicit plan with npx jacobian@latest setup --codex --dry-run; use --yes only with explicit agent flags or --all.

To refresh an existing registration explicitly, run npx jacobian@latest upgrade and select the agents to update. The generated launcher pins the exact release resolved by npm.

Run the canonical Python MCP command without installing Jacobian globally:

uvx --python 3.12 --from jacobian jacobian-mcp

Where an MCP host requires an npm command, the npm package is a deterministic carrier for that same command:

npx jacobian mcp

For a persistent installation:

python -m pip install jacobian
jacobian-mcp

That package includes Jacobian's exact maintained Python backend stack: SymPy, NetworkX, Z3, and Python-FLINT. A normal Python or npm installation therefore exposes the same built-in Python-backed operation portfolio. The tested binary-install contract is CPython 3.12 or 3.13 on glibc Linux x86-64; the release gate installs the built wheel and starts Jacobian on both Python versions. Other systems may have compatible upstream wheels, but are not part of the tested release contract yet. In particular, Alpine/musl cannot install the complete mandatory stack from PyPI.

Singular and QEPCAD are optional system runtimes for a small subset of operations. The Python installation does not provision them, and ordinary operations do not require Docker. Python callers can use jacobian.backends.check_backend; MCP inspection reports availability in the server environment. See backend requirements for exact coverage and setup.

The Python distribution contains the mathematical kernel, CLI, and MCP server. The npm package deterministically maps its exact package version to the corresponding uvx invocation.

Compute one bounded result

An ordinary operation returns mathematics first. For example, matrix.determinant.compute accepts one exact rational matrix and returns its determinant directly. Callers compose results by passing their typed values to a subsequent operation.

For a local terminal workflow, inspect the exact installed contract and run one of its examples with the CLI:

jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

The second command returns the gcd and Bézout coefficients as JSON. In an MCP host, use math.find in inspection mode to read the same contract and math.run with the same payload shape. See Discover and invoke operations for that agent workflow.

Available mathematics

The built-in portfolio covers work in:

  • polynomial maps and polynomial algebra;
  • exact linear algebra;
  • graphs, paths, colorings, and isomorphism;
  • bounded SAT and SMT solving;
  • finite algebra, probability, geometry, and topology.

SAT and SMT operations use the maintained Z3 Python binding directly. Use math.find to match the mathematical result needed, then use its inspection mode on a promising operation before calling math.run once.

See the domain operation library for the maintained operation portfolio and backend requirements.

Status

Jacobian 0.23.0 is pre-stable. Its published package and operation contracts describe the supported surface; experimental operation contracts may change between releases.

Documentation

Contributing

Jacobian uses Python 3.12, uv, and a small Makefile:

make setup
make affected AFFECTED_BASE=origin/main

Read CONTRIBUTING.md before changing code. It documents focused test commands, verification rules, documentation placement, and pull-request expectations.

License

MIT

Source and license

Source · License · bad9b899715992bd2a72ed79e726a7deb89e9395

MIT License

Copyright (c) 2026 Jacobian contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Jacobian MCP 配置落地指南:固定版本的暂存与合并

配套指南:如何暂存随资产提供的 .mcp.json Jacobian 配置、核对版本与平台限制,并验证一次运算结果。

快速使用

本配套指南说明如何复用随本资产提供的两个文件:.mcp.json 和 README.md。已完成来源核对,未进行运行时测试——准备本指南时未执行下文任何命令。

  1. 确认前提:已安装 Python 3.12 和 uv,使 uvx 在 PATH 中可用。
  2. 打开随资产提供的 .mcp.json,先通读再复制。
  3. 把该文件中的 jacobian 项合并进你实际使用的 MCP 客户端配置(Claude Code、Cursor、Codex 或其他 MCP 主机),并保留其中已有的其他服务器。
  4. 重新加载或重启客户端,让它重新读取配置。
  5. 检查结果:Jacobian 服务器应出现在该主机的 MCP 服务器列表中,并提供 math.find / math.run 工具。

提供的配置同时固定了发行版本与解释器,合并后不会悄悄拉取更新的版本:

{
  "mcpServers": {
    "jacobian": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "jacobian==0.22.0",
        "jacobian-mcp"
      ]
    }
  }
}

本资产提供什么、不提供什么

随资产提供的文件:

  • .mcp.json——上方的固定版本服务器项,即本资产的 entrypoint;
  • README.md——上游文档正文。

不会自动完成的部分:

  • 本资产不安装 Python 3.12 和 uv,尽管依赖清单把两者列为必需。
  • 不会自动修改你的客户端配置。此处不会改动全局 MCP 配置,需要你自行合并该服务器项。
  • 文档化步骤只有合并 .mcp.json 这一步。暂存记录中没有安装脚本、包清单或其他安装文件。

版本与平台限制

  • 配置中固定的版本是 0.22.0,要求的解释器是 Python 3.12。
  • 本快照随附的 README.md 描述的是预稳定版本,并说明上游正式测试的二进制安装范围是 glibc Linux x86-64 上的 CPython 3.12 或 3.13。其他系统可能有可用的 wheel,但不在该测试范围内;特别地,Alpine/musl 无法从 PyPI 装全必需的后端栈。
  • Singular 和 QEPCAD 是少量运算需要的可选系统运行时。Python 安装不会提供它们,普通运算也不需要 Docker。
  • 早前随资产提供的 README 文本提到:针对此前某个版本,隔离的 Python 3.12 环境返回过输入 84、30 时 gcd 为 6、系数为 -1、3 的结果,并核对过 MCP 初始化与工具发现。请把这当作所提供文档中的说法,而不是本指南做过的验证。它不代表其他运算已被验证;使用前应逐个核对运算契约与后端可用性。
  • 由于配置固定的包版本与快照 README 中标注的发行版本不一定一致,安装后请核实实际版本(例如在存在该子命令时运行 uvx --python 3.12 --from jacobian==0.22.0 jacobian --version),不要假设文档与解析到的包一致。

其他有文档记录的启动方式

以下替代方式来自上游 README 文本;随资产提供的 .mcp.json 使用的是上面的 uvx --from jacobian==0.22.0 形式。

uvx --python 3.12 --from jacobian jacobian-mcp
npx jacobian mcp
python -m pip install jacobian
jacobian-mcp
jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

这组 CLI 命令是查看某个运算契约并运行其示例的文档化方式;README 说明第二条命令会以 JSON 返回最大公约数和 Bézout 系数。准备本指南时并未运行该命令。

常见问题

合并这个服务器项会自动修改我的全局 MCP 配置吗? 不会。本资产只暂存文件,需要你检查 .mcp.json,并把 jacobian 项合并进你选定的客户端配置。

可以跳过安装 Python 3.12 和 uv 吗? 不可以。它们被列为必需依赖,且该项调用的是 uvx --python 3.12。缺少它们将无法启动。

所有运算都验证过了吗? 没有。本指南未执行任何命令。所提供 README 只报告了此前某个版本的若干核对结果;请自行验证每个运算的契约与后端可用性。

Source & Thanks

Created by morluto. Licensed under MIT.

Source: morluto/jacobian, commit bad9b899715992bd2a72ed79e726a7deb89e9395. 已完成来源核对,未进行运行时测试。

完整上游材料译文

English · 简体中文

Jacobian

面向 agent 的可执行数学词汇表:发现一个带类型的运算,运行它,并组合其结果。

CI PyPI npm Supported Python versions MIT license

Jacobian 是一个 MCP 服务器,为 AI agent 提供一套可搜索的、带类型的数学运算词汇表。math.find 可以匹配一个数学需求,或查看某个确切契约;math.run 则执行该运算并返回其带类型的结果。同一套数学库也可以通过 CLI 和原生 Python API 使用。

每个运算确立一个稳定、可复用的数学后置条件,而不是规定某个工作流或证明策略。其结果在声明精确时是精确的,并会明确标示近似、不完整或不确定性。

Jacobian 的假设是:数学推理受益于一套语义明确、范围有界的可执行运算词汇表。 Jacobian 并不暴露庞大的领域求解器或预先组合好的工作流,而是暴露数学原语,让 agent 能够搜索它们,并组合出超出任何单个运算原本设计范围的解。该库提供可信赖的数学步骤;推理模型决定采取哪些步骤、如何组合它们的结果,以及何时停止。保持运算在语义上狭窄、由领域拥有,可以保留这一搜索空间,而不是把某种证明策略或工作流固化进工具本身。

关于语义原子性的含义以及运算词汇表如何扩展,参见可执行数学词汇表。

快速开始

用一条命令为你的 agent 设置 Jacobian。该设置命令要求 Node.js 20.17+、22.13+ 或 23.5+,并且 PATH 中有 uvx。

npx jacobian@latest setup

选择检测到的 agent,并在写入前审阅变更。安装过程不会安装 Node.js、Python、uv 或任何 agent。若用于自动化,可用 npx jacobian@latest setup --codex --dry-run 预览一份明确的计划;仅在显式指定 agent 标志或使用 --all 时才配合 --yes。

如需显式刷新已有注册,请运行 npx jacobian@latest upgrade 并选择要更新的 agent。生成的启动器会固定 npm 解析到的确切发行版本。

无需全局安装 Jacobian 即可运行规范的 Python MCP 命令:

uvx --python 3.12 --from jacobian jacobian-mcp

当 MCP 主机要求使用 npm 命令时,npm 包是该同一命令的确定性载体:

npx jacobian mcp

若要进行持久化安装:

python -m pip install jacobian
jacobian-mcp

该包包含 Jacobian 精确维护的 Python 后端栈:SymPy、NetworkX、Z3 和 Python-FLINT。因此,普通的 Python 或 npm 安装会暴露相同的、由 Python 支持的内置运算组合。经测试的二进制安装契约是 glibc Linux x86-64 上的 CPython 3.12 或 3.13;发布门禁会在两个 Python 版本上安装构建好的 wheel 并启动 Jacobian。其他系统可能有兼容的上游 wheel,但尚不属于经测试的发布契约范围。特别地,Alpine/musl 无法从 PyPI 安装完整必需的栈。

Singular 和 QEPCAD 是少量运算所需的可选系统运行时。Python 安装不会提供它们,普通运算也不需要 Docker。Python 调用者可以使用 jacobian.backends.check_backend;MCP 检查会报告服务器环境中的可用性。确切覆盖范围与设置请参见 后端要求。

Python 发行版包含数学内核、CLI 和 MCP 服务器。npm 包会将其精确的包版本确定性地映射到对应的 uvx 调用。

计算一个受限结果

普通运算优先返回数学结果。例如,matrix.determinant.compute 接受一个精确有理矩阵并直接返回其行列式。调用者通过将类型化值传给后续运算来组合结果。

对于本地终端工作流,可使用 CLI 查看确切安装的契约并运行其示例之一:

jacobian inspect integer.compute.extended_gcd
jacobian run integer.compute.extended_gcd --json '{"left":"84","right":"30"}'

第二条命令以 JSON 形式返回最大公约数和 Bézout 系数。在 MCP 主机中,使用检查模式下的 math.find 读取同一契约,并使用相同载荷结构调用 math.run。该 agent 工作流参见发现并调用运算。

可用的数学能力

内置组合覆盖以下工作:

  • 多项式映射与多项式代数;
  • 精确线性代数;
  • 图、路径、着色与同构;
  • 有界 SAT 与 SMT 求解;
  • 有限代数、概率、几何与拓扑。

SAT 和 SMT 运算直接使用维护中的 Z3 Python 绑定。使用 math.find 匹配所需的数学结果,然后先对看似合适的运算使用其检查 模式,再调用一次 math.run。

维护中的运算组合参见域运算库, 后端要求参见后端要求。

状态

Jacobian 0.23.0 处于预稳定阶段。其已发布的包与运算契约 描述支持的接口;实验性运算契约可能在不同版本之间发生变化。

文档

贡献

Jacobian 使用 Python 3.12、uv 以及一个精简的 Makefile:

make setup
make affected AFFECTED_BASE=origin/main

更改代码前请先阅读 CONTRIBUTING.md。其中记录了针对性的测试命令、验证规则、文档放置位置以及拉取请求的期望。

许可证

MIT

来源与许可证

Source · License · bad9b899715992bd2a72ed79e726a7deb89e9395

MIT License

Copyright (c) 2026 Jacobian contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

🙏

Fuente y agradecimientos

Created by morluto. Licensed under MIT.

Source: morluto/jacobian, commit 0144d037894e6c33938fd66b841d336e15a79611, package 0.22.0.

MIT License

Copyright (c) 2026 Jacobian contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados