morluto/jacobian 预览 preview

morluto/jacobian

A universal, atomic library of mathematics and tools for agents to compose them.

项目介绍Project Overview

Jacobian 是面向 AI 代理的 MCP 服务器,提供可检索的类型化数学操作词汇表。math.find 发现操作,math.run 执行单一有界数学契约并返回类型化结果,也支持 CLI 和原生 Python API。内置涵盖多项式代数、精确线性代数、图论、有界 SAT/SMT、有限代数及 Lean 源处理等领域,依赖 SymPy、NetworkX、Z3、Python-FLINT。注意:当前为 0.13.0 预发布版,实验性操作契约可能在版本间变动。

Jacobian is an MCP server that gives AI agents a searchable vocabulary of typed mathematical operations. The math.find tool discovers one operation, and math.run executes a single bounded mathematical contract and returns its typed result; the same library is also available via a CLI and native Python API. Built-in domains include polynomial algebra, exact linear algebra, graph theory, bounded SAT/SMT, finite algebra, and Lean source elaboration, backed by SymPy, NetworkX, Z3, and Python-FLINT. Use it when an agent must compose trustworthy exact math primitives rather than follow a pre-baked solver. Note: version 0.13.0 is pre-stable, and experimental operation contracts may change between releases.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:morluto/jacobian

morluto/jacobian 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

English · 简体中文

An archival-style black-and-white photograph of a mathematician working at a chalkboard, with a constant Jacobian determinant and three distinct inputs mapping to one output.

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 discovers an operation, and math.run executes exactly one bounded mathematical contract 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.

Run the canonical Python MCP command without installing Jacobian globally:

uvx --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.

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.

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; and
  • Lean source elaboration.

SAT and SMT operations use the maintained Z3 Python binding directly. The optional lean.check operation runs one bounded source snippet in the fixed Lean service environment, using a request-scoped temporary directory and returning typed diagnostics. Use math.find to search for an operation, browse an unfamiliar domain, and inspect one operation before calling math.run once.

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

Status

Jacobian 0.13.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 test-math
make check

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

License

MIT

上一个 Prev beautiCode 下一个 Next deepseek-harness-for-vscode