FEKO MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FEKO MCP Build a centre-fed dipole at 2.4 GHz, solve it, and export S11 referenced to 50 ohm."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FEKO MCP
Control CADFEKO → FEKO solver → POSTFEKO from an MCP-compatible AI client. This local stdio server runs Lua API scripts, launches asynchronous jobs, reads progress, and exports S11, impedance, Touchstone, model files, and images.
Tested with Windows, Altair FEKO 2026.1, Python 3.11+. Other FEKO versions and operating systems have not been validated. You need your own FEKO installation and suitable licence; neither is included. This is an independent community integration, not an official Altair product.
Install
git clone https://github.com/Zircon04/feko-mcp.git
cd feko-mcp
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install .
$env:FEKO_HOME = 'C:\Program Files\Altair\2026.1'
$env:FEKO_MCP_WORKSPACE = "$PWD\jobs"
.\.venv\Scripts\feko-mcp.exe doctorSet paths to your installation and a writable job directory. FEKO_HOME
accepts the release root containing feko/bin, or the feko directory itself.
If the programs are on PATH, the installation can be discovered. The example
path may differ on your computer. doctor checks program paths; FEKO checks
licence availability when a job runs.
Related MCP server: FEFLOW MCP Server
Connect an AI client
Start the stdio server with feko-mcp, or python -m feko_mcp. Use absolute
paths in the client. Shell environment variables are not automatically inherited
by an already-running desktop app: put them in the MCP configuration.
For Codex, add to config.toml, replacing paths:
[mcp_servers.feko]
command = 'C:\path\to\feko-mcp\.venv\Scripts\python.exe'
args = ['-m', 'feko_mcp']
startup_timeout_sec = 20
[mcp_servers.feko.env]
FEKO_HOME = 'C:\Program Files\Altair\2026.1'
FEKO_MCP_WORKSPACE = 'C:\path\to\feko-jobs'Restart the MCP connection after saving. See OpenAI's MCP configuration
documentation. Clients using
mcpServers JSON can use mcp-config.example.json.
This server needs no OpenAI API key.
Tools and workflow
Tool | Purpose |
| Check programs, workspace, and example assumptions |
| Read/search installed CADFEKO/POSTFEKO Lua API documentation |
| Run a Lua build with optional text assets in a new job |
| Build the included antenna with parameter overrides |
| Start a solver job and return immediately |
| Read stage state and log tails |
| Run custom POSTFEKO Lua or the supplied exporter |
| List output paths and sizes |
| Read exported tables, notes, or diagnostics |
Check get_environment; build a model; poll until build completes; call
start_solver; wait for solve; call run_post_script; read the exports.
Keep the returned job_id. Use the filename produced by your build script.
Process startup does not mean calculation success: check stage state, exit
code, and FEKO diagnostics. job_id="example" reads the bundled model notes,
not precomputed results. Build a new job to obtain results.
Before starting a subsequent stage, poll get_job_status until
ready_for_next_stage is true. This requires at least one recorded stage,
all recorded stages to be terminal (completed or failed), and no stage
lock. Readiness means cleanup has finished, not that computation succeeded:
check the stage state and report failures before continuing. Readiness is a
snapshot, not a reservation; another client can start a stage before you do.
Use a bounded polling timeout appropriate to your simulation.
Sample prompt:
Use the FEKO tools to build a centre-fed dipole at 2.4 GHz. Read the installed API first, solve on one core, check status, and export S11 referenced to 50 ohm. Report solver errors and output paths.
Jobs live in <workspace>/jobs/<job_id>. Workers continue after MCP requests
return. There is no built-in cancellation: inspect worker status/PID before
managing a process manually. No network listener is opened. Lua runs with the
local user's permissions: use trusted scripts and clients; this is not a
sandbox for untrusted code.
Example without an AI client
.\.venv\Scripts\feko-mcp.exe example build --smoke
.\.venv\Scripts\feko-mcp.exe example solve --smoke --cores 1
.\.venv\Scripts\feko-mcp.exe example post --smokeThe smoke example runs at 2.4 GHz. Omit --smoke from all three commands
for 1–10 GHz. Outputs live in <workspace>/example. Edit its parameters.lua
before rebuilding to change geometry or frequency sampling.
The antenna is a preliminary reconstruction with assumptions, not a validated design. Read the model notes. Source PDFs, figures, calculated result binaries, and vendor files are omitted.
Configuration
Variable | Default / meaning |
| Installation release root; otherwise discover via PATH |
| Optional directory containing all three executables |
|
|
| Optional path to the local documentation |
| CPU count; set lower for licence/resource limits |
read_api accepts e.g. application="cadfeko",
relative_path="object/rectangle.htm". It reads local docs, not the internet.
If CADFEKO reports that it cannot open its user settings, check the client's
execution permissions: FEKO also needs access to its own configuration and
licensing files outside the job directory. A missing documentation directory
can be configured separately with FEKO_MCP_API_DOCS.
Development and verification
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m unittest discover -s tests -v
# Requires FEKO and a licence; runs a small native dipole:
.\.venv\Scripts\python.exe -m feko_mcp.verify_native
# Long-running simulations: disable the total stage deadline, retaining request bounds:
.\.venv\Scripts\python.exe -m feko_mcp.verify_native --stage-timeout 0 --request-timeout 30The native verifier defaults to a 120-second total deadline per stage and
a separate 30-second timeout per status request. Use --stage-timeout SECONDS
to increase the stage limit, or --stage-timeout 0 to disable it. The total
deadline includes requests and polling sleeps; the earlier deadline wins.
--request-timeout SECONDS must be positive and remains active with the stage
deadline disabled. A responsive stage can then run indefinitely, including if
it is stuck. Failed stages still stop verification immediately.
Either timeout fails verification and closes its MCP stdio client. On Windows, MCP SDK shutdown may terminate the server's worker process tree, including an active FEKO simulation. A timeout does not safely preserve a running job. The verifier adds no cancellation or worker ownership changes. Its request timeout bounds the awaited status call; it does not guarantee that server-side work stops, that transport shutdown is instantaneous, or that workers survive. Choose the stage limit before starting a long run. Native process survival on timeout has not been verified.
CI checks configuration, input validation, worker outcomes, and stdio tools without FEKO. It does not verify electromagnetic accuracy. Native verification is opt-in and creates a new job. Report FEKO/Python/OS versions and a minimal script in issues. See CONTRIBUTING.md.
MIT licence covers the bridge code. Altair software and third-party source material retain their own licences and are not redistributed.
Available Tools
9 toolscreate_preliminary_modelC
Build a fresh parameterised copy of the antenna example. Overrides are in mm/Hz and SI material units.
Inputs: parameters.
get_artifactsC
List model, result, table and preview files produced by the job.
Inputs: job_id.
get_environmentC
Locate FEKO components, the supplied model and its documented assumptions.
Inputs: no named parameters.
get_job_statusB
Read persistent stage status and recent FEKO diagnostics without blocking a long solve.
Inputs: job_id (required).
read_apiC
Read installed CADFEKO/POSTFEKO 2026.1 API, e.g. application=cadfeko, relative_path=object/rectangle.htm.
Inputs: application (required), relative_path (required), search_term. Returns: result
read_result_textC
Read exported CSV, Touchstone, notes or diagnostics for analysis in the assistant.
Inputs: job_id (required), filename (required), max_chars. Returns: result
run_cad_scriptB
Run CADFEKO Lua asynchronously in a new job directory; provide Lua/text assets by filename.
Inputs: script_text (required), assets.
run_post_scriptB
Run POSTFEKO Lua in a solved job. An empty script uses the tested S11/impedance exporter.
Inputs: job_id (required), model_base, script_text.
start_solverA
Start FEKO in a completed CAD job. Return immediately, then poll get_job_status.
Inputs: job_id (required), cores, model_filename.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool maps to a distinct stage of the FEKO workflow (environment, CAD scripting, model creation, solving, status, artifacts, results, API docs). The only mild overlap is between create_preliminary_model and run_cad_script, both of which produce CAD models, but their descriptions draw a clear line between a canned parameterised example and arbitrary Lua execution.
All nine tools follow a clean verb_noun convention (get_environment, run_cad_script, create_preliminary_model, start_solver, get_job_status, read_result_text, etc.). No mixing of camelCase or vague verb styles.
Nine tools is well-scoped for a simulation pipeline covering discovery, model building, solve, monitoring, and result extraction. Each tool earns its place with no filler.
The surface covers the full lifecycle from environment discovery to reading results and API reference, with polling-based status for async solves. Minor gaps like job cancellation/cleanup or solver configuration tweaking exist but are workaroundable via Lua scripts.
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Global CAD/BIM, industrial engineering (FEM, CFD) and property tools via one MCP endpoint.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to control Ansys Electronics Desktop (HFSS, Maxwell, Q3D, etc.) using MCP tools for simulation automation.10063PolyForm Noncommercial 1.0.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control FEFLOW 7.5 groundwater simulation software through MCP, supporting model loading, mesh operations, parameter management, and result export.-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Codex to control Ansys Workbench and ICEM CFD locally, executing scripts, managing projects, and running simulations.1MIT
- AlicenseBqualityCmaintenanceEnables an MCP-compatible AI client to control CADFEKO, the FEKO solver, and POSTFEKO by running Lua API scripts, launching asynchronous jobs, tracking progress, and exporting S11, impedance, Touchstone, model files, and images.9MIT