Contents ↓

MKE-F / MCP usage guide

Run MKE-F from your AI assistant

Prepare planar truss and frame models, run static, modal or transient analyses, then open the files in MKE-F to inspect and edit them.

1. Connect

In an MCP-compatible client's settings, add a remote server named mkef. Select Streamable HTTP, use this URL, and choose no authentication:

https://mkef.mkefweb.com/mcp

No MKE-F account, API key or OAuth login is required. Enable the tools and ask the assistant to call get_capabilities. The URL is a protocol endpoint, not a normal browser page.

Large calculations also require client HTTP download, file saving and programmatic JSON processing. Before submitting such a calculation, the assistant must verify these capabilities and warn you if they are unavailable or unconfirmed. MCP support alone is insufficient. See working with large results.

Codex CLI example
codex mcp add mkef --url https://mkef.mkefweb.com/mcp
codex mcp list

If tools do not appear, reconnect the server or fully quit and reopen the client, including any tray process. See the official Codex connection example.

2. Try an example

Copy this prompt into your connected assistant:

Use MKE-F MCP to run the static example. First read the capabilities and input-format documentation, then get the example. Save its caseText as a UTF-8 TXT file. Submit it once, wait for a successful job and retrieve the result. Check displacements, reactions and equilibrium. Explain the units and give me the TXT model and result JSON so I can open them in MKE-F.

The built-in examples are static, modal, transient, sections, mpc and releases. Use consistent units; SI is recommended. MKE-F performs no unit conversion.

  1. Read get_capabilities, get_documentation with {"topic":"10-input-format"}, and get_example with {"name":"static"}.
  2. Pass a descriptive name and the returned caseText to submit_calculation. An accepted response (http_status: 202) contains data.id and a private data.cancelToken.
  3. Use the ID as job_id in get_job. Respect retry_after; otherwise wait 1, 2, 4, then 8 seconds, keeping 8-second intervals thereafter. Only status: succeeded means the calculation succeeded; inspect errors for any other terminal status.
  4. Call get_result and save the result before it expires. Responses contain http_status, retry_after and data.

3. Available tools

ToolPurpose
get_capabilitiesCurrent calculation and MCP limits.
list_examples / get_exampleFind and retrieve editable TXT examples.
list_documentation / get_documentationRead reference topics in English or Russian (language: en or ru). Whole-topic reads return heading IDs for optional section reads.
submit_calculationSubmit one TXT model for analysis.
get_job / get_resultCheck status and retrieve output using job_id.
cancel_jobCancel using job_id and cancel_token (the returned cancelToken). Keep the token private.

4. Save and open your files

Save data.caseText from the example, or your edited input, as UTF-8 .txt. In the preprocessor, choose Open TXT to inspect and edit it.

For data.delivery: inline, save only data.result as .json, not the full MCP response. Open that JSON in the postprocessor to inspect the results without recalculating.

Results exceeding the 64 KiB inline allowance return delivery: download and a download_url. Your client needs an HTTP download capability to save the complete JSON from that URL before expires_at. A client restricted to MCP tools cannot retrieve these larger files. MCP does not automatically save files on your computer.

Working with large results

Transient histories can contain values for many nodes, degrees of freedom (DOFs), elements and time steps; modal results can contain many mode shapes. Large static results also benefit from file processing. Finding the required values needs programmatic selection, not a full JSON dump into the assistant's context.

  1. Before submission: verify that the client can download results directly to a file and read and process that file in code. If it cannot, or this is unconfirmed, warn the user before calling submit_calculation and suggest a capable client. Do not silently reduce the model, mode count, duration or time resolution to fit delivery limits.
  2. Save the complete result: download JSON from download_url before expiry. For inline delivery, save data.result directly from code without printing large arrays when the client supports this. Verify that the file was written and parses as JSON. Preserve all exported data, identifiers, DOF mappings, units, time/frequency coordinates and diagnostics; retain job status/diagnostics separately if absent from the result JSON, and keep the editable TXT separately.
  3. Select in code: load the saved JSON and identify the requested node, DOF, element or mode using exported metadata. Use actual time coordinates rather than guessing array positions. State any nearest-sample selection or interpolation. Return only file paths, status, material diagnostics, available time coverage/sample count and requested values with units and identifiers.
  4. Reuse files: build plots, tables and exports from the saved JSON. Preserve the original and retain relevant extrema and events when downsampling for display. Do not rerun a calculation solely to change presentation.

The download fallback keeps large results out of the MCP response; the client must still save and process the file. Saving an inline payload after displaying it does not undo its context cost. Never hide errors or material warnings to save context.

5. Limits and troubleshooting

Browser and MCP calculations share the same queue, workers, storage and per-IP allowances, including storage reservations while a job runs. MCP adds no storage or retention. Cloud clients may share an outbound IP and its allowance.

Read the live get_capabilities response. Standard limits include a 1 MiB TXT input, 20 MiB result, two workers, eight active jobs and 300 seconds of result retention after completion. The separate MCP request limit is 8 MiB; it does not raise the TXT limit.

  • Busy (429): respect retry_after and slow down requests.
  • Failed calculation: read the job diagnostics and correct the input. Acceptance alone does not prove success.
  • Expired or missing job (404): saved TXT and JSON remain usable; expired server results cannot be recovered.
  • Submission connection lost: do not automatically resubmit. If you received an ID, check that job first; it may already be running.

Anyone with a job UUID can read its status and results; cancellation requires the private token. Keep tokens out of URLs and logs. Check model assumptions, units and numerical results before using them in engineering decisions.