Metadata-Version: 2.4
Name: opennodex
Version: 0.1.2
Summary: Structural FEA from .ndx decks: the nodex compiler, native engine and mesher, from Python, the command line and any MCP host.
Author-email: opennodex <hola@opennodex.cloud>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://jpreyes.github.io/opennodex/
Project-URL: Downloads, https://github.com/jpreyes/opennodex/releases
Project-URL: Issues, https://github.com/jpreyes/opennodex/issues
Keywords: fem,fea,finite elements,structural engineering,ndx,nodex
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: nodejs-wheel-binaries>=22

# opennodex

Structural finite-element analysis from `.ndx` decks, from Python and the command line.

`pip install opennodex` brings everything a run needs: the `.ndx` compiler, the native **nodex** engine and
the native **nodex-mesher**, built for your platform, plus Node.js (as a dependency wheel). Nothing else to
install, no solver to configure.

```bash
pip install opennodex
opennodex selftest          # solves a beam and an auto-meshed slab, and the slab over MCP
```

## Command line

```bash
opennodex check viga.ndx               # compile only: positioned diagnostics
opennodex run viga.ndx                 # compile + solve, one summary line per solve
opennodex run viga.ndx --json r.json   # …and the full result
opennodex info                         # compiler, engine contract version, mesher
```

## Python

```python
import opennodex

out = opennodex.run("viga.ndx")        # a path, or the deck's text
for solve, result in zip(out["solves"], out["results"]):
    print(solve["kind"], len(result["nodes"]))

opennodex.check("viga.ndx")            # {"ok", "diagnostics", ...} — never raises for a bad deck
```

## MCP — the opennodex tools in any agent harness

`opennodex mcp` is a local MCP server (stdio) with the opennodex tools: validate, run (native engine, real
`runId`), query results, check design criteria, section catalog, suggest a section, compare modal data, twin
training, model patches and more. It works in **plan mode**: it never edits your files — proposals come back
as diffs for your agent to apply. File paths resolve against the folder the host starts it in (your project),
or `--root DIR`.

Install it once so `opennodex` is on your PATH (`pipx install opennodex` or `uv tool install opennodex`), or let
`uvx` fetch it on demand (`"command": "uvx", "args": ["opennodex", "mcp"]`). Then register it:

**Claude Code**

```bash
claude mcp add opennodex -- opennodex mcp
```

**opencode** — `opencode.json`

```json
{ "mcp": { "opennodex": { "type": "local", "command": ["opennodex", "mcp"], "enabled": true } } }
```

**OpenAI Codex CLI** — `~/.codex/config.toml`

```toml
[mcp_servers.opennodex]
command = "opennodex"
args = ["mcp"]
```

**Claude Desktop / Cursor** — `claude_desktop_config.json` / `.cursor/mcp.json`

```json
{ "mcpServers": { "opennodex": { "command": "opennodex", "args": ["mcp"] } } }
```

**VS Code** — `.vscode/mcp.json`

```json
{ "servers": { "opennodex": { "type": "stdio", "command": "opennodex", "args": ["mcp"] } } }
```

`opennodex selftest` also drives the MCP server the way a host does and runs a deck through it. The damage
localization / monitoring tools need the nodex-shm engine, which this package does not include yet; without it
they say so instead of answering.

A deck looks like this:

```
model units kN, m
material steel E=210e6 nu=0.3 rho=7.85
section s A=0.00538 Iy=8.36e-5 Iz=6.04e-6 J=2.01e-7
node A at (0,0,0)
node B at (6,0,0)
beam B1 from A to B steel s div 4
fix A
load 1 nodal B fz=-10
solve linear_static
```

Every number comes from a real engine run. The deck carries its own section properties, so it runs the same
on any machine.

## Platforms

Linux x86_64 (glibc as tagged on the wheel), Windows x64, macOS (Apple Silicon and Intel). The desktop app
(editor, 3D viewer and the optional agent) is a separate download:
[opennodex releases](https://github.com/jpreyes/opennodex/releases).

---

**Español.** `pip install opennodex` instala el compilador de `.ndx`, el motor nativo nodex y el mallador
nativo para tu plataforma, más Node.js. `opennodex selftest` comprueba la instalación; `opennodex run
deck.ndx` compila y resuelve; `opennodex mcp` expone las herramientas de opennodex como servidor MCP local
para Claude Code, opencode, Codex, Cursor o VS Code (configuración arriba). La aplicación de escritorio se
descarga aparte.
