Skip to main content

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

Metadata

Release files for mcnanovna 2026.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcnanovna 2026.2.1
File Size Uploaded Provenance
mcnanovna-2026.2.1.tar.gz 27.6 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcnanovna 2026.2.1
File Interpreter ABI Platform
mcnanovna-2026.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 MB

Release files / mcnanovna-2026.2.1.tar.gz

Download URL mcnanovna-2026.2.1.tar.gz
Size 27.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b96411df1b2249a0ff2700ab06d0330a0201bc01e66a5d4d59e4827e234f31b4
BLAKE2b-256 checksum
How to use checksums
b78a7108202345f0cd9087bbb6e53990ef89b4123eacbf93b06bf60440825dcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / mcnanovna-2026.2.1-py3-none-any.whl

Download URL mcnanovna-2026.2.1-py3-none-any.whl
Size 218.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eeb3bf6172b031531b16834f2d84b37cd4893055ec1dd4620165ed69014ea31f
BLAKE2b-256 checksum
How to use checksums
0a752c08e24178c3d044883f2ef12a75c25dd48e954b322cfd9b2ff51bd0721e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for mcnanovna 2026.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

2026.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page