Skip to main content
Glama

labview-mcp

Let an AI coding agent work in LabVIEW. labview-mcp is an open-source MCP server that lets Claude Code, Codex, Cursor and other agents read, create, edit, run and test NI LabVIEW VIs. You describe what you want in plain words, and the agent builds or changes the VI in your LabVIEW, runs it, and checks the result.

An agent builds a LabVIEW VI from one sentence, then runs it and operates its front panel

The VI in this clip was built with one vi_create call. Claude Code wrote the spec from the request shown. Then vi_run ran the VI, turned the limit down and clicked STOP. The clip was recorded on LabVIEW 2026 Community Edition.

Why

LabVIEW code is a binary, graphical format, so a text-based coding agent can't open a .vi file. labview-mcp is the agent's eyes and hands: it drives your installed LabVIEW over its ActiveX server and gives the agent text, pictures and values it can work with.

Related MCP server: SW_MCP

What you can ask for

You say

The agent uses

"What does this VI do? Which subVIs call it?"

vi_text, vi_snapshot (every hidden case frame too), vi_dump, vi_hierarchy

"Make a VI that averages these readings and lights an LED above a limit."

vi_create: controls, loops, case and event structures, shift registers, Property/Invoke Nodes, UI styles

"Change the constant 5 to 10 and log the value inside the loop."

vi_edit: edits in place, with a backup, and reverts if the VI breaks

"Run it with these inputs, click Start, and check the outputs."

vi_run, vi_test; vi_diff shows what an edit changed

"Put these VIs in a project and build an EXE."

project_create, project_add, project_build

Quick start

Requirements: Windows, LabVIEW 2015 or later (the free Community Edition works) with Tools ▸ Options ▸ VI Server ▸ ActiveX enabled, and Python 3.10 or later.

pip install git+https://github.com/shlim-t/labview-mcp
claude mcp add labview -s user -- python -m labview_mcp

Then ask your agent for something, such as "show me the block diagram of C:\path\to\My.vi". Other MCP clients run the same command, python -m labview_mcp, over stdio.

How well it works

  • Reading works on any VI, including broken ones. All 964 example VIs that ship with LabVIEW can be read.

  • Creating: as a stress test, every shipped example is converted to a vi_create spec and rebuilt. 262 of 964 come back identical to NI's original, and 64 more are rebuilt with differences. These are often large, advanced examples (Actor Framework and so on). Typical requests from users are smaller.

  • Not yet: hardware I/O (DAQmx, VISA instruments), Flat Sequence and In Place structures, user events, and wrapping existing code in a new structure. Testing so far covers only LabVIEW 2026 (English). Reports from other versions are very welcome.

Not affiliated with or endorsed by NI (Emerson). LabVIEW is a trademark of National Instruments Corp. This is a personal open-source project.

Status: v0.40.1. Reading and running work on any VI. Creating VIs supports controls, constants, functions, subVIs, For/While loops, shift registers (also stacked), and case structures, nested to any depth, and user interfaces: front-panel styles (buttons, LEDs, knobs, gauges, charts), event structures (control and VI events, Timeout, event data), and Property and Invoke Nodes. Any existing VI can be read as a graph (vi_dump) and changed in place (vi_edit: remove, replace, and add code, including inside existing loops and case frames). Projects and builds: the agent can put VIs in a project, add application (EXE), packed-library, and source-distribution build specs, build them, and mass compile folders.

What the agent can do

Tool

What it returns

lv_status

LabVIEW version and install directory. Starts LabVIEW if it isn't running.

vi_info

VI type, description, the LabVIEW version it was saved in, broken/idle state, unsaved changes, subVIs. For a broken VI, LabVIEW's error list: each error with LabVIEW's explanation ("Add: Contains unwired or bad terminal", "You have connected two terminals of different types", with the source and sink types).

vi_text

LabVIEW's own string export: front-panel controls (nested for clusters), descriptions, and block-diagram labels and comments. Case structures are exported one block per case, including hidden cases.

vi_snapshot

PNG images of the block diagram, front panel, or connector pane. all_frames=true renders every hidden case, sequence, and event frame.

vi_hierarchy

The subVI call tree. vi.lib, user.lib, and instr.lib are hidden by default.

vi_run

Sets inputs, runs the VI, and returns all front-panel values. While the VI runs, it can operate the front panel as a user would: click buttons, change values, and read indicators. A UI VI can therefore be tested end to end. It stops VIs that don't finish within the time limit.

vi_test

Tests a VI against many input sets at once and returns a pass/fail table: numbers within a tolerance, arrays and clusters element by element, and for each failure the expected and actual values.

vi_dump

The block diagram as a JSON graph: every node (functions by palette name, constants with their values, subVIs, loops, case frames, tunnels, shift registers, property nodes) and every wire with its source and sinks. Works on any VI, including broken ones.

vi_edit

Changes an existing VI in place. It removes nodes, adds code, and wires to existing controls, nodes, loops, and case frames (by vi_dump id). The rest of the diagram keeps its layout. It backs up the VI first, and reverts instead of saving if the result is broken (naming LabVIEW's errors) or a wire could not be made.

vi_diff

What changed between two versions of a VI: nodes added and removed, constant values, renamed or retyped controls, objects moved between structures, and wires added and removed. Objects are matched by their LabVIEW UID. Without a second path it compares the VI with its newest vi_edit backup, which shows exactly what an edit did.

lv_functions

Searches the palette functions in your LabVIEW install by name.

lv_class_properties

The properties of a VI Server class, such as Boolean, WaveformChart, or VI, as LabVIEW itself lists them. You can filter them by a word. Use the names in Property Nodes.

function_terminals

Exact terminal names of a function, read from a node LabVIEW places, with inputs and outputs, so the agent wires them right the first time. Names that cannot be wired by script are flagged.

vi_create

Builds a new VI from a JSON spec: typed controls and indicators with defaults and front-panel styles, constants, palette functions, subVI calls, For/While loops, shift registers, case structures, event structures, and wires. LabVIEW's Clean Up Diagram tidies the result, and the tool returns pictures of it. Automatic error handling is off in the new VI, so an unwired error cannot open a dialog that blocks LabVIEW.

project_create / project_add

Creates or extends a LabVIEW project (.lvproj): adds files, and adds build specs for an application (EXE), a packed library (.lvlibp), or a source distribution. LabVIEW creates the project and its items itself.

project_info

A project's targets, items, and build specs (startup VIs, output folder, version), read from the file.

project_build

Builds a build spec with NI's Application Builder and returns the generated files. A broken VI fails the build with LabVIEW's list of broken VIs and their reasons.

lv_mass_compile

Mass compiles a folder and lists the VIs that were broken or failed to load.

Example prompts:

  • "Explain what Main.vi does, case by case."

  • "Which subVIs write to the Config global?"

  • "Run Scale.vi with gain 2.5 and check out matches my Python reference."

  • "Test Stats.vi with an empty array, one value, and 1000 random values."

  • "Make a VI that takes an array of readings and returns their sum and mean, then test it."

  • "In Scale.vi, also output Gain squared, then run it."

  • "Make a panel with a knob, a gauge, a Double button and a STOP button."

  • "Put Main.vi in a project, build it as Logger.exe, and check the EXE runs."

vi_dump output (excerpt)

{"nodes": [{"id": "control_2", "kind": "control", "label": "data", "type": "dbl[]", "conpane_index": 11},
           {"id": "divide_7", "kind": "function", "function": "Divide"},
           {"id": "case_structure_4", "kind": "case", "frames": [{"index": 0, "values": ["apple"]},
                                                                  {"index": 2, "values": [], "default": true}]}],
 "wires": [{"from": "add_array_elements_5.sum", "to": ["divide_7.x"], "type": "dbl"},
           {"from": "tunnel_9.outer", "to": ["indicator_3"], "type": "dbl"}]}

vi_dump reads a diagram in one of two ways and reports which one it used in "source":

  • "dfir" uses LabVIEW's compiler export. It includes constant values, data types, and case values, but LabVIEW refuses it for some VIs, for example ones with certain front-panel controls.

  • "scan" walks every diagram object with VI Scripting. It works on any VI that opens, including broken VIs and VIs with property nodes or event structures.

Both ways report constant values, including arrays and clusters.

On a random sample of 50 NI example VIs, every VI was read. Password-protected VIs are refused, by design.

vi_edit spec

It takes the vi_create spec plus two keys:

  • "remove" lists vi_dump node ids to delete, together with their wires.

  • "existing" names objects already in the VI: a front-panel label, {"node": id} for any node, {"node": loop_id, "functions": [...]} to add code inside a loop, or {"node": case_id, "cases": {"1": {...}}} to add code inside a case frame.

This spec replaces out = x + 1 with out = x * 3:

{"remove":    ["increment_4"],
 "existing":  {"x": "x", "o": "out"},
 "constants": [{"name": "k", "type": "dbl", "value": 3}],
 "functions": [{"name": "m", "function": "Multiply"}],
 "wires":     [["x", "m.x"], ["k", "m.y"], ["m.x*y", "o"]]}

Small changes need no new code:

Key

Example

Effect

"rename"

{"Gain": "Gain (dB)"}

Relabels front-panel controls and indicators.

"values"

{"Gain": 2.5, "constant_6": 10}

Sets a control's default value (by label) or a constant's value (by vi_dump id).

"retype"

{"Count": "i32", "constant_6": "u8"}

Changes the numeric type of a control or a constant.

"disconnect"

["x2_5", "multiply_7.x"]

Cuts the wire into these vi_dump wire ends. The wire's other branches stay. Wire a new source in "wires".

"move"

{"for_loop_3": [300, 200]}

Moves block-diagram objects.

Structural edits go in "existing":

  • {"node": "for_loop_3", "shift_registers": ["acc"]} adds shift registers to a loop. Wire acc.left and acc.right as in vi_create.

  • {"node": "case_structure_5", "remove_cases": [2], "add_cases": [...]} removes and adds case frames. Each new frame has a "value" (a number, a range like "7..9", or a string, as the selector takes), optional "default": true, its contents, and "outputs" that give its value for existing output tunnels by vi_dump tunnel id: {"value": 5, "outputs": {"tunnel_9": "five"}}.

Objects are matched by their LabVIEW UID, which vi_dump reports. Edits therefore hit exactly the node you named, even in a VI with many identical functions.

vi_create spec

{
  "controls":   [{"name": "x", "type": "dbl", "default": 1.5},
                 {"name": "readings", "type": "dbl[]"}],
  "indicators": [{"name": "y", "type": "dbl"}, {"name": "total", "type": "dbl"}],
  "constants":  [{"name": "k", "type": "dbl", "value": 2.5}],
  "functions":  [{"name": "add", "function": "Add"},
                 {"name": "sum", "function": "Add Array Elements"}],
  "subvis":     [],
  "wires":      [["x", "add.x"], ["k", "add.y"], ["add.x+y", "y"],
                 ["readings", "sum.numeric array"], ["sum.sum", "total"]]
}

Loops and case structures go in "structures" and can hold their own constants, functions, subVIs, and structures. This spec sums 0..n-1 with a shift register:

{
  "controls":   [{"name": "n", "type": "i32", "default": 5}],
  "indicators": [{"name": "total", "type": "i32"}],
  "constants":  [{"name": "zero", "type": "i32", "value": 0}],
  "structures": [{"name": "L", "type": "for_loop", "shift_registers": ["acc"],
                  "functions": [{"name": "a", "function": "Add"}]}],
  "wires": [["n", "L.N"], ["zero", "acc.left"], ["acc.left", "a.x"], ["L.i", "a.y"],
            ["a.x+y", "acc.right"], ["acc.right", "total"]]
}

Structure

Spec

Terminals

For Loop

{"type": "for_loop", "shift_registers": ["acc"], ...}

L.N, L.i, acc.left, acc.right; stacked: acc.left[2], acc.left[3], ...

While Loop

{"type": "while_loop", "stop_if_true": true, ...}

W.i, W.stop

Case

{"type": "case", "output_tunnels": ["t"], "cases": [{"value": true, ...}, {"default": true, ...}]}

C.selector, tunnel t

A shift register is stacked by wiring its older values: acc.left[2] is the value from two iterations back, acc.left[3] from three, and so on. Wire an initial value into each one from outside the loop, as for acc.left.

Some palette functions have no name in LabVIEW's scripting, such as Merge Errors, First Call?, To Time Stamp, the TDMS and newer file functions, and Shared Variable functions. vi_create places them by their palette name instead (a stand-in node replaced with GObject.Replace) and wires them by terminal reference, outside event structures. Merge Errors takes "size", the number of inputs (m.error in[1], m.error in[2], ...).

A Static VI Reference points at a VI: {"name": "r", "function": "Static VI Reference", "vi": "C:\\path\\Callee.vi", "strict": true}. "strict": true makes it a strictly typed reference (for Call By Reference, Start Asynchronous Call); without "vi" it is an empty reference. Wire it as r.vi reference. vi_dump gives the VI it points at as "path" and "strict".

Growable functions take "size". For example, Concatenate Strings with "size": 3 is wired as cat.element[1..3]. The names the diagram shows (value[k] of Compound Arithmetic, dimension size[k] of Reshape Array, index (row)[k] of a 2-D Index Array, ...) work too. function_terminals(name, size) shows the terminals a grown node has. A case wired to an error cluster gets "No Error" and "Error" frames.

Wire straight across structure borders and LabVIEW adds the tunnels. For Loops build arrays from values that leave them, and While Loops pass out the last value. To change a tunnel's indexing, give the wire as {"from": ..., "to": ..., "indexing": false} (or true, or {"<loop>": false} for one of several loops it crosses). Each frame of a case wires its result to an output tunnel.

Connector pane: every control and indicator is wired to the standard 4x2x2x4 connector pane, so a generated VI works as a subVI right away. Inputs go on the left, outputs on the right, and error clusters on the bottom corners, as in NI's own VIs. To pin a slot, use "connector": "left3"; to leave a terminal unwired, use "connector": false. The tool reports the resulting layout.

Enums and state machines

{"enum": ["Init", "Add", "Done"]} is an enum type. Values, defaults, and vi_run inputs and outputs use the item names. A case on an enum has one frame per item, such as {"value": "Init", ...}.

A state machine is built from parts that already exist in the spec:

  • a while loop with a shift register that holds the state;

  • a case structure on the state, with one frame per state;

  • in each frame, the next state wired to an output tunnel that feeds the shift register.

To pass a value through a frame unchanged, give the frame "pass": [["acc.left", "t"]], where the pair is a source and an output tunnel. tests/live_vi_create.py (state_machine) has a complete example that runs Init → Add ×n → Done.

Queues: producer/consumer and queued message handlers

Queue functions are ordinary palette functions:

Function

Terminals

Obtain Queue

Wire a constant of the element type to element data type. The output is queue out.

Enqueue Element

queue, element

Dequeue Element

queue, element, queue out

Release Queue

queue

Loops placed side by side run in parallel and share the queue wire. tests/live_vi_create.py has two complete examples:

  • producer_consumer: a For Loop enqueues numbers and a While Loop sums them.

  • qmh: a queued message handler. Button events in a UI loop enqueue enum messages, and a second loop handles each message in a case until Exit.

User interfaces

"style" on a control or indicator replaces it with the Controls-palette object of that name, keeping its label, terminal and wires: "Stop Button", "OK Button", "Round LED", "Vertical Toggle Switch" for booleans, "Knob", "Gauge", "Thermometer", "Waveform Chart" for numbers. Restyled objects are restacked by their real size, so none overlap. Labels may be in any language (Korean, °C, ...).

A control or indicator wired only to code inside a While Loop gets its terminal inside that loop, as a LabVIEW user would place it: a Stop button read outside its loop is read once, so the loop never stops. "in": "<loop>", "in": "<case>#<frame>" or "in": "" sets the place explicitly. Terminals feeding a For Loop stay outside, because its tunnels index arrays.

An event structure runs one frame per user event. This spec is a panel whose Double it button sets y = 2x and whose STOP button ends the loop:

{
  "controls":   [{"name": "stop", "type": "bool", "label": "STOP", "style": "Stop Button"},
                 {"name": "go", "type": "bool", "label": "Double it", "style": "OK Button"},
                 {"name": "x", "type": "dbl", "style": "Knob"}],
  "indicators": [{"name": "y", "type": "dbl", "style": "Gauge"}],
  "structures": [{"name": "W", "type": "while_loop", "structures": [
                   {"name": "E", "type": "event", "events": [
                     {"control": "stop"},
                     {"control": "go", "functions": [{"name": "m", "function": "Multiply"}],
                      "constants": [{"name": "k", "type": "dbl", "value": 2}]}]}]}],
  "wires": [["stop", "W.stop"], ["x", "m.x"], ["k", "m.y"], ["m.x*y", "y"]]
}

The result follows NI's event-handler pattern:

  • The STOP button is read in its own Value Change frame, which stops the loop.

  • x and y are used only by the Double it frame, so their terminals are placed in that frame. The knob is therefore read when the button is pressed, not once before the loop.

To test a UI, give vi_run the steps a user would take:

"actions": [{"set": {"x": 21}}, {"click": "Double it"}, {"read": ["y"]}, {"click": "STOP"}]
  • click presses a button, including a latched one such as STOP.

  • set changes controls.

  • Both fire the controls' Value Change events, as a real click or edit would.

  • read records values while the VI runs.

  • wait pauses for the given number of seconds.

The result lists each step. Here it reads y = 42 and then the VI stops by itself.

"event" defaults to "Value Change". Other control events include "Mouse Down", "Mouse Up", "Mouse Enter", "Mouse Leave", and "Key Down". Code in a frame can be wired to its own frame and to anything outside the event structure, including shift registers and a surrounding case's output tunnels. One frame can handle several events: "more": [{"control": "b"}, {"event": "Panel Close"}]. A value a frame passes on unchanged, such as a state kept in a shift register, goes in that frame's "wires": {"control": "stop", "wires": [["state.left", "state.right"]]}. A case output tunnel that some frames leave unwired gives its default value there ("Use Default if Unwired"). Event structures are made by vi_create only, for now.

Events of the VI itself have no "control", and frames can use their event data:

{"name": "E", "type": "event", "events": [
  {"control": "stop"},
  {"control": "x", "data": "d"},
  {"event": "Timeout", "timeout": 50, "functions": [{"name": "inc", "function": "Increment"}]},
  {"event": "Panel Close?", "filter": "f", "constants": [{"name": "t", "type": "bool", "value": true}]}]}

with wires ["d.NewVal", "last"], ["W.i", "inc.x"], ["inc.x+1", "ticks"], ["t", "f.Discard?"].

  • "data" names the frame's event data node. Wire its items by name, such as NewVal, OldVal, CtlRef, Coords, and Button. The node shows the items that are wired.

  • "Timeout" runs when no other event arrives within "timeout" milliseconds. The constant is wired to the structure's hourglass terminal.

  • Filter events end in ?. "filter" names their filter node, such as Discard? for "Panel Close?", which keeps the window open.

  • Other VI events: "Panel Close", "Panel Resize", "Key Down", "Mouse Enter", and more.

Property and Invoke Nodes

"property_nodes": [{"name": "p", "control": "chart", "properties": ["Visible"], "write": true},
                   {"name": "a", "class": "Application", "properties": ["App.Version"]}],
"invoke_nodes":   [{"name": "i", "control": "x", "method": "Reinit To Dflt"}]
  • Linked: "control" links a node to a front-panel object, like right-clicking it and choosing Create ▸ Property Node.

  • Unlinked: "class" makes an unlinked node. Wire a reference to "p.reference"; Application needs none.

  • Read or write: properties are read unless "write" is true or lists them.

  • Wiring: wire nodes as "p.Visible", "i.<parameter>", "p.error in", and "p.error out". Chain the error wires to set the order of nodes.

  • Names: use LabVIEW's short names, such as Visible, Value, DefVal, Disabled, and App.Version. lv_class_properties lists them for a class. If LabVIEW names a property's terminal differently, the wire is redirected to the right terminal.

  • Nested properties: write them as LabVIEW shows them, such as Label.Text, Plot.Plot Color, or YScale.Multiplier, and wire them the same way ("p.Label.Text"). LabVIEW's scripting call refuses nested names, so they are set through the item's own (deprecated) Property setting, as NI suggests on its forum.

  • Charts and other UI controls: a node linked to a chart, slide, or listbox needs that control's "style" ("Waveform Chart", "Vertical Fill Slide", "Listbox"), so the control has those properties.

  • Placement: nodes work at the top level, in loops and cases, inside event frames, and in vi_edit.

Strings are stored in the Windows ANSI code page, as LabVIEW does, so characters outside it (for example é on Korean Windows) become the closest match.

Types: dbl sgl i8 i16 i32 i64 u8 u16 u32 u64 bool string path error, VI Server references ("ref:Control", "ref:VI", "ref:Boolean[]"), enums ({"enum": [...]}), arrays ("dbl[]", "i32[][]", or {"array": <type>, "dims": 1} for arrays of clusters), and clusters ({"cluster": [{"name": "gain", "type": "dbl"}, ...]}). Other types (waveform, picture, timestamp, class objects, typedefs, numbers with units) are copied from an existing VI: vi_dump gives such a control or constant a "flat" entry, and that entry ({"flat": "...", "data": "..."}) works as a type, with the original default value. Function terminals use the names shown in LabVIEW's Context Help; Unbundle By Name and Bundle By Name are wired by element name ("u.gain"), and so are Build Waveform and Get Waveform Components (components t0, dt, Y, attributes, error). Build Array takes "concatenate": true to join its array inputs end to end. A spec's "library" (the absolute path of a .lvclass or .lvlib) makes the new VI a member of that class or library, which is then saved; a class member can Bundle and Unbundle the class's private data. vi_dump reports the library a VI belongs to as "library". SubVI terminals use the subVI's control labels.

Projects and builds

{"path": "C:/work/Demo/Demo.lvproj",
 "files": ["C:/work/Demo/Main.vi"],
 "build_specs": [
   {"name": "Demo App", "type": "exe", "startup": ["C:/work/Demo/Main.vi"],
    "include": ["C:/work/Demo/Plugin.vi"], "file_name": "Demo.exe", "version": "1.2.0.0"},
   {"name": "Lib", "type": "ppl", "library": "C:/work/Demo/Tools.lvlib"},
   {"name": "Src", "type": "source", "include": ["C:/work/Demo/Main.vi"]}
 ]}

project_create takes this. project_build with build_spec="Demo App" then produces builds/Demo App/Demo.exe next to the project. LabVIEW creates the project, its items, and the empty build specs through its ActiveX Project interface. The build settings are the properties that LabVIEW itself writes for each spec type, filled into the saved project file. project_build calls NI's Application Builder API (AB_API_Simple/Build (path).vi), the same VI that LabVIEWCLI's ExecuteBuildSpec operation uses.

  • Application Builder is included in LabVIEW Community Edition and in the Professional edition. A built EXE needs the matching LabVIEW Run-Time Engine on the machine that runs it.

  • lv_mass_compile saves the VIs it compiles. It refuses folders inside the LabVIEW installation. Don't mass compile a copy of a library while LabVIEW holds the original: the two get cross-linked, and LabVIEW re-saves the original.

Requirements

  • Windows with LabVIEW installed. Community Edition works for personal and non-commercial use.

  • In LabVIEW, open Tools ▸ Options ▸ VI Server and enable ActiveX.

  • Python ≥ 3.10.

  • vi_create, vi_dump, and vi_edit use small helper VIs shipped in the package and saved in LabVIEW 2015 format, so they open in LabVIEW 2015 and later. They call scripting methods that an older LabVIEW might lack. In that case the tool reports which helper cannot run, and vi_dump falls back to its scan reader where it can.

Tested on LabVIEW 2026 Q3 (64-bit, English) under Korean Windows. Reports from other versions and languages are welcome.

Install

pip install git+https://github.com/shlim-t/labview-mcp
claude mcp add labview -s user -- python -m labview_mcp

Other MCP clients use the same command: python -m labview_mcp over stdio.

How it works

agent ──MCP/stdio──▶ labview-mcp ──ActiveX (COM)──▶ LabVIEW.exe
                                                   ├─ ExportVIStrings  → vi_text
                                                   ├─ PrintVIToHTML    → vi_snapshot
                                                   ├─ CalleesPaths     → vi_hierarchy
                                                   ├─ Set/Run/GetValue → vi_run
                                                   ├─ helper VIs       → vi_create, vi_edit
                                                   ├─ Project + AB API → project_*, lv_mass_compile
                                                   └─ helper VI        → vi_dump
  • All COM calls run on a single dedicated thread.

  • vi_snapshot temporarily changes LabVIEW's print options to render hidden frames. It always restores them afterwards.

  • Read tools never modify or save VI files. vi_create only writes the new file you name, and it refuses to overwrite an existing file unless you pass overwrite=true.

  • vi_edit copies the VI to .lvmcp-backup/ next to it before editing. It refuses to touch a VI with unsaved changes in LabVIEW. It reverts instead of saving if the edit breaks the VI or LabVIEW silently drops a requested wire.

  • vi_create and vi_edit translate the spec into LabVIEW's internal diagram-scripting XML. Small helper VIs shipped in the package (vis/) run that script. The spec is validated in Python first, so malformed input never reaches LabVIEW.

  • vi_dump runs LabVIEW's dataflow (DFIR) exporter through a helper VI and parses its output.

Safety

vi_run executes LabVIEW code on your machine. That code can drive real instruments, such as DAQ, power supplies, and motion stages. MCP clients ask for confirmation before each tool call, so review what you approve.

Roadmap

  • vi_dump: block-diagram graph (nodes, wires, constants) as JSON.

  • vi_edit: add code wired to an existing VI's controls and indicators, with backup and revert.

  • vi_edit: remove and replace nodes; add code inside existing loops and case frames.

  • vi_edit: rename controls, set constant and default values, retype numbers, cut and re-make wires.

  • vi_edit: move objects, add and remove case frames, add shift registers to existing loops.

  • vi_edit: wrap existing code in a loop or structure.

  • vi_dump for any VI (scan fallback), including broken ones and VIs with property nodes and event structures.

  • vi_diff: a semantic diff between two versions of a VI, for code review on binary files.

  • Projects: create, add files and build specs (EXE, packed library, source distribution), build, mass compile.

  • Installers, shared libraries (DLL), VI Analyzer, unit tests; creating libraries and classes.

  • vi_create: new VIs with controls, constants, functions, subVIs, and wires.

  • vi_create: For/While loops, shift registers, case structures (boolean, integer, string), nesting.

  • vi_create: connector pane and error clusters, so generated VIs can call each other.

  • vi_create: front-panel styles and event structures (control events) for user interfaces.

  • Property and Invoke Nodes, linked to controls or of any VI Server class.

  • lv_class_properties: a class's properties by name. Methods are not listed yet.

  • Enums, enum cases, and state machines.

  • Queues: producer/consumer and queued message handlers.

  • Event structures: Timeout, VI events (Panel Close?), event data (NewVal, Coords) and filter nodes (Discard?).

  • Event structures: editing with vi_edit; dynamic (user) events.

  • vi_run operates a running VI's front panel: click, set, read.

  • Helper VIs saved for LabVIEW 2015 and later.

  • Verified on LabVIEW versions older than 2026 and on localized (non-English) LabVIEW.

Development

  • Hand-built helpers are edited in LabVIEW from vis_src/.

  • Generated helpers are built by python tools/helpergen.py from Python specs into vis_src/. Start from a freshly started LabVIEW so that no VI with the same name is already in memory. The generator uses diagram scripting together with the two hand-built configuration helpers: lvmcp_propconfig and lvmcp_invokeconfig.

  • Shipping: python tools/build_helpers.py saves every helper for LabVIEW 2015 into src/labview_mcp/vis/, which is what ships.

  • Class table: src/labview_mcp/vi_classes.json maps VI Server class names to the class numbers used in refnum type descriptors. It was measured by wiring a refnum of each class number into a Property Node and reading the node's class.

  • tests/live_vi_create.py, tests/live_vi_edit.py, tests/live_project.py, and tests/smoke_mcp.py need Windows and LabVIEW.

  • Measurement: python tools/measure.py run reads every software example VI shipped with LabVIEW (about 960), converts each to a vi_create spec, rebuilds it in a scratch folder, and compares the rebuilt VI with the original. python tools/measure.py report ranks the features that block rebuilding by how many examples use them. Originals are only read, never saved. The first baseline: 962/964 examples read, 23 rebuilt identically. After v0.17.0's reader fixes, examples blocked by a read gap fell from 742 to 374, and 27 are rebuilt identically; with v0.23.0's real terminal names, 32; with v0.25.0's Property/Invoke Node rebuild, 35, and no example is blocked by a Property Node any more (180 before); with v0.26.0's copied types (waveform, picture, timestamp, class objects, typedefs, units), 77, and examples stopped by a feature with no spec fell from 834 to 616; with v0.27.0's Bundle/Unbundle By Name, Format Into String sizes and exact connector-pane matching, 84, and failed rebuilds fell from 123 to 84; with v0.28.0's polymorphic VI paths, array-node terminal maps, wiring by terminal reference and consistent growable-node numbering, 123, and examples blocked by an unnamed wire end fell from 304 to 208; with v0.29.0's shift registers in the scan reader (paired sides, stacked elements) and stacked shift registers in vi_create, no example is blocked by a shift register any more (100 before), and 124 are rebuilt identically; with v0.30.0's event structure rebuild (frame events read from LabVIEW, several events per frame, event data and filter nodes, frames wired to shift registers and case tunnels, values passed through a frame) and the case-selector and frame-order fixes in the scan reader, no example is blocked by an event structure any more (64 before), and 130 are rebuilt identically; with v0.31.0's functions placed by palette name (Merge Errors, First Call?, To Time Stamp, TDMS, file I/O, Shared Variable), rebuilds LabVIEW refused for an unknown function fell from 33 to 3, and 138 are rebuilt identically; with v0.32.0's Static VI References (read with the VI they point at, rebuilt pointed at it), examples blocked by an unnamed wire end fell from 191 to 153 and 146 are rebuilt identically. With v0.33.0's error list the measurement ranks why rebuilt VIs are broken; with v0.34.0's case pass-throughs drawn as LabVIEW users draw them (a value from outside a frame wired straight to the output tunnel's terminal in that frame), rebuilt VIs broken by an undirected tunnel fell from 53 to 10, failed rebuilds from 141 to 115, and 152 are rebuilt identically; with v0.35.0's case values read by selector type (DFIR numbers Boolean and error-cluster frames 0/1), the selector value used inside its frames, and Bundle/Unbundle By Name recognized in DFIR's element lists, rebuilt VIs broken by a case-selector error fell from 31 to 4, broken rebuilds from 140 to 124, and 165 are rebuilt identically; with v0.36.0's DFIR data blob read as LabVIEW writes it (backslash bytes unescaped), waveform components (Build Waveform / Get Waveform Components) and concatenating Build Arrays, rebuilt VIs broken by a type conflict fell from 81 to 66, broken rebuilds from 124 to 107, and 180 are rebuilt identically; with v0.37.0's loop tunnel indexing (a wire's "indexing", read from DFIR's tunnel modes) and Format Into String inputs kept by name, type conflicts fell from 66 to 50, broken rebuilds from 107 to 85, and 195 are rebuilt identically; with v0.38.0's class and library membership ("library"; class members that use private data are rebuilt into their class, in memory only), no rebuilt VI is broken by class private data any more (18 before), broken rebuilds fell from 85 to 59, and 207 are rebuilt identically; with v0.39.0's grown-node inputs wired by the names the diagram shows (Compound Arithmetic, Concatenate Strings, Reshape Array, 2-D Index Array...), the full Unflatten From String node, and chained Unbundle By Name nodes, failed rebuilds fell from 109 to 80, and 214 are rebuilt identically; with v0.40.0's front-panel terminals placed inside the While Loops they serve (read from where the original has them), numeric constants sized to their values and restyled panels restacked by real size, 262 are rebuilt identically and rebuilds with differences fell from 104 to 64. They build real VIs, run them, and check the results.

License

MIT. LabVIEW is a trademark of National Instruments (Emerson). This project is not affiliated with or endorsed by NI.

Available Tools

19 tools
function_terminalsB

Exact terminal names of one palette function, verified against LabVIEW's scripting engine (Context Help labels sometimes differ, e.g. "Variant" vs "variant"). Wire them in vi_create as ".". "help_labels" lists the Context Help text; inputs usually carry a default in parentheses there. Growable nodes are wired as element[1..N] instead.

Inputs: name (required), size.

lv_class_propertiesA

Properties of a VI Server class as LabVIEW lists them (All Supported Properties), filtered by query (words in the name or long name, e.g. "visible", "plot color"). Use "name" in a property node's "properties" in vi_create / vi_edit. class_name is a class like "Boolean", "Digital", "WaveformChart", "Control", "VI", "Application"; a node linked to a front-panel object has that object's class (vi_dump / vi_text show the control type; its parent classes also apply).

Inputs: class_name (required), query.

lv_functionsA

Search LabVIEW's palette functions by name (words match in any order), e.g. "array", "string length", "file". Use the exact name as "function" in vi_create, and call function_terminals(name) to learn its terminal names.

Inputs: query (required).

lv_mass_compileA

Mass compile every VI under a folder in this LabVIEW version (recompiles and saves them; use after upgrading LabVIEW or moving code). "problems" lists the log lines about VIs that failed to load, were broken or could not be saved; an empty list means all compiled cleanly.

Inputs: directory (required).

lv_statusA

Connect to LabVIEW and report its version, install directory and VIs currently in memory.

Inputs: no named parameters.

project_addA

Add files and/or new build specs (same format as project_create) to an existing project. Files already in the project are skipped; a build spec name already in use is refused. LabVIEW opens, saves and closes the project, so close it in the LabVIEW IDE first if it has unsaved changes there.

Inputs: path (required), files, build_specs.

project_buildA

Build a project's build specification with NI's Application Builder (empty build_spec = build all of the target's specs). Returns the generated files (the .exe first for an application). A broken VI fails the build with LabVIEW's list of broken VIs and reasons; fix them (vi_snapshot / vi_edit) and build again. The built EXE needs the LabVIEW Run-Time Engine of this LabVIEW version on the machine that runs it.

Inputs: path (required), target, build_spec.

project_createA

Create a LabVIEW project (.lvproj) under My Computer holding files (absolute paths of VIs, controls, libraries, other files), optionally with build specs. LabVIEW makes the project and adds the items itself.

A build spec: {"name": "My App", "type": "exe" | "ppl" | "source", "version": "1.0.0.0", "description": "...", "output_dir": "C:/.../builds/My App" (default /builds/ ), "file_name": "MyApp.exe" (exe/ppl; default .exe / .lvlibp), plus exe (application): "startup": ["C:/.../Main.vi"] (opens when the EXE runs), "include": [always-included VIs, e.g. ones called dynamically]; ppl (packed library): "library": "C:/.../My.lvlib", "include": [...]; source (source distribution, copies the VIs and their non-vi.lib subVIs): "include": [...]}. Source files are added to the project if missing. Build it with project_build. Returns project_info of the result.

Inputs: path (required), files, overwrite, build_specs.

project_infoA

Contents of a LabVIEW project (.lvproj): targets, items (with project path like "/My Computer/Main.vi" and file path) and build specifications (type, startup and always-included VIs, output folder and primary output, version). Reads the file; nothing is opened or changed.

Inputs: path (required).

vi_createA

Create a new VI with front-panel controls/indicators and a wired block diagram. Returns a summary and a picture of the generated diagram; then use vi_run to test it.

spec = { "controls": [{"name": "x", "type": "dbl", "label": "x", "default": 1.0}, ...], "indicators": [{"name": "result", "type": "dbl"}], "constants": [{"name": "k", "type": "dbl", "value": 2.5}], "functions": [{"name": "add", "function": "Add"}], # palette names; find them with # lv_functions(query) and their terminals with function_terminals(name) "subvis": [{"name": "s", "path": "C:\abs\Helper.vi"}], "wires": [["x", "add.x"], ["k", "add.y"], ["add.x+y", "result"]] } names are ids ([A-Za-z_][A-Za-z0-9_]). Wires go [from, to]. Controls, indicators and constants are referenced by name alone; functions and subVIs as "name.Terminal", where the terminal is its Context Help label (Add: x, y, x+y; Multiply: x, y, xy) or, for a subVI, the label of its control/indicator. Types: dbl, sgl, i8..i64, u8..u64, bool, string, path; arrays "dbl[]", "string[][]"; clusters {"cluster": [{"name": "a", "type": "dbl"}, ...]}; enums {"enum": ["Init", "Run", "Stop"]} (values, defaults and vi_run inputs/outputs are item names; a case on an enum has frames {"value": "Init"}, ...). Any other type (waveform, picture, timestamp, class objects, typedefs, numbers with units) can be copied from an existing VI: vi_dump gives such a control or constant a "flat" entry; use it as the type ({"flat": "...", "data": "..."}, with its default value).

Structures (top level or nested, in "structures"; they hold constants/functions/subvis/ structures of their own; all names are global and wires are always listed at the top level): {"name": "L", "type": "for_loop", "functions": [...], "shift_registers": ["acc"]} terminals L.N (count), L.i; shift register: acc.left (previous value), acc.right (next); acc.left[2], acc.left[3], ... stack it (values 2, 3, ... iterations back; wire each an initial value from outside like acc.left) {"name": "W", "type": "while_loop", "stop_if_true": true, ...} terminals W.i, W.stop {"name": "C", "type": "case", "output_tunnels": ["t"], "cases": [ {"value": true, ...contents}, {"value": 3}, {"value": "apple"}, {"default": true}]} terminal C.selector. Several values or ranges in one frame use LabVIEW's case-name text: {"value": "1..3, 5"}, {"value": "10.."}, {"value": ""a", "b""}. Values passing INTO a structure: wire the outer node straight to the inner node. Values leaving a loop: wire the inner node to the outer node (For Loops build an array, While Loops pass the last value). Values leaving a case: wire each frame's result to an output tunnel ("t"), then "t" to the destination. Example, sum of 0..n-1: {"controls": [{"name": "n", "type": "i32"}], "indicators": [{"name": "total", "type": "i32"}], "constants": [{"name": "zero", "type": "i32", "value": 0}], "structures": [{"name": "L", "type": "for_loop", "shift_registers": ["acc"], "functions": [{"name": "a", "function": "Add"}]}], "wires": [["n", "L.N"], ["zero", "acc.left"], ["acc.left", "a.x"], ["L.i", "a.y"], ["a.x+y", "acc.right"], ["acc.right", "total"]]} Functions LabVIEW's scripting has no name for (Merge Errors, First Call?, To Time Stamp, TDMS, newer file I/O, Shared Variable) are placed by their palette name and wired by terminal reference (not inside event frames); Merge Errors: "size" = inputs, wired m.error in[1], [2], ... Static VI Reference: {"name": "r", "function": "Static VI Reference", "vi": "<absolute .vi path>", "strict": true}; wire "r.vi reference" (not inside event frames). Growable functions take "size" (check it with function_terminals(name, size)): {"name": "cat", "function": "Concatenate Strings", "size": 3} -> inputs cat.element[1..3], output cat.concatenated string; Build Array likewise ("appended array"); Unbundle (by position, size = number of cluster elements) -> u.cluster in, u.element[i] out; Format Into String with 2 inputs -> "size": 5, wired as fs.input 1, fs.input 2. The names the diagram shows work too: Compound Arithmetic "value[k]", Concatenate Strings "string[k]", Build Array "array[k]", Build Cluster Array "component element[k]", Index & Bundle Cluster Array "component array[k]", Reshape Array "dimension size[k]" (size = 2 x dimensions), a grown 2-D Index Array "index (row)[k]" / "index (col)[k]" / "subarray[k]". Build Array with "concatenate": true joins array inputs end to end (Concatenate Inputs). Unbundle By Name / Bundle By Name: wire the cluster to "u.input cluster" and wire elements by name ("u.gain", "b.offset"); the node shows the elements its wires name, in wire order (or set "elements": [...] for another order). Build Waveform ("w.waveform" in, "w.output waveform" out) and Get Waveform Components ("g.waveform" in) work the same way with the components t0, dt, Y, attributes, error. A case wired to an error cluster has frames "No Error" and "Error". To pass a value through a case frame unchanged, give that frame "pass": [["acc.left", "t"]] (source, output tunnel); a wire from outside straight to an output tunnel does not work. Loop tunnels: a For Loop indexes arrays going in and builds arrays coming out, a While Loop does neither. To change that, give the wire as {"from": ..., "to": ..., "indexing": false} (or true; or {"": false} for one of several loops it crosses). Queues (producer/consumer, queued message handler): "Obtain Queue" (wire a constant of the element type to "element data type"; "queue out"), "Enqueue Element" ("queue", "element"), "Dequeue Element" ("queue", "element" out, "queue out"), "Release Queue" ("queue"). Loops in parallel share the queue wire; release it from the consumer's "queue out". State machine: a while loop with shift registers ["state", ...], the enum state wired to state.left -> C.selector, one case frame per state, each frame wiring the next state to an output tunnel -> state.right, and a boolean tunnel -> W.stop. Connector pane: every control and indicator is wired to the 4x2x2x4 connector pane so the VI works as a subVI right away (controls on the left then top, indicators on the right then bottom, in spec order). Pin a slot with "connector": "left3" (left0-3, top0-1, bottom0-1, right0-3) or leave one off with "connector": false. LabVIEW convention: error in at left3, error out at right3; type "error" is an error cluster. Front-panel look: "style" on a control/indicator replaces it with that Controls-palette object of the same data type: bool "Stop Button", "OK Button", "Round LED", "Vertical Toggle Switch"; numeric "Knob", "Gauge", "Thermometer", "Vertical Pointer Slide", "Waveform Chart" (dbl indicator). Restyled objects are restacked by their real size so none overlap. Labels may use any language. A control/indicator wired only inside a While Loop gets its terminal inside it (a Stop button read outside its loop would be read once); "in": "" / "#" / "" places it explicitly. A For Loop keeps outside terminals (its tunnels index arrays). User interfaces: an event structure, usually inside a while loop, runs one frame per user event: {"name": "E", "type": "event", "events": [ {"control": "stop"}, # "event" defaults to "Value Change" {"control": "go", "event": "Value Change", "functions": [...], ...contents}]} "control" names a control/indicator of the spec. Other events: "Mouse Down", "Mouse Up", "Mouse Enter", "Mouse Leave", "Key Down", ... Events of the VI itself have no "control": {"event": "Timeout", "timeout": 100, ...contents} # runs when no event came for 100 ms {"event": "Panel Close?", "filter": "f", ...} # wire a True constant to "f.Discard?" (also "Panel Close", "Panel Resize", "Key Down", "Mouse Enter", ...). Event data: "data": "d" names the frame's event data node; wire "d.NewVal", "d.OldVal", "d.Coords", "d.Button", "d.CtlRef", ... (the node shows the items that are wired). Code in a frame may be wired to code in the same frame and to objects outside the event structure, also shift registers and the output tunnels of a case around it. One frame can handle more events: "more": [{"control": "b"}, {"event": "Panel Close"}]. A value a frame passes on unchanged (state in a shift register) is listed in that frame's "wires": {"control": "stop", "wires": [["state.left", "state.right"]]}. A case output tunnel left unwired in some frames gives its default there. A front-panel terminal used by only one frame is placed in it (read when the event happens), and [button, "W.stop"] reads the button in its own frame and stops the loop W, as in NI's templates. Example: {"controls": [{"name": "stop", "type": "bool", "style": "Stop Button"}, {"name": "go", "type": "bool", "label": "Double it", "style": "OK Button"}, {"name": "x", "type": "dbl", "style": "Knob"}], "indicators": [{"name": "y", "type": "dbl", "style": "Gauge"}], "structures": [{"name": "W", "type": "while_loop", "structures": [{"name": "E", "type": "event", "events": [{"control": "stop"}, {"control": "go", "functions": [{"name": "m", "function": "Multiply"}], "constants": [{"name": "k", "type": "dbl", "value": 2}]}]}]}], "wires": [["stop", "W.stop"], ["x", "m.x"], ["k", "m.y"], ["m.x*y", "y"]]} Test a UI with vi_run's "actions" (click buttons, set values, read indicators while it runs). The new VI has LabVIEW's automatic error handling off, so an unwired error does not open a dialog that would block LabVIEW; "auto_error_handling": true in the spec keeps it on. "library": "<absolute .lvclass or .lvlib path>" in the spec makes the new VI a member of that class or library (then saved); a class member may Bundle/Unbundle the class's private data. vi_dump reports the library a VI belongs to as "library". Property and Invoke Nodes (top level, in loops, cases and event frames): "property_nodes": [{"name": "p", "control": "chart", "properties": ["Visible"], "write": true}, {"name": "a", "class": "Application", "properties": ["App.Version"]}], "invoke_nodes": [{"name": "i", "control": "x", "method": "Reinit To Dflt"}] "control" links the node to a front-panel object (it gets that object's class); "class" makes an unlinked node (wire a reference into "p.reference"; Application needs none). Properties are read unless "write" is true or lists them. Wire "p.Visible", "i.", "p.error in", "p.error out"; chain error wires to order nodes. Names are LabVIEW's short names ("Visible", "Value", "DefVal", "Disabled", "App.Version", method "Reinit To Dflt"). Nested properties are written as LabVIEW shows them: "Label.Text", "Plot.Plot Color", "YScale.Multiplier"; wire them the same way ("p.Label.Text"). A node linked to a chart, slide, listbox, ... needs that control's "style" ("Waveform Chart", "Vertical Fill Slide", "Listbox") so the control has those properties. The diagram is tidied with LabVIEW's Clean Up Diagram.

Inputs: path (required), spec (required), overwrite, description.

vi_diffA

What changed between two versions of a VI, as a list of semantic changes: nodes added and removed, constants with new values, controls renamed or retyped, objects moved into another structure or frame, and wires added and removed. path_a is the old version, path_b the new one. Without path_b it compares the newest vi_edit backup of path_a (.lvmcp-backup/) with path_a, so after vi_edit it shows exactly what the edit did. Objects are matched by their LabVIEW UID, which survives edits. Neither file is changed.

Inputs: path_a (required), path_b.

vi_dumpA

The block diagram as a graph: every node (controls, indicators, constants, functions by palette name, subVIs, loops, cases and their frames, tunnels, shift registers, property/invoke nodes), which diagram it sits in ("in": a structure id, "case_4#1" = frame 1), and every wire with its source and sinks as "node.terminal". Node ids are what vi_edit's "remove" and "existing" take; dump again after each edit. Controls carry their front-panel class ("vi_class": "WaveformChart", "Slide", ...). Property Nodes carry "vi_class", the linked "control" label if any, "items" (terminal names, top to bottom) and "write"; Invoke Nodes their "method".

"source" says how it was read. method="auto" first uses LabVIEW's compiler export ("dfir": adds wire data types and case frame values, but refuses VIs with some controls or nodes), then walks the diagram objects instead ("scan": works on any VI, including broken ones). Both include constant values. method="dfir" or "scan" forces one. Password-protected VIs cannot be read.

Inputs: path (required), method.

vi_editA

Change an existing VI: remove nodes, add code, and wire it to what is already there, including inside existing loops and case frames. The rest of the diagram keeps its layout. Call vi_dump first to get node ids.

spec = the vi_create spec plus: "remove": ["increment_4", ...] vi_dump node ids to delete, with their wires "existing": {spec name: what} objects already in the VI that the spec refers to: "Gain" a front-panel control/indicator by label {"node": "multiply_7"} a vi_dump node (function, subVI, constant, loop, case) {"node": "for_loop_3", "functions": [...], ...} new code inside an existing loop {"node": "case_structure_5", "cases": {"1": {...}}} new code inside case frame 1 {"node": "for_loop_3", "shift_registers": ["acc"], ...} new shift registers on a loop (wire "acc.left" / "acc.right" like in vi_create) {"node": "case_structure_5", "remove_cases": [2], "add_cases": [{"value": 5, "outputs": {"tunnel_9": "five"}, ...contents}, {"value": "7..9", "default": true}]} remove frames (by index) and add frames (value, range or string as the selector takes); "outputs" gives the new frame's value for existing output tunnels (vi_dump tunnel ids) "move": {"for_loop_3": [300, 200]} move block-diagram objects "rename": {"Gain": "Gain (dB)"} relabel front-panel controls/indicators "values": {"Gain": 2.5, "constant_6": 10} a control's default value (by label) or a constant's value (vi_dump id) "retype": {"Count": "i32", "constant_6": "u8"} change a number's type (control or constant) "disconnect": ["out_12", "multiply_7.x"] cut the wire into these vi_dump wire ends (a wire's other branches stay); then wire a new source in "wires": {"disconnect": ["x2_5"], "existing": {"a": {"node": "add_8"}, "o": "x2"}, "wires": [["a.x+y", "o"]]} Existing nodes are wired like new ones ("m.x", "L.i", "C.selector"). Code put in a case frame may only be wired to code in that frame and to existing objects; crossing the border makes a tunnel. Example, replace out = x + 1 with out = x * 3: {"remove": ["increment_4"], "existing": {"x": "x", "o": "out"}, "constants": [{"name": "k", "type": "dbl", "value": 3}], "functions": [{"name": "m", "function": "Multiply"}], "wires": [["x", "m.x"], ["k", "m.y"], ["m.x*y", "o"]]} An input that is already wired cannot take a second source (remove its node first). New controls stay off the connector pane unless they set "connector". rewire=true deletes with LabVIEW's Quick Drop "Remove and Rewire" (joins loose ends of matching type) instead. A copy is saved to .lvmcp-backup/ next to the VI first (backup=false skips it). If the edit leaves the VI broken, or a requested wire could not be made, the VI is reverted and not saved (allow_broken=true saves a broken result anyway).

Inputs: path (required), spec (required), backup, rewire, +1 more.

vi_hierarchyA

SubVI call tree starting at a VI (breadth-first, up to max_depth levels). Callees inside the LabVIEW install (vi.lib, user.lib, instr.lib) are hidden unless include_vilib=true.

Inputs: path (required), max_depth, include_vilib.

vi_infoA

Metadata for one VI: type, description, LabVIEW version it was saved in, broken/idle state, unsaved changes, subVIs it calls (callees) and callers loaded in memory. A broken VI also gets "errors": LabVIEW's Error List (why it is broken), each {"error", "details", "count"}.

path: absolute path to a .vi/.vit/.ctl/.vim file.

Inputs: path (required).

vi_runA

Run a VI and return its front-panel values afterwards.

inputs: {control label: value} set before running (clusters as lists in element order; enums by item name). outputs: labels to read back; default reads every top-level control and indicator. actions: operate the front panel while the VI runs, as a user would, in order: {"click": "Go"} press a button (works on latched buttons such as STOP) {"set": {"x": 21}} change controls; fires their Value Change events {"wait": 0.5} pause, in seconds {"read": ["y", "log"]} record values at this moment e.g. [{"set": {"x": 21}}, {"read": ["y"]}, {"click": "Go"}, {"click": "STOP"}] tests a UI end to end; the result's "actions" lists what each step did and read. A VI still running after timeout_s is aborted (typical for UI loops waiting on a Stop button). A modal dialog (a One Button Dialog, or LabVIEW's automatic error dialog for an unwired error in a VI that has automatic error handling on) blocks LabVIEW until someone answers it, and this call with it. VIs made by vi_create have automatic error handling off; in other VIs wire error outputs before running them. WARNING: executes code and may drive real hardware — only run VIs the user asked to run.

Inputs: path (required), inputs, actions, outputs, +1 more.

vi_snapshotA

Render a VI to PNG images: block diagram, front panel and/or connector pane.

all_frames=true also renders every hidden case / sequence / event frame (one image per frame, in LabVIEW's order) — big VIs can produce dozens, so raise max_images deliberately. Images larger than max_px on their longest side are downscaled.

Inputs: path (required), panel, max_px, diagram, +3 more.

vi_testA

Test a VI against many input sets at once: run it once per case and compare the outputs. cases: [{"name": "zero gain", "inputs": {"Gain": 0, "x": 5}, "expect": {"y": 0}}, {"inputs": {"x": [1, 2]}, "expect": {"sum": 3.0, "mean": 1.5}, "tol": 1e-6}, ...] Numbers match within tol (relative to the expected value, at least absolute tol), arrays and clusters (lists) element by element, strings and booleans exactly. Returns "summary" ("9/10 cases passed") and per case "passed" with the mismatches (expected vs got) or the error. Same rules as vi_run: it executes code; only test VIs the user asked to run.

Inputs: path (required), cases (required), tol, timeout_s.

vi_textA

Text content of a VI as LabVIEW's own string export (XML-like): front-panel controls (type + name, nested for clusters), descriptions, captions, and with include_diagram=true the block-diagram strings: free labels/comments, structures (case structures with one block per case), string constants. It does NOT include wires, node types or numeric constants — use vi_snapshot to see those.

raw=true returns the export unmodified (with font markup).

Inputs: path (required), raw, include_diagram. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 19 tools

    Disambiguation5/5

    Each tool has a clearly delineated role: the read surface is split by output form (vi_info metadata, vi_text text export, vi_snapshot images, vi_dump graph), and descriptions explicitly tell the agent when to use which. Creation vs. editing (vi_create/vi_edit) and single-run vs. batch-test (vi_run/vi_test) are also cleanly separated, as are palette search vs. terminal lookup (lv_functions/function_terminals).

    Naming Consistency4/5

    Names follow a resource-prefix convention (vi_*, project_*, lv_*) with readable action nouns, so patterns are predictable within each domain. Minor deviations exist—function_terminals lacks the lv_ prefix, and some names are nouns (vi_info, project_info) while others are verbs (project_create, lv_mass_compile).

    Tool Count4/5

    Nineteen tools is slightly heavy but justified by a genuinely broad domain spanning VI inspection, creation/editing, execution/testing, diffing, compilation, palette lookup, and project/build management. No tool appears redundant or purely decorative, though consolidation of a couple of read tools could be argued.

    Completeness4/5

    Coverage is strong across the VI and project lifecycle: read (info, text, snapshot, hierarchy, dump), author (create/edit), execute (run/test), diff, compile, and project create/add/build/info. Notable gaps remain around deletion and cleanup—no tool to remove VIs/project items, delete build specs, or close VIs/projects held in memory—which agents may need to work around.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant to drive an already-running SOLIDWORKS session over its COM API, so it can build sketches, solid features, reference geometry, assemblies, mates, and engineering drawings, then inspect the result through topology listings, mass properties, measurements, and screenshots returned as images.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to read and modify Pulsonix 10.x schematics and PCB layouts through the CAD tool's ActiveX scripting API on Windows. Supports inspecting and editing components, nets, netlists, BOMs and attributes, running ERC/DRC and CAM/plot outputs, and executing arbitrary scripts in headless or live mode.
      2
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants like Claude for Desktop or Cursor to drive Windows CAD applications (AutoCAD, ZWCAD, GstarCAD, and BricsCAD) via COM, executing 56 drawing, layer, block, entity, file, and export commands through natural-language or direct tool calls. Supports batch operations, multi-drawing session management, and data extraction to JSON or Excel.
      -