CalculiX MCP

by cai-aa

Not rated
GitHub

About

Open-source FEM solver (ccx) as a FastMCP server, integrated into the CAE-Agent-Hub agent + browser-viewer ecosystem

Details

Author
cai-aa
Categories
Productivity

Setup

Install CalculiX MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/cai-aa/CAE-Agent-Hub

Follow the installation instructions in the repository README, then restart your MCP client.

An MCP server that exposes the open-sourceCalculiXFEM solver (ccx) to MCP clients. CalculiX is GPLv2, needs no license, and runs as a fire-and-forget CLI — so this server is fully self-contained, with no live-session bridge and no license state machine.

The workflow is: parse a CalculiX/Abaqus.inpdeck, inspect its tunable design variables, edit a value in place, submit it toccx, read the text results (.dat), and export those.datresults toresult_mesh.jsonso the repo'sText to CAE Viewercan render the mesh and stress field.

This is the first open-source-solver FEM MCP in the hub (the existing FEA line stopped at FEniCS references), filling the gap noted in Issue #14.

Hard-won CalculiX contracts (encoded in the solver)

These are why this server is non-trivial — all from public CalculiX behaviour:

- ccx exit code is untrustedccxreturns 0 even when it printsERROR. Success = noERRORin stdoutandthe.stafile has a data rowandno timeout.
- .dathas no von Mises— only 6 stress components; σ_vm is self-computed.
- .dathas no total volume/mass— computed from the mesh geometry ×*DENSITY.
- Nevermeshio.write— it drops every card and rewritesB31B31H(corrupts the file).modify_carddoes pure-text in-place edits instead.

optimize_structure_toolruns two-stagesizingoptimization: a Latin Hypercube coarse sweep, then coordinate-descent refinement, minimizing mass subject to stress and displacement constraints by editing scalar cards in place.

optimize_structure_tool( path="examples/bracket.inp", variables={"shell.PLATE.thickness": [2.0, 8.0]}, n_lhs=8, max_solves=18, ) # -> best ~4.1 mm, ~-48% mass, stress < 250 MPa, displacement < 1.5 mm

- Shell/beam models only.Solids (C3D8) expose no scalar geometry card, so there is no thickness to thin; use shape/topology optimization instead.
- This issizing/parameter optimization, not topology optimization— it thins sections, it does not redistribute material in space.
- The best deck is written next to the input as<stem>.optimized.inp; pass it toexport_results_toolto render the optimized design.

From this directory (Linux/macOS; adapt the venv activation on Windows):

uv venv .venv --python 3.11 uv pip install --python .venv/bin/python "mcp>=1.0,<1.8" meshio numpy "python-dotenv>=1,<2" uv pip install --python .venv/bin/python pytest # dev only

mcpis pinned below 1.8:mcp2.0 removedmcp.server.fastmcp(the FastMCP import used here and by the hub's other MCPs).

Install CalculiX separately (e.g.ccxorccx_preCICEon your PATH, or setCCX_EXE).fea_healthwill tell you whether the executable was detected.

.venv/bin/python mcp_server.py # stdio MCP transport

Register it with an MCP client usingexamples/mcp_config.example.json.

examples/cantilever.inpis apublic textbook cantilever(steel C3D8 solid bar, clamped at one end, transversely loaded at the other). Regenerate it with:

Hand-calc sanity targets (Euler-Bernoulli, mm-t-s-MPa, P = 100 N): tip deflection ≈ 0.8 mm, root stress ≈ 140 MPa. The viewer auto-magnifies the small elastic deformation for display.

Parser and exporter tests run without a solver. Solver tests are skipped automatically whenccxis not detected, so the suite stays green before CalculiX is installed.

- mcp_server.py— FastMCP stdio server.
- tools/inp_parser.py.inpcard parsing + text in-place editing.
- tools/solver.pyccxsubprocess +.datresult parsing.
- tools/result_exporter.py.dat/.inpresult_mesh.json(viewer format).
- tools/optimizer.py— two-stage sizing optimization (LHS + coordinate descent).
- examples/— public cantilever benchmark + generator + MCP config example.
- tests/— pytest suite.

Commit only reusable source, examples (public benchmarks), tests, and docs. Do not commit the virtual environment,.env, or any generated solver output (.frd,.dat,.sta,.cvg, job directories). Input.inpdecks are source and are committed.

The 1Password MCP server creates a bridge that allows MCP clients such as Codex and Kiro to manage your 1Password Environments with secure authorization prompts.

This is the 1st, easiest, and cheapest PPT, slides, presentation AI generation MCP Server in the world.

Persistent memory for any AI assistant. Zero token cost until recall. Stores memories in local SQLite, ranks by 6-factor scoring, returns results 79% smaller than JSON. Works with Claude, ChatGPT, Grok, Cursor, Windsurf, and any MCP client.

A MCP server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.

Enables LLM clients to interact with macOS applications through AppleScript. Built using the @beyondbetter/bb-mcp-server library, this server provides safe, controlled execution of predefined scripts with optional support for arbitrary script execution.

An MCP server for WordPress plugin audits

Turn your AI assistant into a digital marketing hub that creates, organizes, and analyzes links and QR Codes on demand.

Connect AI clients to Cal.com scheduling through the Model Context Protocol using the hosted server at mcp.cal.com or a local instance.

Sync Calendars, Scheduling Links, AI Executive Scheduling Assistant, Unified Calendar

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.