Most MCP servers are thin wrappers: take arguments, call an API, return whatever comes back. For a CRUD app that is fine. For a physics solver it is how you get a confident, wrong number with a nice colour map.
NovaSolver Studio is an open-source FEM/CFD app with an MCP server. An AI agent (Claude Code) drove it from 6 to 12 November 2026, using dates as recorded in the logs, through Python MCP client scripts it wrote itself, and every call was logged: 3,355 calls, 206 case ids, 187 solves started.
The logs contain these outcomes (counts overlap across checks):
- 22 of 167 completed three-mesh tests failed (145 passed); 4 pipe calculations used a single mesh
- 171 results were obtained in total; one started job has no recorded completion
- 8 setups were RED in
validate_caseand could not be solved - 4
update_casecalls were rejected
On top of that, 11 solves were stopped for memory and 3 did not converge.
After refusals, re-runs and selection, the 136 accepted comparisons (132 external references and 4 other Studio meshes) had a median difference of 0.13%. But two types of setup mistake in the logs slipped through anyway. One of them happened right after a refusal.
Here is what we think a simulation MCP server should refuse, based on that data, with the code that does it.
1. Refuse to solve a problem that has no answer
Eight DC current cases came back RED before any solve. Joule heating was on by default, and no face set a temperature. Positive Joule heating with no heat-removal boundary cannot satisfy steady-state heat balance.
The reply was one line (the run was in Japanese; this is Studio's English text for the same check):
RED
[error] No face sets the temperature (fixed temperature or convection), so the temperature level is undefined.
The important part is that this is enforced on the server, not suggested. run_simulation and check_convergence both run the same checks and raise before starting a job:
items = checks.run(case, lang)
if any(i["level"] == "error" for i in items):
raise StudioError("err.blocked", 400, items=[i["message"] for i in items if i["level"] == "error"])
An agent can skip validate_case. It cannot skip this. The agent turned physics.joule_heating off and all eight ran.
2. Refuse to call an unconverged number "done"
check_convergence solves on three meshes and computes Roache's Grid Convergence Index. Passing requires converged levels, GCI 5% or less, sufficient growth in adjacent element counts, and either the asymptotic flag, a non-monotone sequence or a sufficiently small final change. Studio uses p ≥ 1 for that flag, rather than as a general definition of convergence:
monotone = e21 * e32 > 0 and abs(e32) > 0
if monotone:
p = math.log(abs(e21 / e32)) / math.log(r)
asymptotic = p >= 1.0
if not asymptotic:
p, fs = 1.0, 3.0 # do not trust Richardson extrapolation
22 mesh tests failed. Some were obvious: a sphere at Re = 1 gave Cd 28.78 → 28.96 → 29.54 (GCI 7.6%). Some were not. Four chime rods had a GCI around 1e-10% and still failed because adjacent element counts did not grow sufficiently (refined=False). Two spinning disks failed for the same reason at 0.0004% or less. Six of ten pin fins failed on the default mesh.
In every one of these, the fix was the same kind of thing: the agent set mesh.refine.<face> on the face that mattered and solved again. Fins, rods and disks all passed on the second run. A copper heat spreader went from three of six failing to all six passing (GCI 0.53% or less) with 0.5 mm elements on the heat source face.
Without the gate, those first answers would have looked fine. The disks' GCI was tiny.
3. Refuse to run out of memory twenty minutes in
The convergence study's fine mesh is the expensive one. Studio estimates the memory a solve needs from the node count before assembling anything:
need = max(0.0, MEM_BASE + MEM_PER_NODE[kind] * n_nodes + history - held)
have = committable_bytes()
if have is not None and need > have:
raise StudioError("err.memory", 500, need=f"{need / 1e9:.1f}", have=f"{have / 1e9:.1f}", nodes=n_nodes)
The message tells the agent what to do: close other apps or coarsen the mesh, and that the fine level of a mesh study uses the most.
Examples from the logs: a shelf board needed 6.5 GB with 6.1 GB free. A thick cylinder needed 4.8 GB with 4.3 GB free. A cantilever ruler needed 3.9–13.3 GB with 3.7–6.1 GB free in all four cases, and that topic was dropped. The agent's other responses were to coarsen a refinement, re-run a case alone, or change the model (the shelf's 400 mm span became an 800 mm board held at mid-span).
4. Refuse stale and partial writes
Every update_case carries expected_revision. If the case changed in between (the person may be editing in the GUI at the same time), the server refuses with 409 and the current revision. It also refuses the whole change if any one path is not editable.
That second rule is where it went wrong. On a plate-with-a-hole template, the agent sent:
changes={"geometry.params.hole": "5 mm", "mesh.refine.hole": "0.25 mm"}
mesh.refine is for faces of imported shapes, not template parameters, so the server rejected everything:
This field cannot be changed: mesh.refine.hole. See 'editable' in describe_case(detail="full").
Atomic rejection was the right call. The problem was the client. The driver logged the reply as text and moved on. The next call, validate_case, said GREEN. The cases meant for 5, 10 and 15 mm were all solved at the default 10 mm, passed the template's Kt reference check, and all gave Kt = 2.5411.
The agent noticed because three different holes gave the same number. The fixed script asserts on the reply:
r = await d.call("update_case", case_id=cid, expected_revision=1,
changes={"geometry.params.hole": f"{D} mm"})
assert r.startswith("rev 2") or (D == 10 and r.startswith("rev 1")), r
In the current source, Studio's errors go back as MCP results with is_error=True. The driver's call() never looked at that flag. If you write an MCP client for anything with side effects, check isError and raise. A refusal that reads like a log line is not a refusal.
5. Refuse bad arguments at the schema
Two kinds of call failed before reaching Studio code: import_geometry(physics="electric") (the value is "electrostatic") and render_view(view="side"). Both parameters are Literal types in the tool signature, so the MCP layer's argument validation rejected them:
async def render_view(case_id: str, quantity: str = "", language: Lang = "ja",
view: Literal['iso', 'iso_back', 'top', 'bottom', 'front', 'back', 'left', 'right'] = 'iso', ...)
Free-form strings are where agents guess. Enumerate them.
6. Refuse to extrapolate a fitted model
Studio also has instant_estimate: a Gaussian-process model fitted to points Studio solved and checked, for nine standard shapes, returning an answer in milliseconds with an error bar. Its tool description says it refuses outside the solved ranges. It also says the error bar covers the numerics, not the real part.
What a server cannot refuse
The second mistake that slipped through had nothing to refuse. The agent wanted a shelf board resting on two supports. It constrained a 10 mm strip on the underside of each end in z only. Preventing deflection across that finite width also strongly restrained bending rotation, so the board behaved almost as if clamped: 0.346 mm deflection against 1.467 mm from the simply supported beam formula. GCI was 0.99%, a pass. The setup was valid. It was just not the setup that was meant.
No check can know intent. So validate_case does the next best thing: it describes the setup in words. From the plate log, translated:
GREEN
Setup summary (check it matches the intent; a wrong load direction or face still gives an answer):
x1 (right end face (x=L)): 5,000 N, direction +x. The face points +X, so the load pulls the face outward. Area 250 mm², mean 20 MPa.
Support: x0 (left end face (x=0)) = fixed.
Material: steel, E 205 GPa, yield 235 MPa.
The tool's own description tells the agent to compare that summary with what the person asked for before solving. That is the server handing the last check back to the caller, explicitly.
The agent caught the shelf by comparing with a hand formula. That is still the most reliable test in these logs.
The rule of thumb
- If the answer cannot exist, refuse on the server, in the solve path itself
- If the answer exists but is not converged, refuse to call it done, even when the GCI looks tiny
- If the request will fail late, refuse early with numbers (need vs have)
- If one field in a write is bad, refuse the whole write, and return it as an error the client cannot mistake for success
- If intent cannot be checked, describe the setup back in plain words
NovaSolver Studio is free and open source (GPL-3.0). It solves structural, thermal, flow and electrical problems in one app and can be driven from MCP clients.
- Overview and download: https://novasolver.jp/en/studio/
- Source code: https://github.com/novasolver/novasolver-studio
Where do you draw the line in your own MCP servers: which conditions return isError and stop the agent, and which only come back as a warning in the text?


Top comments (0)