5. Let an AI assistant build and run it (MCP)
Hertzon includes an MCP server, a standard interface through which AI assistants use programs. With it, Claude Code, the Claude desktop app, Codex or VS Code (Copilot agent mode) can build every model of this tutorial for you, run it and read the results. They can also explain them and change the design until a goal is met.
5.1 Set it up once
- Tools > AI Assistants (MCP)...
- Press Register next to your assistant:
| Assistant | Where Hertzon is registered |
|---|---|
| Claude Code | ~/.claude.json |
| Claude desktop app | claude_desktop_config.json |
| Codex | ~/.codex/config.toml |
| VS Code | the user mcp.json |
Without the GUI: python -m hertzon.mcp --install claude (or desktop, codex, vscode, all).
python -m hertzon.mcp --config prints the settings for any other MCP client.
3. Tick Let AI assistants work in this window. Everything the assistant does then happens in your
open window: you see objects appear, Ctrl+Z undoes them, and its analyses run in the normal
solve queue with the normal progress display. Without the live link the assistant works on .hzn
files and solves in the background.
4. Start a new session of your assistant so it loads the Hertzon server.
Tools > AI Assistants (MCP)...: the live link checkbox and one Register button per assistant.
5.2 Ask for a simulation
Write what you want in plain language. Some examples matching this tutorial:
- "Create a WR-90 waveguide, 50 mm long, with a PEC post of radius 1.5 mm in the middle, wave ports on both ends, and sweep 8-12 GHz. Plot S11 and S21."
- "Build a 50 Ω PTFE coax, 20 mm long, with wave ports, and check that S11 is below −30 dB from 1 to 10 GHz."
- "Draw a half-wave dipole for 1 GHz with a lumped port, solve it and give me the input impedance at resonance and the peak gain. Then shorten it until S11 at 1 GHz is below −20 dB."
- "Compute the monostatic RCS of a 100 mm PEC sphere at 1 GHz and compare it with the Mie series."
- "Open examples/PatchAntenna.hzn, explain what the model does, and render a picture of it."
The assistant works step by step with the same building blocks you used above, and tells you what it did.
5.3 What the assistant can do
| Area | Tools |
|---|---|
| Projects | create_project, open_project, get_project, save_project, get_context |
| Settings and materials | set_design (units, variables, solution type, Auto Open), list_materials, add_material, get_schema |
| Geometry | add_object, import_geometry, modify_object, add_operation (subtract, unite, ...), duplicate (along a line, around an axis, mirror), apply_history (many edits in one call, all or nothing), delete, get_geometry (faces with index, centre, normal; edges and vertices for Fillet/Chamfer), set_coordinate_system |
| Boundaries and ports | assign, modify_assignment (boundaries, wave/lumped ports, plane waves, mesh operations) |
| Analysis | set_setup, set_sweep, set_far_field_sphere, validate, run_simulation, get_status, abort_simulation |
| Results | get_results (S-parameters, impedances, gain, RCS, convergence, the modes of every wave port with label, beta and Zo), evaluate_fields (Fields Calculator values on the saved fields: Poynting flux through a sheet, face, cut plane or closed surface, integrals, maxima, point values), get_power_budget (per port accepted, reflected, transmitted, radiated and lost power, and the losses per object and material), set_sources (Edit Sources: power and phase per port for the field plots, far fields and reports, no new solve), show_result (a report, a field plot, the 3D view or the convergence table as a picture drawn by Hertzon, as shown in the window), render_image (a picture of the model), set_report (open=true shows it in the window), set_field_plot, set_equation (Fields Calculator) |
| Parametric and optimization | set_parametric, set_optimization (Conjugate Gradient, Latin Hypercube + Nelder-Mead, Derivative Trust Region or Space Mapping), run and read with run_simulation, get_status, get_results; apply_optimization takes the best result over into the design |
| Derivative tuning | compute_tuning (tuning model of up to 6 variables on the solved mesh), get_tuning (S-parameters at other variable values without solving) |
| Design assistants | list_structures and create_structure (Tools > Design Wizard), create_patch_antenna, create_hairpin_filter, create_hairpin_diplexer (the designers of the rectangular patch, hairpin filter and hairpin diplexer in the Design Wizard): complete designs with setup, sweep and optimization |
| Circuits | create_circuit, get_circuit, edit_circuit (parts, wires, 3D design and Touchstone blocks), run_simulation / get_results / render_image on the schematic, circuit_layout (3D layout, update, back to the schematic), import_3d_designs, board (placement, Connect, Match Phase) |
| Connectors | list_edge_connectors (SMA, 2.92 mm, 2.4 mm library), attach_edge_connector (a connector with its launch footprint at a lumped port at the board edge), set_connector_mode (Ideal, Transition, 3D; flatten, remove, optimize_launch, apply_footprint), get_connectors |
| Files and boards | export (Touchstone, STEP, Gerber, EMerge script), import_pcb (Gerber, Excellon, job files), set_stackup, manage_design (copy, delete), list_examples, open_example |
| Where analyses run | cloud (this computer, the remote computer or a cloud server per window, also a server of its own per window so that several parts solve in parallel; server types with price per hour) |
| Scripting | run_python with the Hertzon model API, off by default because it runs any Python code; turn it on under Tools > AI Assistants (Allow Python scripts) |
| Feedback | report_issue (the text of an issue for the Hertzon developers and a link to the prefilled "New issue" page; nothing is sent until the user posts it) |
5.4 The Claude plugin (optional)
🧪 Experimental. The plugin and its skills are still experimental: how well a design turns out depends on the assistant, its model and the task, and an assistant can still miss a goal or stop early. Research into better results is ongoing, and the skills change with it.
The tools above let an assistant do every step; the Hertzon plugin for Claude Code tells it what Hertzon offers and what to check; the approach stays the assistant's own. It brings four skills, which Claude loads when they fit the request:
| Skill | What it adds |
|---|---|
hf-design-loop |
what Hertzon offers for a design: design assistants and tuning for simple structures, broad batched search for demanding ones, systems of many parts assembled on the board (board) with a serial and parallel cloud estimate (cloud), coarse setups, convergence reported to the user |
circuit-first |
multi-fidelity for planar circuits: design and optimize in the circuit first (Design Wizard or an own schematic, also for structures Hertzon does not know yet), then check and correct in full wave with a few 3D solves; systems of several parts; active circuits |
antenna-design |
open region, feeds, adaptive frequencies for several bands, far-field efficiency instead of S11 alone, typical tuning knobs |
results-check |
mesh convergence, ports, power balance, efficiency split, counter tests, confirmed cause versus hypothesis |
and two commands: /hertzon:design 2.45 GHz patch on 1.6 mm FR4, S11 below -15 dB designs from a specification,
/hertzon:verify checks the open design before you trust its numbers.
The plugin also adds a Hertzon pane beside the chat (Claude Code in the terminal, the desktop app and the
IDE extensions). Every picture Hertzon draws for the assistant appears there: a report, a field plot, the 3D
view or the convergence table, drawn by Hertzon exactly as in its window (show_result). The arrows page
through earlier pictures, /hertzon-results opens the pane, and while an analysis runs the line above the prompt
shows its adaptive pass, tetrahedra and Delta S. The pictures are kept in ~/.hertzon/shown.
It is installed together with the MCP server: Register next to Claude Code (5.1) also installs the plugin from
your Hertzon folder, so it matches your version of Hertzon and is updated with it. Hertzon needs the claude
command for that; otherwise it shows the line to type in Claude Code:
/plugin install hertzon --marketplace c8501024/hertzon
(On Claude Code older than 2.1.275: /plugin marketplace add c8501024/hertzon, then /plugin install hertzon@hertzon.)
Keep an eye on cloud servers. When a cloud account is set up in Hertzon, the assistant can start analyses
on cloud servers (cloud). The skills tell it to estimate the cost first and to start servers only when you agree,
but it may start them anyway. Watch the servers, their cost and running time in the status bar and with Check
Account (REMOTE.md). Without a cloud account everything runs on your computer.
Simulation results can be wrong, whether you or an assistant set the model up. Check them as described in the README's No warranty section.