dsh-labview-mcp-kit
sevenology7/dsh-labview-mcp-kit
DeepSeek Harness 的 LabVIEW MCP 插件:挂载上游 Zuehlke labview-mcp 服务器,自动安装固定版本的 Windows 运行时,124 个工具默认隐藏、由 labview_tools 按需展开,并把 LabVIEW 任务交给八个上游角色子代理执行。
安装
dsh plugin --profile web add github:sevenology7/dsh-labview-mcp-kitREADME
dsh-labview-mcp-kit
A DeepSeek Harness bundle that mounts the upstream Zuehlke/labview-mcp
server — 130 tools for driving a running LabVIEW instance — through the in-box
@deepseek-ai/dsh-mcp-client bridge.
Two things make it more than a JSON snippet:
- It installs the server. The bridge needs an executable, and the release archive is 62 MB of Windows binaries that has no business living in a plugin package. The bundle downloads the pinned release into the DSH home, checks its SHA-256 before unpacking anything, and tells you which pin produced the tree.
- It does not ship 130 schemas into every request. Upstream's
tools/listis 295 kB, roughly 75k tokens. Everymcp__labview__*tool is hidden until a session reveals it; a core set (status, describe, inspect, open/close) stays visible, andlabview_toolsreveals the rest by name or keyword.
Requirements
| Harness | DeepSeek Harness with @deepseek-ai/dsh-mcp-client (any current profile) |
| Platform | Windows x64 — the upstream server is a single Windows executable |
| LabVIEW | A LabVIEW installation, with LabVIEW running for the lvai_* tools |
| Network | One download from github.com on first use; afterwards it runs offline |
The bundle does not need Node or .NET on PATH: it writes a launcher under the
DSH home and starts it with the harness' own executable.
Install
From npm, in DSH's Plugins → Add plugin:
dsh-labview-mcp-kit
Or from a checkout of this repository (E:\dsh-LabVIEW-mcp), through the plugin
manager's local-directory install. The package is dsh-labview-mcp-kit and its
cordis.patch.yml inserts two rows:
labview-mcp-runtime— this package's host plugin. It writes<DSH home>/labview-mcp/launch.mjsand starts the runtime download when the runtime is missing.labview-mcp-bridge—@deepseek-ai/dsh-mcp-client,serverName: labview,transport: stdio, commandprocess.execPathwithELECTRON_RUN_AS_NODE=1, argument<DSH home>/labview-mcp/launch.mjs.
The first start downloads and unpacks the release (about 20 s on a normal connection). The bridge retries while that happens and connects on its own; if it has already given up, restart DSH once.
Tools
| Tool | What it does |
|---|---|
labview_mcp_status | Truthful report: pin, launcher, executable, installed VERSION.txt, download progress, how many bridged tools the session has, reveal policy, next step. |
labview_mcp_install | Downloads, verifies and unpacks the pinned release. Idempotent; waitMs bounds the wait (default 60 s) and the download continues in the background. force reinstalls. |
labview_tools | Reveals bridged capabilities for this session: names for exact tools, query for a keyword, all: true for the whole catalog, no arguments for the recommended set. |
labview_agent | Hands one LabVIEW task to one of the eight upstream role agents (labview-vi-generator, labview-vi-editor, labview-class-generator, labview-caraya-unit-test, labview-lunit-unit-test, labview-vitester-unit-test, labview-doc-generator, labview-dqmh-module) as a real subagent. |
labview_mcp_doctor | Twelve checks in dependency order — state directory, launcher, runtime, pin, VERSION.txt, provisioning lock, leftovers, download cache, role documents, subagent provider, bridge, real handshake — and one next: action for the first failure. Read-only apart from creating the state directory; probe: false skips starting the server. |
Everything else arrives as mcp__labview__<tool> — lvai_status,
lvai_describe_vi, lvai_generate_vi, pylv_*, …. Call labview_tools with
no arguments to see what is available.
Doctor
/labview-mcp-doctor (and the bundled labview-mcp-doctor skill, and the
labview_mcp_doctor tool) run the same twelve checks in dependency order, so
the first fail is the cause and the rest are symptoms:
ok home C:\\Users\\you\\.dsh\\labview-mcp
ok launcher present (4668 bytes)
ok runtime ...\runtime\bin\LabVIEWMCP.exe (86 MB)
ok pin v3.3.0 sha256 e816d1d2d921… matches runtime.json
warn cache interrupted download (2048 KB) — the next install resumes from the archive cache
...
verdict: USABLE with 1 warning — cache
A fail ends with the single action that fixes it, for example
next: run labview_mcp_install (or restart DSH and let it provision in the background).
The doctor never downloads or repairs anything itself: doctor → read the first
failure → labview_mcp_install → doctor again.
Subagents
Upstream ships eight role agents under agents/ (and a client-ready copy under
bin/claude/agents/). DSH has no per-file agent directory, so this bundle
exposes them through labview_agent: each call starts a normal DSH subagent that
composes from your preset and receives the upstream role document verbatim
as its task text.
labview_agent(agent: "labview-vi-generator", prompt: "…paths, target folder, .lvproj, the user's words…")
What that means in practice:
- Nothing appears in the preset picker. No
preset-labview-*row is declared; the eight roles exist only asagentvalues of one tool. A child therefore inherits your session's preset, model route and tool surface — the eight core LabVIEW tools included, the rest onelabview_toolscall away. - The role document must be installed. It is read from
<DSH home>/labview-mcp/runtime/bin/claude/agents/<id>.md; a missing document fails with a message naminglabview_mcp_install, before any child starts.labview_mcp_statusprintsagents: N/8 documents present. - Pass what the role asks for. The upstream brief's rule still holds: paths,
the target folder, the
.lvproj, and the user's own words.labview_agent's description carries the per-role pass-what table, and the prompt it builds starts with the upstreamtools:allowlist and three DSH rules (never open/close a project or swap subVIs while another agent may hold LabVIEW; end with aNEEDS CLARIFICATIONblock instead of messaging a sibling; reveal hidden LabVIEW tools first). - Continuation is
send_message. Upstream saysSendMessage(<child>, …); here the child's name comes back in the tool result, andsend_message(agent: <name>, …)continues that same child. - Allowlists are guidance, not policy. The upstream
tools:list is emitted as prose; what a child can actually call is still decided by the reveal gate and by its preset.
Settings page
Settings → LabVIEW MCP. It shows the same twelve checks the doctor prints —
in dependency order, with a HEALTHY / USABLE / BROKEN verdict — and lets
you pin a model per role.
| Part | What it does |
|---|---|
| Status card | The doctor's checks, verbatim, plus a probe checkbox that really starts the server once and a re-check button. |
| Roles table | One row per role: its purpose, the model it currently inherits, and two selects (provider, then that provider's models). Save writes the pin, Reset removes it so the role inherits again. |
| Footer | Where the pins live and how many roles are pinned. |
labview_mcp_status reports whether the page's route actually registered
(settings page : registered (POST /api/labview/settings), or the reason it did
not), because a page that silently never appeared is otherwise impossible to
diagnose from the outside.
Pins are stored in <DSH home>/labview-mcp/agents.json and read on every
labview_agent call, so a change applies to the next delegation without a
restart. A pin is {provider, model} and is rejected unless both are in the
live catalog the page loaded; the error names the providers and models that do
exist. Leaving a role on (inherit) sends no agentOptions at all, so the child
keeps composing from the parent's model.
The page is a browser companion, not a new source of truth: the same state is
reported by labview_mcp_status (agent models : N of 8 pinned) and can be
inspected in agents.json. Its requests go to POST /api/labview/settings on
DSH's authenticated channel; the page never builds a URL itself, which is why it
also works when DSH is reached through a tunnel.
Reveal policy
reveal in the patch row's config:
core(default) — the eight tools that answer "what is LabVIEW doing" (lvai_status,lvai_labview_state,lvai_describe_vi,lvai_describe_project,lvai_error_list,lvai_vi_terminals,lvai_open_file,lvai_close_vi) are visible immediately.none— every bridged tool is hidden until alabview_toolscall.all— no hiding; the full 70k-token catalog is in every request. Use it only if you know you want that.
Hidden tools are enforced twice: the schemas are removed from the model-facing
tool list for that session, and a dispatch guard refuses a call that names a
hidden tool anyway, pointing at labview_tools.
labview_tools with no arguments reveals a pinned starter set on top of the core
eight (lvai_ensure_labview, lvai_palette_index, lvai_example_index,
lvai_exec_state, lvai_convert_vi_to_aixml, lvai_convert_aixml_to_vi,
lvai_validate_aixml, lvai_generate_vi) — pinned rather than derived so the
same call reveals the same tools after an upstream release. Names the bridge does
not have are ignored, and the answer says how many stayed hidden.
Configuration
| Key | Default | Meaning |
|---|---|---|
reveal | core | core, none, or all — see above. |
autoProvision | true | Install the runtime at start when it is missing. |
runtimeZip | — | Path to a local release archive instead of downloading one. |
runtimeUrl | the pinned GitHub release | Download URL override. |
runtimeSha256 | the pinned digest | Expected digest for runtimeUrl/runtimeZip. |
An overridden digest is verified exactly like the pinned one; nothing is unpacked on a mismatch.
Trust and failure behaviour
- The archive is only unpacked after its sha256 matches the pin (or the digest you
pass). A mismatch deletes a downloaded archive and leaves a
runtimeZipyou supplied untouched. - A tree counts as runnable only when
bin/LabVIEWMCP.exeis at least 1 MiB, so a half-written or truncated install never reads as ready. - The swap is a rename: the old tree moves aside first and is restored if the new
one cannot be moved in, so a running server fails the install instead of leaving
an empty runtime behind. Leftover
runtime.old-*directories are pruned by the next install. - One DSH window installs at a time (
provision.lock, stale after 20 minutes); a second window reports that the other one is already installing. tar.exeruns with a 10-minute cap, so a hung extraction releaseslabview_mcp_installinstead of wedging it until restart.- The generated shim stops its server when its stdin closes: the bridge's teardown cannot deliver a signal on Windows, and an orphaned server would hold the runtime directory against the next install.
What lands in the DSH home
~/.dsh/labview-mcp/
├── launch.mjs generated stdio shim (rewritten on every start)
├── runtime.json { exe, args, cwd, pin, installedAt } read by the shim
├── provision.lock held while one window installs the runtime
├── downloads/ the release archive, reused while its digest matches
├── staging/ extraction scratch space, removed afterwards
└── runtime/ the unpacked release: bin/, docs/, VERSION.txt
Nothing is written into the profile's node_modules, and two profiles share one
runtime.
Verifying an install
labview_mcp_status—runtimesays installed,bridged toolsis non-zero.labview_toolswith no arguments — lists the core set.- Ask for
lvai_status— it reports the LabVIEW MCP version, the AI add-on fingerprint andlabviewInUse. - With LabVIEW closed,
lvai_statusstill answers and reports the missing application;lvai_*authoring tools then explain what to open.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
bridged tools: none registered yet | The bridge has not connected. labview_mcp_status shows whether the executable exists; if it does, restart DSH once. |
Launcher exits with [...] the LabVIEW MCP runtime is not installed | Provisioning has not finished. Call labview_mcp_install, or check that the download is not blocked by a proxy. |
sha256 mismatch in labview_mcp_install | The downloaded bytes are not the pinned release (proxy, truncated file, changed pin). Delete the archive in downloads/ and retry, or pass a verified local runtimeZip. |
lvai_status says the add-on is missing | Install the LabVIEW AI add-on that ships with the release (bin/scripts), then restart LabVIEW. |
| Tools disappear after a while | The session's reveal state is per agent: a new session starts from the configured policy. |
Layout of this package
package.json dsh.bundle.patch, exports, files
cordis.patch.yml the two rows the harness loads
lib/index.js host plugin: tools, doctor surfaces, reveal gate, provisioning kick-off
lib/agents.js the eight role agents, their documents and prompt envelope
lib/doctor.js the twelve checks, the probe and the report
lib/settings.js the settings route, the pin store and the model catalog
lib/home.js DSH home resolution, shared with the patch expression
lib/runtime.js pin, download, digest check, extraction
lib/launcher.js launcher + runtime.json writer
lib/download.js redirect-following download with a digest
lib/launch-template.mjs the stdio shim that gets copied into the DSH home
ui/ the browser half: client.js (settings page) + its own package.json
skills/labview-mcp-doctor/SKILL.md the model-facing doctor skill
locale/{en,zh}.json plugin-page title and description
LICENSE MIT, plus the note that the runtime is upstream's
README.zh.md Chinese README
CHANGELOG.md release notes
docs/DETAIL.md the one-image detail page (DETAIL.zh.md for Chinese)
docs/releasing.md the release path: gates, tag, trusted publishing
scripts/verify-runtime.mjs provision + handshake check for one DSH home
.github/workflows/publish.yml CI: verify on Windows, publish on a v* tag
test/ node --test suites for the patch, the runtime, the shim, the plugin, its lifecycle, the eight role agents, the doctor, the settings store and the page
Run npm test (or node --test "test/**/*.test.mjs") — no network, no DSH and
no LabVIEW needed.
To check one install end to end (provision, start the launcher, speak MCP, call
lvai_status):
node scripts/verify-runtime.mjs # the real DSH home
node scripts/verify-runtime.mjs --home .tmp/home --zip release.zip
node scripts/verify-runtime.mjs --url https://…/labview-mcp.zip --sha256 <hex>
Releasing
1.0.0 was published by hand; every later version is published by
.github/workflows/publish.yml when a v* tag is pushed:
npm version patch --no-git-tag-version # and bump ui/package.json to match
$EDITOR CHANGELOG.md
npm test && npm pack --dry-run
git commit -am "release: 1.1.2" && git push origin main
git tag v1.1.2 && git push origin v1.1.2
The workflow verifies on Windows (where this bundle actually runs), refuses a
tag that disagrees with package.json, publishes with --provenance through
npm Trusted Publishing (no token in the repository), and opens a GitHub
release. The one-time binding is
npm trust github dsh-labview-mcp-kit --file publish.yml --repo SeveNOlogy7/dsh-labview-mcp-kit --allow-publish;
a new binding must complete its first publish within two days.
Full path, including the token alternative: docs/releasing.md.
Credits
Upstream server: Zuehlke/labview-mcp, MIT.
The installer/bridge arrangement follows dsh-windows-mcp, the MCP bundle that
ships with DeepSeek Harness.
Compared with the ZCode marketplace package
SeveNOlogy7/labview-mcp-zcode
ships the same upstream release to ZCode: a .mcp.json that runs
bin/launch.cmd (a copy /b reassembly of a binary split at ZCode's 50 MB
archive limit), plus a PreToolUse hook that allows only read-only tools.
This bundle keeps the parts that still apply and replaces the rest:
| ZCode package | Here |
|---|---|
.mcp.json with powershell -Command & cmd /c launch.cmd | cordis.patch.yml row the DSH loader understands |
| 50 MB split binary, reassembled on first run | pinned release downloaded once into the DSH home, sha256 verified |
PreToolUse allow-list of read-only tools | reveal gate in the host plugin (schemas hidden, dispatch vetoed) |
| no provisioning, no runtime state | labview_mcp_install + labview_mcp_status |