Multisim Circuit Workflow
Use the multisim MCP tools in this order. Do not skip pre-validation.
0. Verify the installation
When the installed CLI is accessible, start with:
Get-Command multisim-mcp
multisim-mcp --json doctor
Read full_workflow_ready and each stable checks[].id. Apply the provided
repair instructions instead of repeatedly attempting COM activation. Use
doctor --json --strict only in CI or when a non-zero incomplete-setup status
is useful. Run doctor --json --connect only when the user wants a real COM
and license probe; it may start Multisim.
Preview client configuration when requested:
multisim-mcp config --client claude-desktop --python C:\Python32\python.exe
multisim-mcp config --client codex --python C:\Python32\python.exe
multisim-mcp config --client generic --python C:\Python32\python.exe
Do not write over a live client configuration. Generate a fragment, inspect it,
and merge it manually. Keep the MCP server local over stdio.
After the client connects, call runtime_status before the first experiment on
a new installation. Prefer
the high-level run_circuit_experiment tool whenever the requested schematic
uses its supported component subset; it keeps the generated design, Multisim
simulation, exported data, plot, and report tied to one source netlist.
For a new design, use the planning gate before writing a netlist: call
plan_design_options, wait for the user's plan_id/option_id choice, then
call select_design_option, prepare_design_specification, and (after the
specification approval) prepare_netlist_draft. Resolve candidate families
with resolve_component_requirements; once concrete ratings and model
provenance have been reviewed, call approve_component_resolution. That
approval only authorizes a later compiler and never by itself creates SPICE,
files, a schematic, or a simulation.
For the bounded signal-passive template, call compile_executable_netlist next and
show its pin-level CircuitDesign, calculated values, and SPICE preview. Before any
schematic or experiment stage, call approve_executable_netlist with explicit
component/topology/value/SPICE confirmations. This approval only authorizes schematic
planning; it does not authorize file writes, stimuli, analysis commands, or simulation.
To generate the approved schematic, pass the complete compiler response as
executable_netlist, the approval artifact as netlist_approval, and the preview's exact
spice_netlist as netlist to create_schematic_from_netlist; it revalidates the handoff and
rejects changed SPICE text.
Then call approve_simulation_plan with the same preview and netlist approval plus the reviewed
ExperimentSpec (safe commands, measurements, and limits). Pass all three artifacts to
run_verified_circuit_experiment; it revalidates the netlist, commands, and measurement contract
before creating the schematic or starting Multisim.
When the workbench handoff JSON is available, multisim-mcp execute-handoff --handoff <file> --root <project> --json provides a validation-only path; after explicit user confirmation,
add --confirm to execute schematic generation followed by the verified experiment. It rejects
root escapes, mismatched approvals, and existing artifacts by default.
For a long-running handoff, use --submit --confirm after validation; the CLI creates the
approved schematic first and then queues the verified experiment for the durable worker.
For a durable long-running job, pass the same three artifacts and reviewed requirements to
submit_circuit_experiment; the isolated worker persists and revalidates them before execution.
After an approved run, verify the resulting directory.manifest.json through
inspect-project. The manifest should contain only the sanitized approval_provenance
identity, and a workbench result refresh should match its path, integrity, and approval/netlist/
compiled/spec digests before treating it as the current run. Legacy or direct experiments without
that identity remain evidence-only.
1. Clarify the design
Collect from the user:
- Circuit function and constraints (input, output, supply, frequency).
- Component set and tolerance requirements.
- Required analyses: DC operating point, AC sweep, transient, or all.
- Report format and whether schematic image, netlist, BOM, or CSV data are needed.
2. Build and validate the netlist
- Write a SPICE netlist as the source of truth.
- Pre-validate with
ngspice when available before touching Multisim.
- Keep node names simple and unique:
vin, vout, vdd, vb, 0 work, while reserved words such as in/out can fail in the command engine.
3. Create or edit the design
Preferred paths, in order:
- Start from a known-good template
.ms14 and edit its decoded XML.
- Use
decode_ms14 to get XML, edit component values carefully (RLC values require updating both the numeric parameter and display string).
- Use
encode_ms14 to re-encode.
- Use
open_circuit to load the result.
Do not try to rename RefDes by editing display text; Multisim renumbers on open.
Netlist-driven alternative
When building a circuit from scratch, run_spice_netlist is the fastest path:
- Pass a SPICE netlist plus Nutmeg commands such as
dc VIN 0 10 0.1 or tran 1u 2m.
- Multisim's command engine needs a space-free directory; the tool creates one automatically under
MULTISIM_MCP_WORKDIR (default C:\msre_exp).
- The tool appends
write <raw-path> without a variable list; write path v(out) can fail with No such vector.
- It waits for the engine to go idle, parses the SPICE3 raw file, and returns
columns, n_points, sampled rows, and a CSV path.
- Use
output_dir to copy circuit.cir, run.log, result.raw, and data.csv into the workspace.
- Only use the safe
op, dc, ac, or tran command subset. Never request
unrestricted command mode unless the user explicitly asks for trusted local
security research and the server operator enabled it.
High-level generated experiment
For supported RLC, independent sources, diode, BJT, MOSFET, and op-amp circuits:
- Call
run_circuit_experiment with the validated netlist, analysis command,
output directory, and report title.
- Treat the returned
.ms14, schematic PNG, raw, CSV, SVG, and Markdown as one
experiment bundle.
- Verify
success, n_points, and expected numeric relationships before
reporting completion.
- Generated schematic probes are experimental; use command-engine CSV/raw data
as the authoritative experiment result.
4. Run simulations
- Call
connect, then open_circuit.
connect is idempotent; call it at the start of the workflow even if another step already connected.
- Call
enum_outputs and enum_inputs to discover valid names.
- Use
run_dc_operating_point, run_ac_sweep, run_ac_single_frequency, or run_transient.
- Use
run_spice_netlist when the design is netlist-only or a schematic does not exist yet; call connect (and new_circuit if needed) first.
- If a waveform input is required, use
set_input_data_sampled or set_input_data_raw before the transient.
- If a tool reports not ready, call
stop_simulation, check circuit_info, and retry once.
5. Analyze data
Returned data shape depends on the analysis:
- DC: two rows
(value,).
- AC: three rows
(frequency, real, imag).
- Transient: two rows
(time, real).
Compute mean, min, max, rise/fall, bandwidth, gain, or FFT as required. Keep the raw data in a file when the user asks for a report.
run_spice_netlist returns its own parsed columns and CSV; use those directly when the schematic-level analysis tools are not applicable.
When a concrete reversible DesignPatch has already been proposed, prefer
evaluate_design_patch over an informal rerun. It evaluates the unchanged
baseline and exactly one in-memory candidate under the same hard requirements,
retains before/after diagnoses and the inverse patch, and never applies the
candidate automatically. Treat adoption_eligible as evidence for a separate
approval step, not as permission to overwrite the design.
6. Produce the report
- Export
get_circuit_image, report_netlist, and report_bom.
- Use
generate_report with the analysis dicts returned by run_dc_operating_point, run_ac_sweep, and run_transient to write a Markdown report with circuit info, exports, and measured tables.
- For
run_spice_netlist, write the report from the returned CSV/rows and include the netlist, analysis commands, measured tables, and plots.
- Write a Markdown or CSV report with circuit description, component table, simulation setup, measured values, plots, and conclusions.
- Cite measured data and flag anything that was estimated or not verified.
- Enumeration tools return structured dicts such as
{"outputs": [...]}; read the list from the outputs/inputs/components key.
Safety
- Always stop simulations before changing inputs or saving.
- Prefer a working directory for outputs; never overwrite the user's source design without
save_circuit to a new path.
- Do not set
unsafe_commands or invoke do_command_line in ordinary circuit
workflows. Those capabilities are disabled by default for prompt-injection
resistance.
- This project is unofficial and not affiliated with NI.
1---2name: multisim-circuit-workflow3description: Diagnose, configure, generate, simulate, and report on NI Multisim circuits through the Multisim MCP server. Use when the user asks to install or configure Multisim MCP, generate a Multisim schematic, run circuit simulation, analyze waveforms, or produce an electronic design report.4---56# Multisim Circuit Workflow78Use the `multisim` MCP tools in this order. Do not skip pre-validation.910## 0. Verify the installation1112When the installed CLI is accessible, start with:1314```powershell15Get-Command multisim-mcp16multisim-mcp --json doctor17```1819Read `full_workflow_ready` and each stable `checks[].id`. Apply the provided20`repair` instructions instead of repeatedly attempting COM activation. Use21`doctor --json --strict` only in CI or when a non-zero incomplete-setup status22is useful. Run `doctor --json --connect` only when the user wants a real COM23and license probe; it may start Multisim.2425Preview client configuration when requested:2627```powershell28multisim-mcp config --client claude-desktop --python C:\Python32\python.exe29multisim-mcp config --client codex --python C:\Python32\python.exe30multisim-mcp config --client generic --python C:\Python32\python.exe31```3233Do not write over a live client configuration. Generate a fragment, inspect it,34and merge it manually. Keep the MCP server local over stdio.3536After the client connects, call `runtime_status` before the first experiment on37a new installation. Prefer38the high-level `run_circuit_experiment` tool whenever the requested schematic39uses its supported component subset; it keeps the generated design, Multisim40simulation, exported data, plot, and report tied to one source netlist.4142For a new design, use the planning gate before writing a netlist: call43`plan_design_options`, wait for the user's `plan_id`/`option_id` choice, then44call `select_design_option`, `prepare_design_specification`, and (after the45specification approval) `prepare_netlist_draft`. Resolve candidate families46with `resolve_component_requirements`; once concrete ratings and model47provenance have been reviewed, call `approve_component_resolution`. That48approval only authorizes a later compiler and never by itself creates SPICE,49files, a schematic, or a simulation.5051For the bounded `signal-passive` template, call `compile_executable_netlist` next and52show its pin-level `CircuitDesign`, calculated values, and SPICE preview. Before any53schematic or experiment stage, call `approve_executable_netlist` with explicit54component/topology/value/SPICE confirmations. This approval only authorizes schematic55planning; it does not authorize file writes, stimuli, analysis commands, or simulation.56To generate the approved schematic, pass the complete compiler response as57`executable_netlist`, the approval artifact as `netlist_approval`, and the preview's exact58`spice_netlist` as `netlist` to `create_schematic_from_netlist`; it revalidates the handoff and59rejects changed SPICE text.60Then call `approve_simulation_plan` with the same preview and netlist approval plus the reviewed61`ExperimentSpec` (safe commands, measurements, and limits). Pass all three artifacts to62`run_verified_circuit_experiment`; it revalidates the netlist, commands, and measurement contract63before creating the schematic or starting Multisim.64When the workbench handoff JSON is available, `multisim-mcp execute-handoff --handoff <file>65--root <project> --json` provides a validation-only path; after explicit user confirmation,66add `--confirm` to execute schematic generation followed by the verified experiment. It rejects67root escapes, mismatched approvals, and existing artifacts by default.68For a long-running handoff, use `--submit --confirm` after validation; the CLI creates the69approved schematic first and then queues the verified experiment for the durable worker.70For a durable long-running job, pass the same three artifacts and reviewed requirements to71`submit_circuit_experiment`; the isolated worker persists and revalidates them before execution.72After an approved run, verify the resulting `directory.manifest.json` through73`inspect-project`. The manifest should contain only the sanitized `approval_provenance`74identity, and a workbench result refresh should match its path, integrity, and approval/netlist/75compiled/spec digests before treating it as the current run. Legacy or direct experiments without76that identity remain evidence-only.7778## 1. Clarify the design7980Collect from the user:8182- Circuit function and constraints (input, output, supply, frequency).83- Component set and tolerance requirements.84- Required analyses: DC operating point, AC sweep, transient, or all.85- Report format and whether schematic image, netlist, BOM, or CSV data are needed.8687## 2. Build and validate the netlist8889- Write a SPICE netlist as the source of truth.90- Pre-validate with `ngspice` when available before touching Multisim.91- Keep node names simple and unique: `vin`, `vout`, `vdd`, `vb`, `0` work, while reserved words such as `in`/`out` can fail in the command engine.9293## 3. Create or edit the design9495Preferred paths, in order:96971. Start from a known-good template `.ms14` and edit its decoded XML.982. Use `decode_ms14` to get XML, edit component values carefully (RLC values require updating both the numeric parameter and display string).993. Use `encode_ms14` to re-encode.1004. Use `open_circuit` to load the result.101102Do not try to rename RefDes by editing display text; Multisim renumbers on open.103104### Netlist-driven alternative105106When building a circuit from scratch, `run_spice_netlist` is the fastest path:107108- Pass a SPICE netlist plus Nutmeg commands such as `dc VIN 0 10 0.1` or `tran 1u 2m`.109- Multisim's command engine needs a space-free directory; the tool creates one automatically under `MULTISIM_MCP_WORKDIR` (default `C:\msre_exp`).110- The tool appends `write <raw-path>` without a variable list; `write path v(out)` can fail with `No such vector`.111- It waits for the engine to go idle, parses the SPICE3 raw file, and returns `columns`, `n_points`, sampled `rows`, and a CSV path.112- Use `output_dir` to copy `circuit.cir`, `run.log`, `result.raw`, and `data.csv` into the workspace.113- Only use the safe `op`, `dc`, `ac`, or `tran` command subset. Never request114 unrestricted command mode unless the user explicitly asks for trusted local115 security research and the server operator enabled it.116117### High-level generated experiment118119For supported RLC, independent sources, diode, BJT, MOSFET, and op-amp circuits:1201211. Call `run_circuit_experiment` with the validated netlist, analysis command,122 output directory, and report title.1232. Treat the returned `.ms14`, schematic PNG, raw, CSV, SVG, and Markdown as one124 experiment bundle.1253. Verify `success`, `n_points`, and expected numeric relationships before126 reporting completion.1274. Generated schematic probes are experimental; use command-engine CSV/raw data128 as the authoritative experiment result.129130## 4. Run simulations131132- Call `connect`, then `open_circuit`.133- `connect` is idempotent; call it at the start of the workflow even if another step already connected.134- Call `enum_outputs` and `enum_inputs` to discover valid names.135- Use `run_dc_operating_point`, `run_ac_sweep`, `run_ac_single_frequency`, or `run_transient`.136- Use `run_spice_netlist` when the design is netlist-only or a schematic does not exist yet; call `connect` (and `new_circuit` if needed) first.137- If a waveform input is required, use `set_input_data_sampled` or `set_input_data_raw` before the transient.138- If a tool reports not ready, call `stop_simulation`, check `circuit_info`, and retry once.139140## 5. Analyze data141142Returned data shape depends on the analysis:143144- DC: two rows `(value,)`.145- AC: three rows `(frequency, real, imag)`.146- Transient: two rows `(time, real)`.147148Compute mean, min, max, rise/fall, bandwidth, gain, or FFT as required. Keep the raw data in a file when the user asks for a report.149`run_spice_netlist` returns its own parsed columns and CSV; use those directly when the schematic-level analysis tools are not applicable.150151When a concrete reversible `DesignPatch` has already been proposed, prefer152`evaluate_design_patch` over an informal rerun. It evaluates the unchanged153baseline and exactly one in-memory candidate under the same hard requirements,154retains before/after diagnoses and the inverse patch, and never applies the155candidate automatically. Treat `adoption_eligible` as evidence for a separate156approval step, not as permission to overwrite the design.157158## 6. Produce the report159160- Export `get_circuit_image`, `report_netlist`, and `report_bom`.161- Use `generate_report` with the analysis dicts returned by `run_dc_operating_point`, `run_ac_sweep`, and `run_transient` to write a Markdown report with circuit info, exports, and measured tables.162- For `run_spice_netlist`, write the report from the returned CSV/rows and include the netlist, analysis commands, measured tables, and plots.163- Write a Markdown or CSV report with circuit description, component table, simulation setup, measured values, plots, and conclusions.164- Cite measured data and flag anything that was estimated or not verified.165- Enumeration tools return structured dicts such as `{"outputs": [...]}`; read the list from the `outputs`/`inputs`/`components` key.166167## Safety168169- Always stop simulations before changing inputs or saving.170- Prefer a working directory for outputs; never overwrite the user's source design without `save_circuit` to a new path.171- Do not set `unsafe_commands` or invoke `do_command_line` in ordinary circuit172 workflows. Those capabilities are disabled by default for prompt-injection173 resistance.174- This project is unofficial and not affiliated with NI.