Lab as code, with Claude: a 10-minute tutorial
Keep your lab in a git folder (git is a tool that tracks changes to files). Connect Claude (or any MCP client - an AI tool that can talk to netplex.) with read-only access. Use a fault-finder that needs no AI. And turn on an "ask before you change anything" switch that no AI tool can get around. Every command below is a real, shipped feature.
What you'll have at the end: a lab that lives in git (lab.npx.yml + one .cfg file per device + a README), Claude connected without write access unless you grant it, and two devices with the same MAC address (a device's unique network ID) found in under 2 seconds, with no AI involved.
1. Pull a lab into a git folder
netplex login netplex lab pull <lab-id> my-lab/ cd my-lab && git init && git add . && git commit -m "baseline"
You now have lab.npx.yml (diffable YAML topology), configs/r1.cfg (one plain-text file per device), .netplex/source.json, and a README. Edit a config file in any editor - git diff shows the lines that changed, not a blob.
2. Preview before you touch anything
netplex lab plan my-lab/ # never writes anything - shows adds/changes/deletes, what restarts, what's destructive netplex lab push my-lab/ # applies the SAME plan you just reviewed, by hash
3. Connect Claude
In Studio: Settings → Connect Claude Desktop (or Claude Code, or any other MCP-compatible client - one click generates a config snippet; Claude Code is the only client we've actually tested end to end, the rest - including Cursor and Copilot - should work the same way but haven't been individually verified). This mints a scoped MCP token and copies a ready-to-paste config snippet to your clipboard. Your agent now has 80+ MCP tools (beta) - the real, current count in the shipped MCP server, not a marketing figure.
4. Ask before it changes anything
Settings → AI change approvals (or per-lab from the lab's menu) sets the policy: ask (default - any AI-driven write pauses for your approval, a bell in Studio or a prompt in VS Code), allow (writes without asking, still logged and revertible via plan), or deny (no writes at all). netplex. itself enforces this, not the AI tool, so no tool can skip it.
5. Find a real bug without an LLM
curl -s $NETPLEX_URL/api/v1/labs/<lab-id>/lint | jq .findings
Or the Studio Health tab, or ask Claude to call the lint_lab tool - same check either way. Measured, not claimed: seeding two nodes with the same MAC and calling this endpoint returns the finding in seconds, end to end over the real API (live-timed, September 2026). The check itself runs in under a millisecond; the rest is ordinary network latency, because there is no AI in this path.
6. Ask Claude to verify the lab, read-only
With the policy from step 4 set to deny or ask, prompt your connected Claude: "Using live access, verify this lab and look for anomalies. Do not change anything." Claude typically calls lint_lab first, then the read-only show/get_mac_table tools to confirm on the live device - never a mutating tool, because the read-only tools hold no write capability at all, regardless of policy. Afterward: the lab's revision counter is unchanged, and zero rows appear under AI change approvals - the AI never needed to ask.
The questions people actually ask:
- Does it work with any LLM, or just one vendor's? Any MCP client, in principle. Claude Code and Qwen Code are the only ones we've actually tested end to end; others should work the same way but aren't individually verified yet.
- Is there a maintained MCP server I can run? Yes - shipped and versioned.
- Can it deploy AND destroy from declarative YAML? Yes - hash-locked
plan/apply, andapplyof an empty topology is a real destroy. - Is there training or docs? This page.