Skip to main content

A capability-first MCP workbench for executable mathematics

Project description

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

Executable mathematics for agents. Evidence an independent checker can replay.

An MCP server, CLI, and Python library for conjectures, counterexamples, exact computation, and formal proof.

CI PyPI npm Supported Python versions MIT license

Quickstart · Verification · Capabilities · Documentation · Contributing

Jacobian gives AI agents small, composable mathematical operations rather than one opaque solver. An agent can construct an object, compute an invariant, search for a witness, and submit exact evidence to a separate checker. Every step remains visible as a typed result or artifact.

The trust boundary is deliberate: a search result, solver status, model answer, timeout, or score is never promoted directly to VERIFIED. Only an operator-authorized checker may emit a verified record, bound to the exact claim, candidate, scope, semantics, certificate format, and checker identity.

Quickstart

The npm launcher installs Jacobian and configures supported MCP clients:

npm install -g jacobian
jacobian setup
jacobian doctor

The launcher supports Claude, Codex, Cursor, Gemini, and OpenCode. It requires Node.js 18 or newer, Python 3.12, and uv. Run jacobian mcp to start the server directly.

Install from source
git clone https://github.com/morluto/jacobian.git
cd jacobian
uv sync --dev
uv run jacobian --state-dir .jacobian init

Use uv run jacobian --help to inspect the CLI or uv run jacobian-mcp to start the MCP adapter.

How verification works

Jacobian separates finding evidence from deciding what that evidence proves. Suppose an agent is testing the claim F is injective.”

The claim that F is injective leads to a candidate collision, an exact independent check, and a verification record. Missing witnesses, timeouts, cancellation, and errors remain unknown.

Claim → candidate witness → independent check → verification record

Stage Output What it establishes
Claim F is injective The statement to investigate; not yet trusted
Search A candidate witness (F, p, q) Inspectable evidence, not a conclusion
Independent check Confirm p ≠ q and F(p) − F(q) = 0 exactly The candidate is a genuine collision
Record Bind the checked collision to the original claim and checker identity The injectivity claim is FALSE · VERIFIED

No witness is not proof. A failed search, timeout, cancellation, or error leaves the claim UNKNOWN.

In the introductory tutorial, the same boundary appears as:

evaluate.batch   →  FALSE  · HEURISTIC
witness.find     →  exact witness artifact
witness.verify   →  FALSE  · VERIFIED

FALSE · HEURISTIC is an evaluation. FALSE · VERIFIED is a conclusion backed by independently checked evidence. Follow Find and verify a counterexample for a runnable example.

Capabilities

Capabilities are discovered at runtime through capability://catalog, described with capability.describe, and executed with capability.invoke. The installed catalog is the source of truth because availability can depend on local backends.

Domain Agent-visible outcomes
Polynomial maps Evaluate maps, compute Jacobians, search for collisions, independently verify collisions
Polynomial algebra Normalize typed expressions, factor univariate polynomials, verify identities, verify exact system solutions
Exact linear algebra Compute determinants, rank, kernels, and integer row Hermite normal forms; find and independently verify rational solutions or inconsistency certificates for Ax = b
Graphs Construct and inspect graphs, enumerate paths, realize degree sequences, test isomorphism, search colorings
SAT and SMT Find models or proof artifacts; independently replay assignments, DRAT proofs, and Alethe proofs
Universal algebra Evaluate finite magma laws and search for countermodels
Polytopes Compute convex combinations and linear separations
Lean Discover declarations, retrieve premises, inspect proof states, and check proofs in pinned environments
Research memory Store revisioned scratch work, findings, attempts, focus, and dependency-linked context

See the tool reference for the public surface and the atomic capability portfolio for portfolio design and evaluation gates.

Design

Jacobian keeps four responsibilities separate:

  • Agents own strategy. The kernel supplies mathematical operations, not a prescribed research workflow.
  • Capabilities expose one coherent outcome. Useful intermediate objects, failures, and proof obligations remain visible.
  • Artifacts carry context. Results report execution status, provenance, scope, completeness, exactness, assurance, and available certificates.
  • Checkers own trust. Plugins and search code cannot authorize a checker or change verification policy.

The public MCP surface stays small: the capability catalog plus capability.describe, capability.invoke, and three direct workspace tools. workspace.open, workspace.write, and workspace.query manage durable agent-authored state; workspace entries remain UNVERIFIED.

Documentation

Start here When you need detail
Documentation home Tutorials, how-to guides, reference, and explanation
Architecture System shape and the independent verification boundary
Product model Capability contracts, ownership, artifacts, and assurance
Product goals Active priorities and research direction
Tool surface MCP resources, tools, and invocation contracts
Domain operation library Built-in producer, bounded-search, artifact, and exact-replay contracts
Provider runtime Backend availability, compatibility, and identity
v0.2 specification Supported release behavior and conformance
Testing strategy Validation layers, commands, and CI responsibilities

Specialized contracts cover SAT artifacts, SMT/Alethe artifacts, exact rational linear-system evidence, exact rational matrix determinants, integer matrix HNF, and Lean declaration discovery. The domain-capability how-to demonstrates discovery, computed invocation, bounded-result interpretation, and exact replay. The Lean formal-intermediates reference covers proof states, premise retrieval, dependency graphs, and checked edits. Architecture decisions are recorded in the ADR index.

MCP clients and deployment

jacobian setup registers the local server with one or more supported clients. The server advertises the capability entry points and direct workspace tools; capability.describe(query=...) searches compact installed outcomes before an agent inspects an exact contract and invokes it. This is a toolbox interface: agents own mathematical decomposition, exploration, and composition.

Clients with MCP resource support can read jacobian://instructions for the operating guide and capability://catalog for the complete machine inventory. Clients with prompt support can optionally request jacobian-discover or jacobian-check-evidence for protocol scaffolding.

Remote clients can connect through Streamable HTTP or SSE with bearer-token authentication and subject-bound tenant state. See Deploy the remote MCP server. Static tokens are intended for controlled deployments, not as a hosted identity system.

Optional backends

Some capabilities use backends that are not installed by default:

  • CaDiCaL finds SAT models and UNSAT proof artifacts.
  • cvc5 produces SMT UNSAT proofs; Carcara independently checks Alethe.
  • The flint extra provides Python-FLINT/Arb operations for exact rational systems, integer matrices and lattices, polynomials, and validated numerical computation. Individual capabilities and independent replay support depend on the installed catalog.
  • Pinned Lean CORE and MATHLIB environments check formal certificates.

Backend availability is not verification authority. Provider output remains unverified until the appropriate independent checker accepts its bound witness or certificate.

Lean certificates

The lean.check capability binds an exact proposition and proof body to its result. The bundled environments pin Lean, imports, and their allowed trust bases; model-supplied imports and packages are rejected.

Prepare the pinned runtime with:

elan toolchain install leanprover/lean4:v4.31.0
cd lean
lake update
lake build

Proof-state interaction and premise retrieval are exploration aids. Their output cannot become VERIFIED without a successful lean.check. See the guided declaration-discovery tutorial.

macOS and Z3

The locked environment uses z3-solver 5.0.0.0. Its upstream macOS wheels target macOS 13 or newer on Apple silicon and Intel. On an older release, uv falls back to a source build that requires CMake, make, and a C++20 compiler.

Install the Xcode Command Line Tools and CMake before retrying uv sync --dev. These commands report the relevant environment without changing it:

sw_vers -productVersion
uname -m
xcode-select -p
clang++ --version
cmake --version
make --version

See the z3-solver 5.0.0.0 files on PyPI for the upstream wheel tags.

Status

Jacobian is pre-stable. Experimental contracts may change between releases; release specifications describe supported snapshots, not the order of ongoing capability research.

The Python distribution contains the mathematical kernel, CLI, and MCP server. The npm package is a thin launcher and MCP client installer for that same implementation; it is not a separate JavaScript API.

About the hero image

The visual motif comes from the three-dimensional counterexample to the Jacobian conjecture: an exact constant Jacobian determinant alongside three distinct rational inputs with the same output. The equations are unusually good shorthand for Jacobian's purpose—surprising candidates are valuable, but exact computation and independent checking establish what can be trusted.

Terence Tao gives an accessible mathematical account. The determinant identity and collision have also been independently formalized in Isabelle/HOL. The two-dimensional conjecture remains open.

Project boundaries

Jacobian does not aim to put a universal mathematical ontology, a natural-language-to-formal-mathematics translator, distributed search infrastructure, or an opaque generic solver into the kernel. It does not reimplement theorem provers or SAT/MIP solvers, accept arbitrary model-supplied executable bundles, or treat floating-point scores, timeouts, and solver labels as proofs.

Contributing

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

make setup
make test-fast
make check

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

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jacobian-0.4.1a0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jacobian-0.4.1a0-py3-none-any.whl (758.3 kB view details)

Uploaded Python 3

File details

Details for the file jacobian-0.4.1a0.tar.gz.

File metadata

  • Download URL: jacobian-0.4.1a0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jacobian-0.4.1a0.tar.gz
Algorithm Hash digest
SHA256 7c2ae1845efca86b0f6b5719ffb2eddfc32431a824f9e6d352d8a5304a2d7ced
MD5 8e6d9103af9b35dfbc1c77c4f269a3e0
BLAKE2b-256 2a2b0d3ca2d2d6f7800e833ed04644da884e215d5b11a638ceb71b972abf09f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacobian-0.4.1a0.tar.gz:

Publisher: release.yml on morluto/jacobian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacobian-0.4.1a0-py3-none-any.whl.

File metadata

  • Download URL: jacobian-0.4.1a0-py3-none-any.whl
  • Upload date:
  • Size: 758.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jacobian-0.4.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2a2454923ce1f0c79ca852d275799978ca31d054c5cf80d8d92175dc25df1f
MD5 18fac7ac7b481bb0c6f1b8341ffdc12b
BLAKE2b-256 77b62c2c2e08e485db33497bc81c0b00f2ab2bff9a680f850c436e45e3d4eb7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacobian-0.4.1a0-py3-none-any.whl:

Publisher: release.yml on morluto/jacobian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page