mcnanovna Overview
mcnanovna gives Claude direct control of NanoVNA-H vector network analyzers over USB serial. It exposes 78 MCP tools for frequency sweeps, S-parameter measurements, calibration, LCD capture, RF analysis, and 3D antenna radiation pattern visualization.
Capabilities
Measurement
- Frequency sweeps with configurable start/stop/points
- S11 (reflection) and S21 (transmission) measurements
- Marker-based frequency analysis
- Real-time data streaming
Calibration
- Full SOLT calibration workflow
- Save/recall calibration to device flash
- Calibration status verification
Analysis
- SWR, return loss, impedance calculations
- Filter characterization (cutoffs, bandwidth, Q)
- Crystal parameter extraction
- TDR (time domain reflectometry)
- L/C component identification
- Impedance matching network design
Radiation Patterns
- Analytical 3D patterns from S11 data
- Support for dipole, monopole, EFHW, loop, patch antennas
- Pattern import from CSV, EMCAR, NEC2, Touchstone S1P
- Optional Three.js web viewer
Supported Hardware
| Device | Frequency Range | Notes |
|---|---|---|
| NanoVNA-H | 50 kHz - 900 MHz | Original hardware |
| NanoVNA-H4 | 50 kHz - 1.5 GHz | Extended range |
Architecture
┌─────────────────────────────────────────────────────────┐│ Claude Code ││ │ ││ MCP Protocol ││ ▼ ││ ┌─────────────────────────────────────────────────┐ ││ │ mcnanovna server │ ││ │ ┌─────────┐ ┌────────────┐ ┌─────────────┐ │ ││ │ │ tools/ │ │ protocol.py│ │calculations │ │ ││ │ │ 8 mixins│ │ USB serial│ │ S-param │ │ ││ │ └────┬────┘ └─────┬──────┘ │ math │ │ ││ │ │ │ └─────────────┘ │ ││ │ ▼ ▼ │ ││ │ ┌──────────────────────────────────────────┐ │ ││ │ │ NanoVNA class │ │ ││ │ │ (connection lifecycle, auto-reconnect) │ │ ││ │ └──────────────────────────────────────────┘ │ ││ └─────────────────────────────────────────────────┘ ││ │ ││ USB Serial ││ ▼ ││ ┌──────────────────┐ ││ │ NanoVNA-H │ ││ └──────────────────┘ │└─────────────────────────────────────────────────────────┘Connection Lifecycle
- First tool call: Auto-discovers USB device, opens serial at 115200 baud
- Idle < 30s: Trusts existing connection
- Idle ≥ 30s: Sends sync probe to validate; reconnects on failure
- Retry: 2 attempts with 300ms delay on cold/stale ports
No manual connect/disconnect needed—the server manages the connection automatically.