Skip to main content

rs-scope-mcp

Let Claude drive your Rohde & Schwarz oscilloscope, and keep what it measures.

An MCP server that connects Claude (and other AI assistants) to a Rohde & Schwarz oscilloscope over the LAN. It controls the instrument through its complete SCPI command set and harvests the data: waveforms, logic channels, serial-bus decodes, Bode plots, FFTs, measurements, segmented history and screenshots, so Claude can analyse real numbers instead of guessing from a picture.

Part of the AE5VG amateur radio AI collection: https://ae5vg.com.

Supported instruments

Series Models Status
R&S RTB2 / RTB2000 RTB2002, RTB2004 Supported and bench-tested (RTB2004, firmware 03.000, all options)

The RTB2 is the rebranded RTB2000: identical hardware, a different enclosure color scheme, and firmware that runs on either, so both names are covered. The project is structured per instrument family (src/rs_scope_mcp/data/<family>/) so other R&S scopes can follow.

Independent project, not affiliated with or endorsed by Rohde & Schwarz. R&S and RTB2000 are trademarks of Rohde & Schwarz GmbH & Co. KG.

What you can ask

  • "Measure the frequency and peak-to-peak on channel 1, then show me the screen."
  • "Capture the I2C traffic on D0/D1 and list every address and byte."
  • "Sweep this filter from 100 Hz to 1 MHz and tell me the -3 dB points."
  • "Grab 40 single shots and find the one where the UART frame is corrupted."
  • "Check my CW keying waveform for clicks." (always through an attenuator or dummy load)

Built for three kinds of work: amateur radio bench tests, hardware reverse engineering, and microcontroller / embedded / drone development.

Status

Pre-alpha. In place and bench-tested:

  • Complete SCPI foundation: 748 documented command blocks (962 headers) from the manual, plus 415 undocumented command families the firmware reports. Every command is validated before it is sent.
  • Reliable sessions: rejected queries detected in about 2 ms (the instrument otherwise stays silent), the error queue read after every write, batching, and full-setup snapshot and restore.
  • Safety gate: generator and pattern outputs, Bode sweeps, resets, self-alignment, file deletion and network settings need explicit confirmation.
  • Task tools: capture (acquire and harvest analog channels, logic pods and bus decodes in one call), measure, spectrum, bode, history (walk segmented memory), data (drill into stored samples, edges and frames, or read-only SQL), setup (show, save, restore) and session.
  • Local data store: every capture is kept in RS_SCOPE_DATA_DIR (SQLite catalog plus sample files and the scope's own setup), so Claude gets a compact summary and asks for details only when needed.
  • Pass/fail testing and demo mode: mask learns a tolerance envelope from a good signal and counts failures (keeping only the failing acquisitions for analysis); demo plays a looping show of what the scope can do, analog only or with the logic probe (docs/DEMO.md).
  • Foundation tools: connection, scpi_search, scpi_describe, scpi, scpi_block, screenshot.
  • Simulator for tests and demos without hardware.

Next: publishing (GitHub, PyPI, MCP Registry) and the Field Guide. See docs/ARCHITECTURE.md.

Quick start

uv sync
uv run python -m rs_scope_mcp.sim --port 5025        # simulated scope, or use a real one
uv run rs-scope --host 127.0.0.1 idn
uv run rs-scope --host 127.0.0.1 query "CHAN1:SCAL?" "TIM:SCAL?"
uv run rs-scope search "i2c frame data"

Connect the real scope

On the scope: Menu, Setup, Interface, Ethernet, Parameter. Use DHCP or a fixed address and leave IP Port at 5025. The scope also announces itself over mDNS (_scpi-raw._tcp).

uv run rs-scope --host <scope-ip> idn
uv run rs-scope --host <scope-ip> screenshot scope.png
uv run rs-scope --host <scope-ip> tree-diff          # compare the registry with your firmware

Use it from Claude

{
  "mcpServers": {
    "rs-scope": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/rs-scope-mcp", "rs-scope-mcp"],
      "env": { "RS_SCOPE_HOST": "192.168.1.50" }
    }
  }
}

Settings: RS_SCOPE_HOST, RS_SCOPE_PORT (5025), RS_SCOPE_TIMEOUT (10 s), RS_SCOPE_DATA_DIR (~/rs-scope-data, where screenshots and captures are stored).

Skills

Four skills teach Claude how to work the bench with these tools (skills/, also as .skill files on the releases page):

Skill For
scope-operating Every session: leave the scope as found, safety, capture then analyze, trustworthy numbers
ham-bench Transmitter checks through attenuators: AM depth, CW keying and key clicks, SSB two-tone, harmonics, filter Bode sweeps
bus-reverse-engineering Unknown pins: levels, identify the protocol and rate, confirm with the decoder, census of addresses and commands
embedded-bringup Rails and ripple, sequencing and reset, clocks, PWM/servo/ESC, sensor buses, GPS/telemetry/RC links, intermittent faults, revision comparison

Documentation

The command registry is generated from your own copy of the R&S RTB2 user manual:

uv run --extra extract python scripts/extract_scpi.py "/path/to/R&S RTB2 User Manual.pdf"
uv run python scripts/gen_api_docs.py

License: free for hobbyists, licensed for business

Free for hobbyists. Personal use, amateur radio, education and nonprofit use are free under the PolyForm Noncommercial License 1.0.0. The source is open to read, change and share.

Commercial use needs a license. Any use by or for a business, including internal use on a company test bench, needs a commercial license. Support for more instruments, custom skills and integrations, and support plans are available too. See COMMERCIAL.md, and buy through Westlake Professionals: https://westlakeprofessionals.com.

Paid work is what keeps the free version going.

Metadata

Release files for rs-scope-mcp 0.1.3

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

Source distribution (sdist)

Source distribution for rs-scope-mcp 0.1.3
File Size Uploaded Provenance Actions
rs_scope_mcp-0.1.3.tar.gz 377.1 kB Without provenance Details for rs_scope_mcp-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rs-scope-mcp 0.1.3
File Interpreter ABI Platform Actions
rs_scope_mcp-0.1.3-py3-none-any.whl Python 3 none any Details for rs_scope_mcp-0.1.3-py3-none-any.whl

Total release size: 520.5 kB

Release files / rs_scope_mcp-0.1.3.tar.gz

Download URL rs_scope_mcp-0.1.3.tar.gz
Size 377.1 kB
Tags Source
SHA-256 checksum
How to use checksums
36bb389ede169051f183d127bda8cc828b33ed25e4a4145520097b1c1043af21
BLAKE2b-256 checksum
How to use checksums
485357b1855ddae4d6d63ab8ae1de05fa06347fd5c6464a3911a54ea95bf7291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / rs_scope_mcp-0.1.3-py3-none-any.whl

Download URL rs_scope_mcp-0.1.3-py3-none-any.whl
Size 143.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
479f47a8e9d10bbdf030ce4a62b7334a2c962560c1187734d81f36b8105b1d3a
BLAKE2b-256 checksum
How to use checksums
086517355ab4323593545624fc9c8150febf9a56bcd6af19a0dfbab3edb9c757
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for rs-scope-mcp 0.1.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 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