Skip to main content

MCP server for NanoVNA-H vector network analyzers

Project description

mcnanovna

MCP server for controlling NanoVNA-H vector network analyzers over USB serial.

Provides 78 tools for frequency sweeps, S-parameter measurements, calibration, LCD capture, RF analysis, 3D antenna radiation pattern visualization, and pattern import from external files.

Installation

# From PyPI (when published)
uvx mcnanovna

# From source
uv run mcnanovna

# With optional web UI for 3D pattern visualization
uv sync --extra webui
MCNANOVNA_WEB_PORT=8080 uv run mcnanovna

Quick Start

Just plug in your NanoVNA-H and start the server. The device auto-connects on first tool call.

# Add to Claude Code
claude mcp add mcnanovna -- uvx mcnanovna

Then ask Claude to scan your antenna, analyze a filter, or measure a crystal.

Tools

Measurement

info, sweep, scan, data, frequencies, marker, cal, save, recall, pause, resume

Configuration

power, bandwidth, edelay, s21offset, vbat, capture, measure, config, saveconfig, clearconfig, color, freq, tcxo, vbat_offset, threshold

Display

trace, transform, smooth, touchcal, touchtest, refresh, touch, release

Device

reset, version, detect, disconnect, raw_command, cw, sd_list, sd_read, sd_delete, time

Diagnostics

i2c, si, lcd, threads, stat, sample, test, gain, dump, port, offset, dac, usart_cfg, usart, band

Analysis

analyze, export_touchstone, export_csv, analyze_filter, analyze_xtal, analyze_tdr, analyze_component, analyze_lc_series, analyze_lc_shunt, analyze_lc_match, analyze_s11_resonance

Radiation Patterns

radiation_pattern, radiation_pattern_from_data, radiation_pattern_multi

Pattern Import

import_pattern_csv, import_pattern_emcar, import_pattern_nec2, import_pattern_s1p, list_pattern_formats

Prompts

Prompt Description
calibrate SOLT calibration walkthrough
export_touchstone S-parameter export to .s1p/.s2p
analyze_antenna SWR, impedance, bandwidth analysis
measure_cable TDR and cable characterization
analyze_crystal Crystal motional parameter extraction
analyze_filter_response Filter type classification and cutoffs
measure_tdr Time domain reflectometry
compare_sweeps Before/after comparison
measure_component Unknown L/C/R identification
measure_lc_series Series LC resonator measurement
measure_lc_shunt Shunt LC resonator measurement
impedance_match L-network matching design
visualize_radiation_pattern 3D pattern from S11 scan
import_pattern Load patterns from CSV/EMCAR/NEC2/S1P
measure_antenna_range Automated 3D pattern with positioner

Web UI

Enable the optional 3D radiation pattern viewer:

uv sync --extra webui
MCNANOVNA_WEB_PORT=8080 uv run mcnanovna

Open http://localhost:8080 for an interactive Three.js visualization of antenna patterns.

Antenna Positioner Integration

For automated 3D pattern measurement, use together with mcpositioner:

claude mcp add mcpositioner -- uvx mcpositioner
claude mcp add mcnanovna -- uvx mcnanovna

The measure_antenna_range prompt guides through the cross-server workflow.

Supported Hardware

  • NanoVNA-H (original)
  • NanoVNA-H4
  • Other variants using the same USB serial protocol (VID 0x0483, PID 0x5740)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcnanovna-2026.2.1.tar.gz (27.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcnanovna-2026.2.1-py3-none-any.whl (218.6 kB view details)

Uploaded Python 3

File details

Details for the file mcnanovna-2026.2.1.tar.gz.

File metadata

  • Download URL: mcnanovna-2026.2.1.tar.gz
  • Upload date:
  • Size: 27.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcnanovna-2026.2.1.tar.gz
Algorithm Hash digest
SHA256 b96411df1b2249a0ff2700ab06d0330a0201bc01e66a5d4d59e4827e234f31b4
MD5 07b109260993c8a833f59772ccd76c6e
BLAKE2b-256 b78a7108202345f0cd9087bbb6e53990ef89b4123eacbf93b06bf60440825dcd

See more details on using hashes here.

File details

Details for the file mcnanovna-2026.2.1-py3-none-any.whl.

File metadata

  • Download URL: mcnanovna-2026.2.1-py3-none-any.whl
  • Upload date:
  • Size: 218.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcnanovna-2026.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb3bf6172b031531b16834f2d84b37cd4893055ec1dd4620165ed69014ea31f
MD5 3276772dc89a8b40272382a15d97435a
BLAKE2b-256 0a752c08e24178c3d044883f2ef12a75c25dd48e954b322cfd9b2ff51bd0721e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page