The idea
Everybody's wiring LLMs to instruments by handing them a raw SCPI socket and hoping for the best — which is like giving someone the scope's keyboard shortcuts and calling them an EE. scpi-mcp takes the opposite approach: it gives an AI agent oscilloscope expertise through goal-level tools — "capture this signal," "measure that," "characterize this channel," "arm a single-shot" — backed by a clean, instrument-agnostic interface. All the vendor SCPI lives in the instrument library; the agent never touches a raw command string. There is deliberately no raw-SCPI escape hatch, plus a permission-tier system (read_only / read_config / full) where the server refuses unsafe actions — the model never decides.
First instrument on the bench: a Rigol DS1054Z (unlocked to the DS1104Z base — 4 channels, 100 MHz), reachable over LAN.
The demo: hunting a bare-coil flyback
The best way to show a tool works is to do real work with it, so I ran a live inductive-kickback experiment and let the agent drive the scope the whole way. The setup: a 24 V relay coil with the freewheel diode removed — a bare inductor. Two 10x probes straddling the disconnect, CH1 on the supply side, CH2 on the coil side. The plan: break the circuit and catch the unclamped kick on a single-shot.
What actually happened is the fun part, because it's exactly the fiddly loop a human hates:
- Characterized both channels — confirmed ~24 V DC on each, then noticed CH1's trace had "vanished." It hadn't: both channels sat at the same voltage with identical settings, so the traces overlapped pixel-for-pixel. Nudged the display offsets apart and there they both were.
- Chased down noise — ~6 Vpp of hash on the rail. An FFT showed the energy piling up at the Nyquist edge no matter how fast we sampled: the tell-tale of high-frequency switch-mode-supply ripple aliasing into a slow, fake wander. A 100 nF cap across the supply knocked it down ~5x.
- Got the disconnect right — pulling from the minus side of the bulk caps took the capacitance out of the loop, so the collapsing field had nothing to absorb it and rang free.
- Cleared the clipping — the first single-shots railed the window: the kick blew past ±130 V, then −304 V. Step the vertical coarser... 50 V/div, still clipping... 100 V/div — there it is.
The payoff: an unclamped −436 V spike with a +240 V positive overshoot — a ~676 Vpp ring off a 24 V rail, roughly 18× the supply, then an exponential bleed-back over ~1 ms. For contrast, with the freewheel diode installed, the same coil clamps to a tidy ~24.7 V. That's the whole point of the diode in one screen.
Throughout, the agent did the tedious instrument-wrangling — rescale, re-trigger, de-noise, re-arm, grab the screen, dump the waveforms to CSV — while I did the wiring and the thinking. That division of labor is the pitch.
Rigor: a full 4-channel validation
Beyond the flyback, the agent ran a blind 4-channel validation of the scope: characterize each channel to lay down an expected baseline, then take an independent measurement snapshot and grade measured against it — 17/17 pass across frequency, period, Vpp, Vrms and duty (with a widened tolerance on the mains channel, whose line frequency legitimately wanders). The methods/results log and the Expected-vs-Measured spreadsheet are attached under Files.
Skippi
The project has a mascot: Skippi, the artistic gremlin who lives in the scope and paints portraits of the magic pixies — the ones who carry every electron down the probe. When you see a clean trace, that's Skippi's latest masterpiece.
Links
Code, mock backend (zero-hardware), and the full write-up: github.com/armchairdeity/mcp-server-scpi
jrypkahauer
Yann Guidon / YGDES
Paul McClay
Sebastian
lion mclionhead