Skip to main content
Glama

ZNKernel-II open tooling: MCP server, HTTP bridge, public benchmark

A three-valued geometry judge for AI agents. ZNKernel-II answers geometric and manufacturing questions with allow, reject, or cannot_judge — and cannot_judge is undecided, never a pass. Every judgement carries a rule id, a rule version and replayable evidence.

This repository is the open-source tool layer around the kernel:

Component

What it is

mcp/

znk-mcp, a zero-dependency MCP stdio server exposing 10 tools (create / boolean / describe / import / export / adjudicate / adjudicate_rules / topology / capabilities / sketch_solve)

mcp/http-bridge/

optional stdio → Streamable HTTP bridge for clients that only speak HTTP (loopback only)

bench/

6 public, self-built benchmark cases with inputs, expected verdicts and a recompute script

docs/

API quickstart, error-code reference and C ABI integration guide

examples/

JSONL MCP transcripts and a small agent example

The ZNKernel-II kernel itself is not part of this repository and is not open source. The tools call a separately licensed znk2_cli binary; without a valid license every geometry operation returns error 1004 by design.

Three commands

# 1) Start the server in demo mode: no kernel binary, no license, 3 recorded samples
ZNK_DEMO=1 node mcp/server.cjs

# 2) Run the CI smoke test (Node.js >= 18, zero npm dependencies)
node mcp/test/smoke.cjs

# 3) Recompute the public benchmark (needs your own ZNKernel-II 2.40 CLI + license)
python bench/verify.py --cli /path/to/znk2_cli.exe --license /path/to/your.lic

Windows PowerShell equivalents:

$env:ZNK_DEMO=1; node mcp/server.cjs
node mcp/test/smoke.cjs
python bench/verify.py --cli C:\path\to\znk2_cli.exe --license C:\path\to\your.lic

The full self-test (node mcp/test/selftest.cjs, 28 assertions) additionally needs ZNK2_CLI and ZNK2_LICENSE_FILE and exercises real kernel round-trips.

What "demo mode" is

ZNK_DEMO=1 replays 3 recorded, self-built sample verdicts (C01/C05/C06). It is a contract demo, not a geometry engine: it never spawns znk2_cli and never reads a license file. All three verdicts appear in the samples, including cannot_judge.

Related MCP server: aethis-mcp

Public benchmark

Six self-built cases, no customer data:

id

part

rule

expected

NA01

0.5° draft

manufacturing/draft_angle

reject

NA02

interference pair

assembly/interference

reject

NA03

blind hole L/D 7.5

manufacturing/hole_depth_ratio

reject

NA04

uneven wall

manufacturing/wall_thickness_uniformity

reject

NA05

tiny opening radius

quality/opening_radius

reject

C01

flange, all 20 rules

—

allow 15 / reject 0 / cannot_judge 5

Start at bench/README.md; machine-readable expectations and input SHA-256 are in bench/expected.json. Recompute with python bench/verify.py --cli <znk2_cli.exe> --license <your.lic>. An input whose SHA-256 no longer matches is a broken baseline, not a passing one.

Boundaries (please read before adopting)

  • Analytic solids only. The kernel is an analytic solid modeler (box, cylinder, sphere, cone, torus and analytic booleans). It does not implement a general NURBS B-rep boolean; imported STEP geometry is handled where it reduces to analytic faces, and unsupported configurations fail explicitly instead of returning a guessed result.

  • cannot_judge is not a pass. It means the engine lacks evidence or the configuration is out of the supported envelope. Timeouts and non-zero exits are also not passes. Do not fold cannot_judge into allow (or into reject) in your product.

  • No kernel source or binary here. Kernel licensing, activation and revocation are proprietary. This repository ships the MCP wrapper, docs, examples and the public benchmark only.

  • HTTP bridge is loopback-only. No TLS, auth or multi-tenancy; put it behind a reverse proxy if you expose it.

  • Verified environment: Windows x64 + MinGW/GCC. Linux/macOS/ARM/MSVC are untested; see docs/INTEGRATION-GUIDE.md.

License

Apache License 2.0 — see LICENSE and NOTICE. The license covers the wrapper, docs, examples and benchmark; it grants no rights to the ZNKernel-II kernel, the ZNGL licensing logic or any customer license file.

The names and logos are trademarks of the project owner. Apache-2.0 does not grant trademark rights; factual references are welcome. See TRADEMARK.md.

Commercial kernel licensing, support and certified rule packs are separate and are not sold under the open-source license: see COMMERCIAL.md.

Contributing

DCO sign-off (git commit -s), no CLA. See CONTRIBUTING.md. Security reports: SECURITY.md. Please never paste a .lic file, a key or customer geometry into an issue or pull request.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides deterministic tools for symbolic math, equation solving, relation verification, reasoning structure audits, and validated CAD primitives, returning evidence artifacts for every result.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables clients to run deterministic eligibility and decision evaluations from compiled legislation, policy, contracts, and regulation, inspect schemas and traces, route next questions, and discover rulesets, with optional private-beta authoring tools for rule generation, testing, refining, and publishing.
      36
      146 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables deterministic rule-engine decisions with document-grounded explanations, along with inspection, drafting, validation, publishing, and management of domain rules, policy documents, and decision quotas.
      65 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to retrieve verified, versioned, cited jurisdiction rules, starting with US and Canadian employment and payroll rules, and to query current or historical rules, compare jurisdictions, list changes, and resolve stored versions.
      8
      MIT