Skip to content

mcnanovna Overview

mcnanovna gives LLMs direct control of NanoVNA-H vector network analyzers over USB serial. It exposes 91 MCP tools for frequency sweeps, S-parameter measurements, calibration, LCD capture, RF analysis, 3D antenna radiation pattern visualization, and multi-VNA coordination.

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

Multi-VNA Coordination

  • Control multiple NanoVNA devices simultaneously
  • Three synchronization tiers with increasing precision
  • Device targeting via optional device_id parameter on all tools
  • Automatic sync method selection with coordinated_sweep
TierMethodPrecisionRequirements
1Software±2-5msNone (stock firmware)
2Hardware Trigger±10-50µsCustom firmware + trigger wire
3Phase Coherent±1°External clock + Tier 2

See Multi-VNA Coordination for detailed tier comparison and workflow guides.

Supported Hardware

DeviceFrequency RangeNotes
NanoVNA-H50 kHz - 900 MHzOriginal hardware
NanoVNA-H450 kHz - 1.5 GHzExtended range
NanoVNA-F50 kHz - 1.5 GHzShielded enclosure, larger screen

Architecture

┌─────────────────────────────────────────────────────────┐
│ MCP Client │
│ │ │
│ MCP Protocol │
│ ▼ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ mcnanovna server │ │
│ │ ┌─────────┐ ┌────────────┐ ┌─────────────┐ │ │
│ │ │ tools/ │ │ protocol.py│ │calculations │ │ │
│ │ │ 9 mixins│ │ USB serial│ │ S-param │ │ │
│ │ └────┬────┘ └─────┬──────┘ │ math │ │ │
│ │ │ │ └─────────────┘ │ │
│ │ ▼ ▼ │ │
│ │ ┌──────────────────────────────────────────┐ │ │
│ │ │ DeviceRegistry (multi-VNA) │ │ │
│ │ │ ┌────────────┐ ┌────────────┐ │ │ │
│ │ │ │ NanoVNA #1 │ ... │ NanoVNA #N │ │ │ │
│ │ │ └────────────┘ └────────────┘ │ │ │
│ │ └──────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────┘ │
│ │ │
│ USB Serial │
│ ▼ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ NanoVNA-H #1 │...│ NanoVNA-H #N │ │
│ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────┘

Connection Lifecycle

  1. First tool call: Auto-discovers USB device, opens serial at 115200 baud
  2. Idle < 30s: Trusts existing connection
  3. Idle ≥ 30s: Sends sync probe to validate; reconnects on failure
  4. Retry: 2 attempts with 300ms delay on cold/stale ports

No manual connect/disconnect needed—the server manages the connection automatically.