@ferscloud/fers-mcp 2.1.0 → 2.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,65 +1,65 @@
1
- Copyright (c) 2024-2026 Jeroen Hermsen
2
-
3
- The FERS MCP server is free for any noncommercial purpose under the
4
- PolyForm Strict License 1.0.0 below. Commercial use requires a commercial
5
- licence, which comes with a paid FERS Cloud plan: https://ferscloud.com/pricing
6
-
7
- # PolyForm Strict License 1.0.0
8
-
9
- <https://polyformproject.org/licenses/strict/1.0.0>
10
-
11
- ## Acceptance
12
-
13
- In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
14
-
15
- ## Copyright License
16
-
17
- The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
18
-
19
- ## Patent License
20
-
21
- The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
22
-
23
- ## Noncommercial Purposes
24
-
25
- Any noncommercial purpose is a permitted purpose.
26
-
27
- ## Personal Uses
28
-
29
- Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
30
-
31
- ## Noncommercial Organizations
32
-
33
- Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
34
-
35
- ## Fair Use
36
-
37
- You may have "fair use" rights for the software under the law. These terms do not limit them.
38
-
39
- ## No Other Rights
40
-
41
- These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
42
-
43
- ## Patent Defense
44
-
45
- If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
46
-
47
- ## Violations
48
-
49
- The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
50
-
51
- ## No Liability
52
-
53
- ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
54
-
55
- ## Definitions
56
-
57
- The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
58
-
59
- **You** refers to the individual or entity agreeing to these terms.
60
-
61
- **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
62
-
63
- **Your licenses** are all the licenses granted to you for the software under these terms.
64
-
65
- **Use** means anything you do with the software requiring one of your licenses.
1
+ Copyright (c) 2024-2026 Jeroen Hermsen
2
+
3
+ The FERS MCP server is free for any noncommercial purpose under the
4
+ PolyForm Strict License 1.0.0 below. Commercial use requires a commercial
5
+ licence, which comes with a paid FERS Cloud plan: https://ferscloud.com/pricing
6
+
7
+ # PolyForm Strict License 1.0.0
8
+
9
+ <https://polyformproject.org/licenses/strict/1.0.0>
10
+
11
+ ## Acceptance
12
+
13
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
14
+
15
+ ## Copyright License
16
+
17
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
18
+
19
+ ## Patent License
20
+
21
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
22
+
23
+ ## Noncommercial Purposes
24
+
25
+ Any noncommercial purpose is a permitted purpose.
26
+
27
+ ## Personal Uses
28
+
29
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
30
+
31
+ ## Noncommercial Organizations
32
+
33
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
34
+
35
+ ## Fair Use
36
+
37
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
38
+
39
+ ## No Other Rights
40
+
41
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
42
+
43
+ ## Patent Defense
44
+
45
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
46
+
47
+ ## Violations
48
+
49
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
50
+
51
+ ## No Liability
52
+
53
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
54
+
55
+ ## Definitions
56
+
57
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
58
+
59
+ **You** refers to the individual or entity agreeing to these terms.
60
+
61
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
62
+
63
+ **Your licenses** are all the licenses granted to you for the software under these terms.
64
+
65
+ **Use** means anything you do with the software requiring one of your licenses.
package/README.md CHANGED
@@ -1,92 +1,97 @@
1
- # FERS MCP server, local
2
-
3
- Structural finite-element analysis for AI agents, solving on **your own machine**. The same tools as the hosted
4
- FERS MCP server: build beams, frames, trusses and plates, add loads and EN 1990 combinations, run modal,
5
- buckling and seismic analyses and Eurocode unity checks. The difference is where the solve runs: here, with the
6
- FERS engine (Rust compiled to WebAssembly) inside this process, not on a server.
7
-
8
- - Results come back in seconds and stay on your machine.
9
- - No per-solve charges, no request timeouts, no upload size limit.
10
- - Free for non-commercial use, models up to **100 members**. Commercial use needs a FERS Pro API key, which
11
- also raises the limit to **10,000 members**.
12
-
13
- ## Install
14
-
15
- Node.js 18 or newer. The package runs with `npx`, nothing else to install.
16
-
17
- **Claude Desktop.** Download `fers-mcp.mcpb` from the
18
- [latest release](https://github.com/Jeroen124/FERS_core/releases?q=mcp-v) and double-click it, or add this to
19
- `claude_desktop_config.json` (Settings, Developer, Edit Config):
20
-
21
- ```json
22
- {
23
- "mcpServers": {
24
- "fers": {
25
- "command": "npx",
26
- "args": ["-y", "@ferscloud/fers-mcp"],
27
- "env": { "FERS_API_KEY": "<your key, optional>" }
28
- }
29
- }
30
- }
31
- ```
32
-
33
- **Claude Code**
34
-
35
- ```
36
- claude mcp add --transport stdio fers --env FERS_API_KEY=<your key> -- npx -y @ferscloud/fers-mcp
37
- ```
38
-
39
- **Cursor** (`.cursor/mcp.json`) and most other clients use the same shape as Claude Desktop, with
40
- `"type": "stdio"`. **VS Code** (`.vscode/mcp.json`) uses a top-level `servers` key instead of `mcpServers`.
41
- **Codex CLI** (`~/.codex/config.toml`):
42
-
43
- ```toml
44
- [mcp_servers.fers]
45
- command = "npx"
46
- args = ["-y", "@ferscloud/fers-mcp"]
47
- env = { FERS_API_KEY = "<your key>" }
48
- ```
49
-
50
- **ChatGPT desktop:** Settings, MCP servers, Add server, STDIO, command `npx -y @ferscloud/fers-mcp`.
51
-
52
- Clients that cannot start a program on your computer (Claude and ChatGPT in the browser or on a phone) can use
53
- the hosted server at `https://ferscloud.com/api/mcp` instead. It authors and validates models there and hands
54
- back a link that solves the model in your browser.
55
-
56
- ## Options
57
-
58
- | Setting | Default | What it does |
59
- |---|---|---|
60
- | `FERS_API_KEY` | not set | A FersCloud API key ([create one](https://ferscloud.com), Profile, API Keys). A Pro account raises the limit to 10,000 members. |
61
- | `--out-dir <folder>` or `FERS_MCP_OUT_DIR` | not set | `solve_model` with `detail: "full"` writes the complete result to a file here and returns its path, instead of putting it in the conversation. |
62
- | `FERS_HOME` | `~/.fers` | Where `stash_model` drafts and `save_model` models are kept. |
63
- | `FERS_MCP_TIMEOUT_S` | `300` | Ceiling on one solve, in seconds. |
64
- | `FERS_CLOUD_URL` | `https://ferscloud.com` | Licence server. |
65
-
66
- `get_usage` reports the tier in force, why, and the engine version.
67
-
68
- ## What leaves your machine
69
-
70
- Your models never do. With `FERS_API_KEY` set, the server sends that key to FersCloud to obtain a 30-minute solve
71
- token; the engine verifies the token offline. Without a key nothing is sent at all and every solve runs on the
72
- Free tier.
73
-
74
- ## Licence
75
-
76
- PolyForm Strict License 1.0.0, see `LICENSE`: free for any non-commercial purpose. Commercial use needs a paid
77
- FERS Cloud plan (https://ferscloud.com/pricing), which includes the commercial licence. The licence does not allow
78
- modifying or redistributing the package. Documentation: https://ferscloud.com/mcp
79
-
80
- ## Releasing (maintainers)
81
-
82
- The package is built from the FERS Cloud sources (`src/lib/mcp-core`, `src/mcp-local`) by
83
- `npm run build:mcp-local`, and released by the manual GitHub workflow `publish-mcp.yml`, which tests, packs,
84
- installs and smoke-tests both the npm package and the Claude Desktop bundle before it publishes anything.
85
-
86
- - Bump the version in `mcp-local/package.json`, `mcp-local/manifest.json`, `server.json`,
87
- `public/.well-known/mcp/server-card.json` and `SERVER_VERSION` in `src/lib/mcp-core/server.ts`
88
- together; `mcpManifests.test.ts` fails until they agree.
89
- - The first release is published by hand, because npm attaches a trusted publisher only to an existing
90
- package: `npm run build:mcp-local`, then `npm publish --access public` in `mcp-local/` while logged in to
91
- the `@ferscloud` organisation. Then add `Jeroen124/FERS_cloud`, workflow `publish-mcp.yml`, as the
92
- package's trusted publisher on npmjs.com, and later releases go through the workflow.
1
+ # FERS MCP server, local
2
+
3
+ Structural finite-element analysis for AI agents, solving on **your own machine**. The same tools as the hosted
4
+ FERS MCP server: build beams, frames, trusses and plates, add loads and EN 1990 combinations, run modal,
5
+ buckling and seismic analyses and Eurocode unity checks. The difference is where the solve runs: here, with the
6
+ FERS engine (Rust compiled to WebAssembly) inside this process, not on a server.
7
+
8
+ - Results come back in seconds and stay on your machine.
9
+ - No per-solve charges, no request timeouts, no upload size limit.
10
+ - Free for non-commercial use, models up to **100 members**. Commercial use needs a FERS Pro API key, which
11
+ also raises the limit to **10,000 members**.
12
+
13
+ ## Install
14
+
15
+ Node.js 18 or newer. The package runs with `npx`, nothing else to install.
16
+
17
+ **Claude Desktop.** Download `fers-mcp.mcpb` from the
18
+ [latest release](https://github.com/Jeroen124/FERS_core/releases?q=mcp-v) and double-click it, or add this to
19
+ `claude_desktop_config.json` (Settings, Developer, Edit Config):
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "fers": {
25
+ "command": "npx",
26
+ "args": ["-y", "@ferscloud/fers-mcp"],
27
+ "env": { "FERS_API_KEY": "<your key, optional>" }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ **Claude Code**
34
+
35
+ ```
36
+ claude mcp add --transport stdio fers --env FERS_API_KEY=<your key> -- npx -y @ferscloud/fers-mcp
37
+ ```
38
+
39
+ **Cursor** (`.cursor/mcp.json`) and most other clients use the same shape as Claude Desktop, with
40
+ `"type": "stdio"`. **VS Code** (`.vscode/mcp.json`) uses a top-level `servers` key instead of `mcpServers`.
41
+ **Codex CLI** (`~/.codex/config.toml`):
42
+
43
+ ```toml
44
+ [mcp_servers.fers]
45
+ command = "npx"
46
+ args = ["-y", "@ferscloud/fers-mcp"]
47
+ env = { FERS_API_KEY = "<your key>" }
48
+ ```
49
+
50
+ **ChatGPT desktop:** Settings, MCP servers, Add server, STDIO, command `npx -y @ferscloud/fers-mcp`.
51
+
52
+ Clients that cannot start a program on your computer (Claude and ChatGPT in the browser or on a phone) can use
53
+ the hosted server at `https://ferscloud.com/api/mcp` instead. It authors and validates models there and hands
54
+ back a link that solves the model in your browser.
55
+
56
+ ## Options
57
+
58
+ | Setting | Default | What it does |
59
+ |---|---|---|
60
+ | `FERS_API_KEY` | not set | A FersCloud API key ([create one](https://ferscloud.com), Profile, API Keys). A Pro account raises the limit to 10,000 members. |
61
+ | `--out-dir <folder>` or `FERS_MCP_OUT_DIR` | not set | `solve_model` with `detail: "full"` writes the complete result to a file here and returns its path, instead of putting it in the conversation. |
62
+ | `FERS_HOME` | `~/.fers` | Where `stash_model` drafts and `save_model` models are kept. |
63
+ | `FERS_MCP_TIMEOUT_S` | `300` | Ceiling on one solve, in seconds. |
64
+ | `FERS_CLOUD_URL` | `https://ferscloud.com` | Licence server. |
65
+
66
+ `get_usage` reports the tier in force, why, and the engine version.
67
+
68
+ ## What leaves your machine
69
+
70
+ Your models never do. With `FERS_API_KEY` set, the server sends that key to FersCloud to obtain a 30-minute solve
71
+ token; the engine verifies the token offline. Without a key nothing is sent at all and every solve runs on the
72
+ Free tier.
73
+
74
+ ## Licence
75
+
76
+ PolyForm Strict License 1.0.0, see `LICENSE`: free for any non-commercial purpose. Commercial use needs a paid
77
+ FERS Cloud plan (https://ferscloud.com/pricing), which includes the commercial licence. The licence does not allow
78
+ modifying or redistributing the package. Documentation: https://ferscloud.com/mcp
79
+
80
+ ## Releasing (maintainers)
81
+
82
+ The package is built from the FERS Cloud sources (`src/lib/mcp-core`, `src/mcp-local`) by
83
+ `npm run build:mcp-local`, and released by the GitHub workflow `publish-mcp.yml`, which tests, packs,
84
+ installs and smoke-tests both the npm package and the Claude Desktop bundle before it publishes anything.
85
+
86
+ - The version follows the engine the package bundles: `<engine minor>.<engine patch>.<n>`, so engine 0.2.75
87
+ gives 2.75.0 and another release on that engine 2.75.1. After an engine bump run
88
+ `node scripts/set-mcp-version.mjs`; for a server-only change, `node scripts/set-mcp-version.mjs --next`.
89
+ It writes `mcp-local/package.json`, `mcp-local/manifest.json`, `server.json`,
90
+ `public/.well-known/mcp/server-card.json` and `SERVER_VERSION` in `src/lib/mcp-core/server.ts`;
91
+ `mcpManifests.test.ts` fails until they agree and follow the engine pin.
92
+ - Releases publish themselves. After every successful prod deploy the workflow releases the version when
93
+ npm does not have it yet: npm, the `mcp-v<version>` release with the `.mcpb` on FERS_core, and the
94
+ official registry. A manual run builds and verifies; with `publish = true` it also finishes a release
95
+ whose later step failed, since each publish step skips what already exists.
96
+ - The first release (2.1.0) was published by hand, because npm attaches a trusted publisher only to an
97
+ existing package. The trusted publisher is `Jeroen124/FERS_cloud`, workflow `publish-mcp.yml`.
package/dist/fers-mcp.cjs CHANGED
@@ -21940,7 +21940,7 @@ var openapi_default = {
21940
21940
  name: "PolyForm-Strict-1.0.0",
21941
21941
  url: "https://polyformproject.org/licenses/strict/1.0.0"
21942
21942
  },
21943
- version: "0.2.73"
21943
+ version: "0.2.76"
21944
21944
  },
21945
21945
  paths: {},
21946
21946
  components: {
@@ -22149,7 +22149,7 @@ var openapi_default = {
22149
22149
  },
22150
22150
  enable_self_weight: {
22151
22151
  type: "boolean",
22152
- description: "When true, the engine generates self-weight (dead load) for every member\nfrom its material density and cross-sectional area, collected into a\nself-weight load case (see `self_weight_load_case_id`). Cable members\ncarry their weight intrinsically in the catenary formulation and are\ntherefore excluded from the generated self-weight load.",
22152
+ description: "When true, the engine generates self-weight (dead load) for every member\nfrom its material density and cross-sectional area, collected into a\nself-weight load case (see `self_weight_load_case_id`). Cable members\ncarry their weight intrinsically in the catenary formulation and are\ntherefore excluded from the generated self-weight load.\nA load combination carries self-weight only if it includes that load\ncase. When the model has combinations and none of them does, every\ncombination carries the warning `self_weight_not_in_combinations`.",
22153
22153
  default: false
22154
22154
  },
22155
22155
  gravity_direction: {
@@ -22263,7 +22263,7 @@ var openapi_default = {
22263
22263
  "null"
22264
22264
  ],
22265
22265
  format: "int32",
22266
- description: 'Target load case id that generated self-weight loads are injected into.\nWhen set, the loads are added to that (typically empty "G") load case so\ncombinations can factor it (e.g. 1.35\xB7G). When `None` and self-weight is\nenabled, a new load case is created automatically.',
22266
+ description: 'Target load case id that generated self-weight loads are injected into.\nWhen set, the loads are added to that (typically empty "G") load case so\ncombinations can factor it (e.g. 1.35\xB7G). When `None` and self-weight is\nenabled, a new "Self-weight" load case is created with the highest load\ncase id + 1, and no combination includes it unless it lists that id.',
22267
22267
  minimum: 0
22268
22268
  },
22269
22269
  solve_loadcases: {
@@ -22659,7 +22659,7 @@ var openapi_default = {
22659
22659
  },
22660
22660
  CalcStep: {
22661
22661
  type: "object",
22662
- description: "One line of the transparent hand-calc: a symbolic formula, the same formula\nwith real numbers substituted, and the resulting value + unit (display units).",
22662
+ description: "One line of the transparent hand-calc: a symbolic formula, the same formula\nwith real numbers substituted, and the resulting value (display units).",
22663
22663
  required: [
22664
22664
  "label",
22665
22665
  "formula",
@@ -22694,11 +22694,13 @@ var openapi_default = {
22694
22694
  type: "string"
22695
22695
  },
22696
22696
  unit: {
22697
- type: "string"
22697
+ type: "string",
22698
+ description: "The unit of `demand` and `capacity` on a row that carries them \u2014 not of\n`value`, which is then a ratio. On any other row, the unit of `value`;\nempty when that is dimensionless."
22698
22699
  },
22699
22700
  value: {
22700
22701
  type: "number",
22701
- format: "double"
22702
+ format: "double",
22703
+ description: "The row's result. On a row with `demand` it is the utilization ratio,\ndimensionless whatever `unit` says."
22702
22704
  }
22703
22705
  },
22704
22706
  additionalProperties: false
@@ -29268,6 +29270,30 @@ function validateScissorHinges(doc, problems) {
29268
29270
  });
29269
29271
  }
29270
29272
  }
29273
+ function validateSelfWeight(doc, problems) {
29274
+ const analysis = doc?.analysis ?? {};
29275
+ const options = analysis.options ?? {};
29276
+ const combinations = Array.isArray(analysis.load_combinations) ? analysis.load_combinations : [];
29277
+ if (options.enable_self_weight !== true || combinations.length === 0) return;
29278
+ const named = options.self_weight_load_case_id;
29279
+ const cases = Array.isArray(analysis.load_cases) ? analysis.load_cases : [];
29280
+ const target = typeof named === "number" ? named : Math.max(0, ...cases.map((c) => Number(c?.id) || 0)) + 1;
29281
+ const included = combinations.some(
29282
+ (c) => Array.isArray(c?.load_case_factors) && c.load_case_factors.some((f) => Number(f?.load_case_id) === target)
29283
+ );
29284
+ if (included) return;
29285
+ problems.push(
29286
+ typeof named === "number" ? {
29287
+ path: "analysis.options.self_weight_load_case_id",
29288
+ message: `self-weight goes into load case ${target}, but no load combination includes it, so every combination would be solved without self-weight. Add load case ${target} to the combinations, or point self_weight_load_case_id at the permanent-load case they factor (for example G).`,
29289
+ severity: "error"
29290
+ } : {
29291
+ path: "analysis.options.enable_self_weight",
29292
+ message: `self-weight is on without self_weight_load_case_id, so the solver puts it in a load case of its own (id ${target}) that no load combination includes, and every combination would be solved without self-weight. Set self_weight_load_case_id to the permanent-load case your combinations factor (for example G).`,
29293
+ severity: "error"
29294
+ }
29295
+ );
29296
+ }
29271
29297
  function validateModelDeep(jsonData) {
29272
29298
  let doc;
29273
29299
  try {
@@ -29309,6 +29335,7 @@ function validateModelDeep(jsonData) {
29309
29335
  }
29310
29336
  validateReferences(doc, problems);
29311
29337
  validateScissorHinges(doc, problems);
29338
+ validateSelfWeight(doc, problems);
29312
29339
  warnUnknownAnalysisKeys(doc, problems);
29313
29340
  const errors = problems.filter((p) => p.severity === "error");
29314
29341
  const warnings = problems.filter((p) => p.severity === "warning");
@@ -79114,7 +79141,7 @@ function setAnalysis(args) {
79114
79141
  const swId = analysis.options?.self_weight_load_case_id;
79115
79142
  if (swId != null && !caseIds.has(Number(swId))) {
79116
79143
  return fail(
79117
- `options.self_weight_load_case_id ${swId} is not a load case in this model. Create one with add_load_case first, or omit the field to let the solver append its own "Self-weight" case (note: nothing will factor that case into a combination).`
79144
+ `options.self_weight_load_case_id ${swId} is not a load case in this model. Point it at the permanent-load case (G) your combinations factor, creating it with add_load_case first. Without the field the self-weight goes into a case of its own that no combination includes, and a model whose combinations all leave it out is refused at solve time.`
79118
79145
  );
79119
79146
  }
79120
79147
  const b = analysis.buckling;
@@ -81487,10 +81514,7 @@ var BaseAPI = class _BaseAPI {
81487
81514
  this.configuration = configuration;
81488
81515
  this.middleware = configuration.middleware;
81489
81516
  }
81490
- static jsonRegex = new RegExp(
81491
- "^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$",
81492
- "i"
81493
- );
81517
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
81494
81518
  middleware;
81495
81519
  withMiddleware(...middlewares) {
81496
81520
  const next = this.clone();
@@ -81524,7 +81548,7 @@ var BaseAPI = class _BaseAPI {
81524
81548
  async request(context, initOverrides) {
81525
81549
  const { url, init } = await this.createFetchParams(context, initOverrides);
81526
81550
  const response = await this.fetchApi(url, init);
81527
- if (response && response.status >= 200 && response.status < 300) {
81551
+ if (response && (response.status >= 200 && response.status < 300)) {
81528
81552
  return response;
81529
81553
  }
81530
81554
  throw new ResponseError(response, "Response returned an error code");
@@ -81534,14 +81558,8 @@ var BaseAPI = class _BaseAPI {
81534
81558
  if (context.query !== void 0 && Object.keys(context.query).length !== 0) {
81535
81559
  url += "?" + this.configuration.queryParamsStringify(context.query);
81536
81560
  }
81537
- const headers = Object.assign(
81538
- {},
81539
- this.configuration.headers,
81540
- context.headers
81541
- );
81542
- Object.keys(headers).forEach(
81543
- (key) => headers[key] === void 0 ? delete headers[key] : {}
81544
- );
81561
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
81562
+ Object.keys(headers).forEach((key) => headers[key] === void 0 ? delete headers[key] : {});
81545
81563
  const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
81546
81564
  const initParams = {
81547
81565
  method: context.method,
@@ -81582,10 +81600,7 @@ var BaseAPI = class _BaseAPI {
81582
81600
  }
81583
81601
  let response = void 0;
81584
81602
  try {
81585
- response = await (this.configuration.fetchApi || fetch)(
81586
- fetchParams.url,
81587
- fetchParams.init
81588
- );
81603
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
81589
81604
  } catch (e) {
81590
81605
  for (const middleware of this.middleware) {
81591
81606
  if (middleware.onError) {
@@ -81600,10 +81615,7 @@ var BaseAPI = class _BaseAPI {
81600
81615
  }
81601
81616
  if (response === void 0) {
81602
81617
  if (e instanceof Error) {
81603
- throw new FetchError(
81604
- e,
81605
- "The request failed and the interceptors did not return an alternative response"
81606
- );
81618
+ throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
81607
81619
  } else {
81608
81620
  throw e;
81609
81621
  }
@@ -84337,7 +84349,7 @@ function solveInBrowserPayload(a) {
84337
84349
  }
84338
84350
 
84339
84351
  // src/lib/mcp-core/server.ts
84340
- var SERVER_VERSION = "2.1.0";
84352
+ var SERVER_VERSION = "2.76.0";
84341
84353
  function tooLarge(model) {
84342
84354
  return typeof model !== "string" || model.length > MODEL_JSON_MAX_BYTES;
84343
84355
  }
@@ -85114,7 +85126,7 @@ function createFersMcpServer(ctx, deps) {
85114
85126
  model: jsonString().optional().describe("Stringified FERS model JSON to update"),
85115
85127
  model_ref: modelRefField(),
85116
85128
  options: jsonString().optional().describe(
85117
- 'AnalysisOptions fields to merge, as a JSON object. e.g. {"order":"NONLINEAR","nonlinear_method":"P_DELTA","enable_self_weight":true}. See get_schema("AnalysisOptions").'
85129
+ 'AnalysisOptions fields to merge, as a JSON object. e.g. {"order":"NONLINEAR","nonlinear_method":"P_DELTA","enable_self_weight":true,"self_weight_load_case_id":1}. Self-weight reaches a combination only through its load case: point self_weight_load_case_id at the permanent-load case (G) your combinations factor. See get_schema("AnalysisOptions").'
85118
85130
  ),
85119
85131
  modal: jsonString().optional().describe(
85120
85132
  'ModalAnalysisSettings, e.g. {"num_modes":6,"mass_formulation":"CONSISTENT"}. Pass "null" to remove the block.'
@@ -86455,7 +86467,7 @@ function makeLocalEngine(opts) {
86455
86467
  const message = err instanceof Error ? err.message : String(err);
86456
86468
  return {
86457
86469
  kind: "error",
86458
- message: TRAP_RE.test(message) ? `The FERS engine crashed on this model (${message}) and has been restarted. That is an engine defect, not a modelling error: please report it with the model at https://ferscloud.com/support.` : message
86470
+ message: TRAP_RE.test(message) ? `The FERS engine crashed on this model (${message}) and has been restarted. A very large model or a very fine plate mesh can run it out of memory: try a coarser mesh. Otherwise please report it with the model at https://ferscloud.com/support.` : message
86459
86471
  };
86460
86472
  }
86461
86473
  try {
@@ -1,46 +1,46 @@
1
- // Worker-thread host for the synchronous WASM solver.
2
- //
3
- // The engine's exports block for the entire duration of a solve — they are
4
- // synchronous by design (see src/lib/solver.ts). On the main thread that
5
- // freezes every other request in the process, /api/health included, because
6
- // production runs a single Node process behind PM2. Here it blocks only this
7
- // thread, so the site stays responsive while a large model is solving.
8
- //
9
- // Deliberately thin. It calls the named export and hands back the raw string;
10
- // the `include_report_html` rewrite and the response-envelope unwrapping stay
11
- // in src/lib/wasmSolver.ts so there is exactly one implementation of each and
12
- // no chance of the two drifting apart.
13
- //
14
- // Plain CommonJS on purpose: it is loaded by path at runtime, not bundled by
15
- // Next, so it must run as-is from the release directory.
16
- const { parentPort } = require("node:worker_threads");
17
-
18
- // Self-initialises the WASM binary at require() time — this is the expensive
19
- // part, which is why the pool reuses workers rather than spawning per solve.
20
- const wasm = require("@ferscloud/fers-calculation");
21
-
22
- parentPort.on("message", (msg) => {
23
- const { id, fn, args } = msg;
24
- try {
25
- if (typeof wasm[fn] !== "function") {
26
- parentPort.postMessage({
27
- id,
28
- ok: false,
29
- code: "unsupported",
30
- message: `This solver build does not export ${fn}().`,
31
- });
32
- return;
33
- }
34
- parentPort.postMessage({ id, ok: true, raw: wasm[fn](...args) });
35
- } catch (err) {
36
- parentPort.postMessage({
37
- id,
38
- ok: false,
39
- code: "solver_threw",
40
- message: err && err.message ? err.message : String(err),
41
- });
42
- }
43
- });
44
-
45
- // Tells the pool the WASM binary finished initialising.
46
- parentPort.postMessage({ ready: true });
1
+ // Worker-thread host for the synchronous WASM solver.
2
+ //
3
+ // The engine's exports block for the entire duration of a solve — they are
4
+ // synchronous by design (see src/lib/solver.ts). On the main thread that
5
+ // freezes every other request in the process, /api/health included, because
6
+ // production runs a single Node process behind PM2. Here it blocks only this
7
+ // thread, so the site stays responsive while a large model is solving.
8
+ //
9
+ // Deliberately thin. It calls the named export and hands back the raw string;
10
+ // the `include_report_html` rewrite and the response-envelope unwrapping stay
11
+ // in src/lib/wasmSolver.ts so there is exactly one implementation of each and
12
+ // no chance of the two drifting apart.
13
+ //
14
+ // Plain CommonJS on purpose: it is loaded by path at runtime, not bundled by
15
+ // Next, so it must run as-is from the release directory.
16
+ const { parentPort } = require("node:worker_threads");
17
+
18
+ // Self-initialises the WASM binary at require() time — this is the expensive
19
+ // part, which is why the pool reuses workers rather than spawning per solve.
20
+ const wasm = require("@ferscloud/fers-calculation");
21
+
22
+ parentPort.on("message", (msg) => {
23
+ const { id, fn, args } = msg;
24
+ try {
25
+ if (typeof wasm[fn] !== "function") {
26
+ parentPort.postMessage({
27
+ id,
28
+ ok: false,
29
+ code: "unsupported",
30
+ message: `This solver build does not export ${fn}().`,
31
+ });
32
+ return;
33
+ }
34
+ parentPort.postMessage({ id, ok: true, raw: wasm[fn](...args) });
35
+ } catch (err) {
36
+ parentPort.postMessage({
37
+ id,
38
+ ok: false,
39
+ code: "solver_threw",
40
+ message: err && err.message ? err.message : String(err),
41
+ });
42
+ }
43
+ });
44
+
45
+ // Tells the pool the WASM binary finished initialising.
46
+ parentPort.postMessage({ ready: true });
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "@ferscloud/fers-mcp",
3
- "version": "2.1.0",
4
- "description": "FERS structural finite-element tools for MCP clients (Claude Desktop, Claude Code, Cursor, VS Code, Codex, ChatGPT desktop), solving on your own machine.",
5
- "mcpName": "com.ferscloud/fers",
6
- "license": "SEE LICENSE IN LICENSE",
7
- "homepage": "https://ferscloud.com/mcp#local",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/Jeroen124/FERS_core"
11
- },
12
- "keywords": [
13
- "mcp",
14
- "model-context-protocol",
15
- "structural-engineering",
16
- "finite-element",
17
- "eurocode",
18
- "fem"
19
- ],
20
- "bin": {
21
- "fers-mcp": "dist/fers-mcp.cjs"
22
- },
23
- "main": "dist/fers-mcp.cjs",
24
- "files": [
25
- "dist",
26
- "README.md",
27
- "LICENSE"
28
- ],
29
- "engines": {
30
- "node": ">=18"
31
- },
32
- "dependencies": {
33
- "@ferscloud/fers-calculation": "0.2.73"
34
- }
35
- }
1
+ {
2
+ "name": "@ferscloud/fers-mcp",
3
+ "version": "2.76.0",
4
+ "description": "FERS structural finite-element tools for MCP clients (Claude Desktop, Claude Code, Cursor, VS Code, Codex, ChatGPT desktop), solving on your own machine.",
5
+ "mcpName": "com.ferscloud/fers",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "homepage": "https://ferscloud.com/mcp#local",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/Jeroen124/FERS_core"
11
+ },
12
+ "keywords": [
13
+ "mcp",
14
+ "model-context-protocol",
15
+ "structural-engineering",
16
+ "finite-element",
17
+ "eurocode",
18
+ "fem"
19
+ ],
20
+ "bin": {
21
+ "fers-mcp": "dist/fers-mcp.cjs"
22
+ },
23
+ "main": "dist/fers-mcp.cjs",
24
+ "files": [
25
+ "dist",
26
+ "README.md",
27
+ "LICENSE"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "dependencies": {
33
+ "@ferscloud/fers-calculation": "0.2.76"
34
+ }
35
+ }