Measure the mesh
Runs checks C1 to C10 on the geometry: closed, manifold, consistently oriented, no degenerate faces. Returns the result of each check, not a summary opinion.
An agent that generates CAD geometry can read its own output and call it fine. This server gives it measurements instead: deterministic checks on the mesh, a hash to prove the file is the one that was checked, and a verdict that fails closed.
A client discovers them with tools/list. Every input and output is described by a JSON Schema, so an agent cannot call them loosely.
Runs checks C1 to C10 on the geometry: closed, manifold, consistently oriented, no degenerate faces. Returns the result of each check, not a summary opinion.
Computes the SHA-256 of the data and compares it with the expected hash. A mismatch fails closed, so a report always refers to exact bytes.
Formats the check results as a standard Markdown audit with an explicit pass or fail gate, ready to attach to a review.
An asset is rejected if any gate from C1 to C10 fails. These are the ones the requirements document names.
| Check | Asserts |
|---|---|
C1 | Buffer integrity: no NaN or infinite coordinates, no orphan vertices. |
C2 | Degenerate faces, counted against a quantum threshold of 10-12 m². |
C3 | 2-manifold topology: every edge is shared by at most two faces. |
C4 | Watertight closure: zero boundary edges for a closed solid. |
C5 | Outward normals and consistent winding. |
C10 | The Euler-Poincaré invariant: χ = 2 · (bodies − genus). |
Why deterministic: the same mesh gives the same verdict every time, on any machine. There is no model in the loop to be persuaded.
Add the server to the configuration of Claude Desktop, Cursor or any MCP client that launches servers over stdio.
{
"mcpServers": {
"nain-validator": {
"command": "python",
"args": ["-m", "nain_mcp_validator.server"],
"cwd": "/path/to/nain-mcp-validator"
}
}
}
# verify the server itself
pytest -v