lvmcp
Enables AI assistants to create, edit, wire, run, and inspect LabVIEW VIs on Linux through VI Scripting, including block diagrams, front panels, properties/methods, project files, and value readback.
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., "@lvmcp Create ~/Projects/add.vi that adds two numbers and shows the sum."
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.
labview-mcp-linux
A Model Context Protocol server that lets an AI assistant build and edit LabVIEW VIs on Linux: create VIs, place and wire functions, build front panels, set any VI Server property, call any method, run VIs and read results back. Every action is text in, text out; no screenshots.
MCP client --stdio--> lvmcp (Python) --TCP 127.0.0.1:6340--> Bridge.vi --> Gateway.vi (VI Scripting)Features
Block diagram: place any of ~1,170 palette objects, library VIs and subVIs; wire, insert nodes into existing wires, replace objects, Case/Event Structure frames, loops with shift registers and tunnels, Formula Nodes, comments.
Front panel: every Controls-palette object (349 of 349, Modern/Silver/System/Classic/NXG), Tab Control pages, decorations and labels, typed controls (
U8,enum(Idle, Run),cluster(DBL[][], bool)[], paths).Any property, any method:
set_prop/get_prop/invokereach every VI Server property and method of 38 object classes plus the VI and the application, by name, with catalogs to search them.Run and inspect: run VIs, read indicator values (arrays, clusters, variants decoded), list objects, wires, broken wires and compile errors.
Project files: type definitions (
.ctl), libraries (.lvlib), LabVIEW classes (.lvclass) with member VIs, projects (.lvproj), icons, connector panes.Safe by default: writes only inside configured folders, a
.bakcopy before the first edit of a VI, and a guard against LabVIEW's one-VI-per-name memory silently editing the wrong file.
Example prompt: "Create ~/Projects/thermo.vi: a While Loop that reads a simulated temperature every 200 ms, shows it on a chart, and stops with a Stop button."
Related MCP server: lab-mcp
Requirements
Linux with an X11 or XWayland desktop session (
open/run/closesend key events to LabVIEW windows).LabVIEW 2026 Q3 64-bit or newer with the English user interface (window titles and the file dialog are matched by their English names). The VIs in
vendor/are saved in LabVIEW 2026, so older versions cannot open them.Python 3.12+.
Tested on LabVIEW 2026 Q3 Community Edition, Fedora 44.
Installation
git clone https://github.com/KazimMammadli/labview-mcp-linux.git
cd labview-mcp-linux
python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"LabVIEW's TCP listener has no bind address, so block Bridge's port from the network (loopback stays open), e.g. with firewalld:
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" port port="6340" protocol="tcp" reject'
sudo firewall-cmd --reloadMCP client configuration
Register the lvmcp script from the venv as a stdio server:
{
"mcpServers": {
"lvmcp": {
"command": "/abs/path/labview-mcp-linux/.venv/bin/lvmcp",
"env": { "LVMCP_ROOTS": "/home/you/Projects" }
}
}
}The first tool call starts LabVIEW with vendor/Bridge.vi if it is not running (or call start_bridge).
Check the connection with .venv/bin/python -c "from lvmcp.client import send; print(send('ping'))".
Configuration
All settings are optional environment variables:
Variable | Default | Meaning |
|
| folders the server may write VIs in, |
| newest | LabVIEW install folder (palette and library search) |
|
| LabVIEW executable |
|
| generated helper VIs and state |
|
| seconds to wait for one LabVIEW call |
The first use of a property, method or helper builds a small VI in the cache (a few seconds); later calls reuse it.
Tools
target is a VI path with a resolver suffix: a.vi%WhileLoop|L1, a.vi%NumericConstant|N, a.vi%Control|Speed.
Placing with a resolver puts the object inside that structure. The guide tool serves lvmcp/guide.md: terminal
orders, wire kinds, value formats and recipes an AI client needs to build VIs without trial and error.
Build
Tool | What it does |
| create and save an empty VI |
| place an object: palette name ( |
| typed constants, controls, indicators: numbers, bool, string, path, |
| connect two terminals |
| put a placed node into an existing wire |
| remove an object or wire |
| shift registers and tunnels; Case Structure frames |
| make an Event Structure frame handle an event |
| move or copy objects into structure frames; move objects |
| move a front-panel object onto a Tab Control page |
| a free label (comment) on the diagram or panel |
| label an unlabelled or duplicate object so other tools can address it |
| put a control/indicator on a connector-pane cell |
| Block Diagram Clean Up |
Properties and methods
Tool | What it does |
| any VI Server property by name ( |
| any method with arguments and outputs; |
| search the property and method catalogs |
| point your own Property / Invoke Node at properties or a method |
| constant and control values of any type |
| chart and graph scales and legends |
Files and projects
Tool | What it does |
| a type definition |
| a |
| a |
Run and inspect
Tool | What it does |
| run a VI (refused if it has errors), abort after |
| open a front panel; close, answering the save dialog |
| objects, wires (with broken ones), compile errors |
| a node's terminals, or a VI's connector pane |
| search palette objects and ~19k library and example VIs |
| put back the |
| many calls in one request; any Gateway verb |
| health check; start LabVIEW and Bridge; the usage guide |
Errors come back to the client as tool errors with LabVIEW's reason in the text.
How it works
Bridge.vi runs inside LabVIEW and serves one request at a time on 127.0.0.1:6340; Gateway.vi executes
VI Scripting verbs (place, wire, analyze, ...). Everything Gateway lacks runs through small helper VIs: class
templates in vendor/tpl cast an object to a VI Server class, and PropSetup.vi / MethodSetup.vi point a copy's
Property or Invoke Node at any property or method by name. These copies are cached per class and property.
open, run and close drive LabVIEW's own windows with X11 key events, because LabVIEW on Linux has no other
way to open a VI in a running instance without VI Server TCP.
Safety
Write tools only touch absolute
.vi/.vit/.ctlpaths underLVMCP_ROOTSand the cache.Before the first write to an existing VI a copy is saved as
<name>.bak.vi; an existing backup is never overwritten, so it keeps the oldest state.LabVIEW holds one VI per name. If
x.viis loaded from one folder, an edit ofx.viin another folder would silently change the loaded one and save it over that file. Calls are refused while a same-named VI is loaded from another path (including subVIs of open callers);closeit first.
Limitations
One request at a time; a request that times out may still finish inside LabVIEW.
Not scriptable in LabVIEW: Express VI configuration dialogs, strict typedefs, resizing existing controls, undo (use
restore), LabVIEW class private data, polymorphic VI instances.Decorations and panel labels are created at their default size and without a label.
A VI opened by hand in Bridge's LabVIEW blocks calls on it until it is closed (its path is unknown).
Application builds (EXE) are not covered: LabVIEWCLI needs VI Server TCP, which this server does not enable.
Linux only.
Development
.venv/bin/pytest # unit tests, no LabVIEW needed
.venv/bin/python -m tools.live_check # 37 end-to-end checks against a running LabVIEW
.venv/bin/python -m examples.demo # build an example VI (also examples.pid_control, examples.weather_station)tools/probe_palette.py/tools/probe_panel.pyre-check which palette objects can be placed.tools/catalog_props.pyregenerateslvmcp/properties.jsonandmethods.jsonfrom LabVIEW.tools/templates.pyrebuilds class templates invendor/tpl; it drives LabVIEW menus and needs Tools > Options > VI Server > "Show VI Scripting functions, properties and methods".
See CONTRIBUTING.md.
Credits
vendor/gateway/ (Gateway.vi and subVIs), lvmcp/style_codes.json and lvmcp/lv_flat.py come from
work by LabView skill contributors (MIT, see vendor/gateway/LICENSE). Changes
here: Gateway.vi's connector pane assigned, the VIs re-saved for LabVIEW 2026, strings switched to UTF-8.
License
Available Tools
46 toolsanalyzeA
List objects (labels, UIDs, positions) of a VI's block diagram, or of its front panel with part FP.
Inputs: vi_path (required), part. Returns: result
batchA
Run many tool calls in one request, in order: steps = [{"tool": "place", "args": {...}}, ...]. Stops at the first failure and reports which step failed.
Inputs: steps (required). Returns: result
caseB
Case structure frames. target a.vi%GObject|CS1. action getFrames, addFrame (arg <frame>,<1 after|0 before>), delFrame (arg frame index) or setFrameNames (arg comma-separated names, one per frame, matching
the selector type; add Default to one name: red, green, blue, Default).
Inputs: action (required), target (required), arg. Returns: result
chart_scaleA
Set a chart's or graph's Y scale (a.vi%Control|Chart): fixed ymin..ymax, or autoscale=True for continuous
autoscaling. Saves the VI (runs vendor/Chart.vi).
Inputs: ymax (required), ymin (required), target (required), autoscale. Returns: result
cleanupC
Run Block Diagram Clean Up.
Inputs: vi_path (required). Returns: result
closeA
Close a VI that is open in LabVIEW (aborts it first). Needed before new_vi reuses the name of an open VI.
If it has unsaved changes (hand edits, typed values): unsaved "cancel" (default: keep it open and report),
"save" or "discard".
Inputs: vi_path (required), unsaved. Returns: result
configure_nodeB
Point a Property Node or Invoke Node in your VI (a.vi%GObject|PN) at properties or a method by name:
"Value, Visible" for a Property Node, "Reinitialize To Default" for an Invoke Node. The node takes its class
from the reference wired into it, so wire that first. Names: props(cls) / methods(cls).
Inputs: names (required), target (required). Returns: result
connectorA
Put front-panel control/indicator label on connector-pane cell (0-11 on the default 4x2x2x4 pane) so the
VI works as a subVI; label "" disconnects the cell.
Inputs: cell (required), label (required), vi_path (required). Returns: result
createA
Create a constant, control or indicator, including arrays and clusters: elements of any number type, bool,
string or enum(a, b). U8, DBL[], cluster(I32, string),
cluster(DBL[], bool)[], DBL[][], or a typedef .ctl path (a constant linked to it). Builds the array/cluster shell and its
elements (labels <label>_e, <label>_0, <label>_1, ...). Set values afterwards with set_value fmt expr.
location x,y; front-panel objects (control/indicator) go on the panel's top level.
Inputs: type (required), label (required), vi_path (required), location (required), +1 more. Returns: result
deleteC
Delete an object. target L:<label> or U:<uid>; cls GObject (any) or Wire.
Inputs: target (required), vi_path (required), cls. Returns: result
errorsC
List compile errors of a VI.
Inputs: vi_path (required). Returns: result
event_caseA
Make frame frame of an Event Structure (a.vi%GObject|EV) handle event: of a front-panel control
(control="a.vi%Control|Stop", event "Value Change", "Mouse Down", ...) or, without control, of the VI/app
("Timeout", "Panel Close?", ...). Replaces that frame's events. Add frames first with
invoke(target, "Add Frame"). An unknown name lists them all.
Inputs: event (required), frame (required), target (required), control. Returns: result
findB
Search everything LabVIEW offers: palette objects (functions, structures, controls; placed by name) and the
~15k library VIs in vi.lib/instr.lib plus examples. Returns name | kind | how to use.
Inputs: query (required), limit. Returns: result
get_propD
Inputs: prop (required), target (required), cls. Returns: result
get_valueA
Read a constant or control value, e.g. 2.5 (DBL). target a.vi%Class|Label (Control|Out for FP objects).
Controls/indicators give the live value while the VI is open in LabVIEW. Arrays/clusters decode to [..]/{..}.
Inputs: target (required). Returns: result
guideA
How to build VIs with these tools: rules, terminal orders and recipes learned on LabVIEW 2026. Read it before
building. topic filters sections, e.g. case, shift register, subvi, values, errors.
Inputs: topic. Returns: result
insertC
Put the already placed object node into the wire from src to dst (labels): the wire is replaced by
src -> node_in and node_out -> dst (n|idx or c|0, see terms).
Inputs: dst (required), src (required), node (required), node_in (required), +2 more. Returns: result
invokeA
Call any VI Server method of an object and save its VI: invoke("a.vi%GObject|F1", "Add Input"),
("a.vi%Control|Chart", "Reinitialize to Default"). args maps input names to values
({"Name": "x"}); their types are guessed like set_prop or given in types ({"Name": "string"}).
cls="App" calls LabVIEW application methods (target: any VI). then calls more methods, each on the
previous one's return value ("on": "same": on the same object as the previous call):
[{"method": "Save:Library", "args": {...}, "types": {...}, "on": "same"}]. Returns every output
of the last call. List the methods with methods(cls).
Inputs: method (required), target (required), cls, args, +2 more. Returns: result
label_objectB
Give an object without a usable label (UID from analyze/wires) a visible label, so every other tool can
address it as vi%GObject|<label> (panel=True for front-panel objects, then vi%Control|<label>).
Inputs: uid (required), label (required), vi_path (required), panel. Returns: result
legendB
Name the plots of a waveform chart, waveform graph or XY graph and show one legend row per name: names
SP, PV. Saves the VI (runs vendor/Legend.vi or LegendGraph.vi).
Inputs: names (required), target (required). Returns: result
loopC
Edit a loop. target a.vi%WhileLoop|L1. action addSR (mode = y position) or tunnel:<idx>/tunnel:U<uid>
(mode -2 count, -1 status, 0 Regular, 1 Auto Index).
Inputs: action (required), target (required), mode, label. Returns: result
methodsB
Method names of a VI Server class for invoke; query filters them.
Inputs: cls (required), query. Returns: result
moveB
Move an existing object, e.g. a.vi%Control|Weather (front panel) or a.vi%GObject|L1 (diagram), to x,y and
save the VI. Runs vendor/Props.vi in LabVIEW (a few seconds).
Inputs: x (required), y (required), target (required). Returns: result
move_intoA
Move a diagram object (a.vi%GObject|K1) into frame frame of a structure (a.vi%GObject|EV: Event,
Case, Sequence, loops use frame 0) at x,y; copy=True leaves the original and puts a copy there. Use it for
Event Structure frames, which place() cannot reach.
Inputs: owner (required), target (required), x, y, +2 more. Returns: result
new_classB
Create a LabVIEW class (.lvclass) and make the VIs in files its member VIs (Motor.lvclass:Start.vi).
place(vi + "|FP", "/abs/Motor.lvclass", "x,y", "Motor in") then adds a class control to a member VI. The private
data stays empty: LabVIEW keeps it read-only to scripting (edit it in the class's Motor.ctl window).
Inputs: path (required), files (required). Returns: result
new_libraryA
Create a project library (.lvlib) and make the VIs in files its members (each VI is saved, so it knows its
library). Its items are then named My.lvlib:a.vi inside LabVIEW.
Inputs: path (required), files (required). Returns: result
new_projectB
Write a LabVIEW project (.lvproj) under My Computer that lists files (VIs, controls, libraries), stored as
paths relative to the project like LabVIEW does. Open it in LabVIEW with File > Open Project.
Inputs: path (required), files (required). Returns: result
new_typedefB
Create a type definition .ctl holding one control of type (create() grammar: enum(Idle, Run, Stop),
cluster(DBL, string), ...). Place it in VIs with place(vi + "|FP", path, "x,y", label): every instance is
linked to the typedef (get_prop(..., "Is Typedef?")).
Inputs: path (required), type (required), label (required). Returns: result
new_viA
Create and save a new empty VI at path (for a type definition .ctl use new_typedef).
Inputs: path (required). Returns: result
noteA
Put a free label (a comment) with text on the block diagram of vi_path at x,y (panel=True: on the
front panel).
Inputs: text (required), vi_path (required), location (required), panel. Returns: result
openB
Open a VI's front panel in Bridge's LabVIEW without running it (to watch edits live).
Inputs: vi_path (required). Returns: result
pingA
Check that LabVIEW and Bridge.vi answer.
Inputs: no named parameters. Returns: result
placeA
Place an object. type: palette name (While Loop, Add, Wait (ms)), a library VI name (Simple Error Handler, see find), a subVI path, or any:<style code>. location x,y or x,y,w,h (w,h needed for structures,
growable nodes and front-panel objects). vi_path may end with %Class|Label to place inside a structure, e.g.
a.vi%WhileLoop|L1 or a.vi%GObject|CS1%Case#|0. Decorations (boxes, frames, lines) and panel labels have no
label of their own; they are created without one.
Inputs: type (required), vi_path (required), location (required), label. Returns: result
propsA
Property names of a VI Server class (Control, Numeric, Enum, Ring, String, Boolean, Array, Cluster,
GraphChart, GObject, Node, Constant, Structure) for set_prop/get_prop; query filters them.
Inputs: cls (required), query. Returns: result
rawC
Send any Gateway verb with its 5 fields (write verbs still go through the allow-list).
Inputs: verb (required), arg1, arg2, arg3, +1 more. Returns: result
restoreA
Undo every change made through this server: put back <name>.bak.vi, the copy saved before the first write,
and keep the current file as <name>.before-restore.vi.
Inputs: vi_path (required). Returns: result
runA
Run a VI in LabVIEW (opens its front panel, Ctrl+R); after seconds (0-600) abort it if still running
(0 = leave running). Refuses a VI with compile errors. Read results with get_value(a.vi%Control|<indicator>).
Inputs: vi_path (required), seconds. Returns: result
save_defaultsA
Make the current control values (e.g. set with set_value) the VI's saved defaults. The VI must be open.
Inputs: vi_path (required). Returns: result
set_propA
Write any VI Server property of an object and save its VI: set_prop("a.vi%Control|N", "Visible", "false"),
("a.vi%Control|N", "Label.Text", "Speed"), ("a.vi%Control|Mode", "Strings[]", "[Off, On]"),
("a.vi%Control|N", "Position:Left", "40"). prop is a property name (sub-properties with :), optionally
followed by . and a property of the object it returns. type is guessed (bool, DBL, string, DBL[], string[])
unless given (I32, U32 for colors, ...). cls picks the class (Control, Numeric, Enum, Ring, String,
Boolean, Array, Cluster, GraphChart, GObject, Node, Constant, Structure); auto reads it from the VI.
Inputs: prop (required), value (required), target (required), cls, +1 more. Returns: result
set_valueA
Set a constant or control value. target a.vi%NumericConstant|N (class without spaces) or a.vi%Control|SP
for a front-panel control (its live value: the VI is opened first if it is closed, since a closed VI forgets it;
save_defaults keeps it). fmt dec|frc|str|bool|XML, or expr for any type: [1, 2, 3] (array),
c:(1.5, s:text, b:true) (cluster), numbers, s:text.
Inputs: value (required), target (required), fmt. Returns: result
start_bridgeA
Start LabVIEW with vendor/Bridge.vi and run it (use when tools report that Bridge.vi is not reachable).
Inputs: no named parameters. Returns: result
statusC
Whether a VI is running, idle (open, not running) or closed in Bridge's LabVIEW.
Inputs: vi_path (required). Returns: result
termsB
Terminals of a placed node (label), with index, name, direction (isSource) and wire state. Without label,
the connector pane of the VI file itself (cell = Terms[] index when it is used as a subVI).
Inputs: vi_path (required), label. Returns: result
to_pageC
Move front-panel object label onto page page (0 = first) of Tab Control tab, at x,y on that page.
Inputs: tab (required), page (required), label (required), vi_path (required), +1 more. Returns: result
wireC
Wire srcLabel|dstLabel using srcKind|srcIdx|dstKind|dstIdx.
Kinds: c = control/indicator/constant, n = node terminal Terms[idx] (outputs may come first: Wait (ms) is n|0 out, n|1 in),
i = loop iteration terminal, st1 = While Loop stop terminal (dst only, e.g. c|0|st1|0).
A wire crossing a loop border makes an auto-indexed tunnel: set it Regular with loop.
Inputs: labels (required), vi_path (required), terminals (required). Returns: result
wiresB
List wires of a VI, including broken ones.
Inputs: vi_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 46 tools
Most tools map to distinct LabVIEW concepts, but several boundaries are genuinely blurry: set_value vs set_prop vs invoke vs create vs place all write to an object, and move vs move_into, insert vs wire, props vs get_prop vs methods are easy to misselect. The detailed descriptions help an expert disambiguate, but an agent must read carefully to pick the right one.
Style is uniformly lowercase snake_case, but the convention is mixed: some tools are verb_noun (set_value, move_into, new_vi, configure_node), many are bare nouns (wires, errors, case, terms, connector, props, methods, status), and some are single verbs (run, place, create, find, raw). It is readable but not a predictable pattern.
46 tools is heavy for a single MCP surface, well past the 25-tool threshold. The LabVIEW scripting domain is genuinely large, but several tools (raw, batch, props, methods, get_prop) are escape hatches or sub-facets of set_prop/invoke that could be consolidated, and the sheer count raises selection cost.
Coverage is impressively broad: creation, wiring, structures, properties/methods, connector panes, typedefs, projects, libraries, classes, running, restore, and even a guide. Minor gaps exist (no explicit save tool separate from write operations, no VI-level delete/rename, limited icon/documentation editing), but core lifecycle is well covered.
Maintenance
Related MCP Connectors
Linux VMs for AI agents: create VMs, run commands, edit files and open preview URLs.
A cloud Linux desktop for your AI: browse, click, type, read the screen and run commands.
Linux cloud desktop your AI can use by the hour: run commands, read and write files, see the screen.
Linux computers for AI agents: create one, run commands, move files, use a desktop, delete it.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables 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.2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to automatically discover and control supported laboratory instruments over USB, LAN, and serial connections, including power-supply output, setpoint, and protection management plus multimeter measurements.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read, extend, and validate LabVIEW CSM state-machine VIs, inspecting case branches and exposed APIs, generating modules from official templates, and injecting new states with automatic shift-register and error-cluster tunnel wiring. Also formats complex CSM message arguments, mounts VIs into .lvproj trees, and audits projects for deadlocks, orphan states, and missing documentation.1Mulan Permissive Software , Version 2
- AlicenseAqualityBmaintenanceEnables AI coding agents like Claude Code, Codex, and Cursor to inspect, render, and execute binary NI LabVIEW VIs by driving an installed LabVIEW instance over ActiveX. Returns VI strings, PNG snapshots of diagrams and panels, subVI call trees, and front-panel values from runs.192MIT