Skip to main content

MCP server for controlling LeCroy oscilloscopes via SCPI/VXI-11

Project description

lecroy-mcp

MCP server for controlling LeCroy oscilloscopes via SCPI over LAN (VXI-11) or USB. Tested on a WaveSurfer 3024Z with MAUI firmware.

Requirements

  • uv installed
  • A LeCroy oscilloscope connected over LAN or USB

MCP configuration

Add to your MCP client config (e.g. Claude Code's .mcp.json):

{
  "mcpServers": {
    "lecroy-scope": {
      "type": "stdio",
      "command": "uvx",
      "args": ["lecroy-mcp"],
      "env": { "PYTHONUNBUFFERED": "1" }
    }
  }
}

uvx will automatically download and run the server — no manual installation needed.

Connection options

Option 1 — Pre-configure the IP address (recommended for LAN)

Set LECROY_HOST in the env block and the server auto-connects on startup:

"env": {
  "PYTHONUNBUFFERED": "1",
  "LECROY_HOST": "192.168.1.111"
}

Option 2 — Pre-configure a full resource string (LAN or USB)

Use LECROY_RESOURCE for full control, including USB connections:

"env": {
  "PYTHONUNBUFFERED": "1",
  "LECROY_RESOURCE": "USB0::0x05FF::0x1023::12345::INSTR"
}

Option 3 — Manual connection

Leave the env block as-is and connect from within the MCP session:

  1. scope_scan — auto-detect LeCroy scopes on the local network
  2. scope_list_resources — list all VISA resources (LAN + USB)
  3. scope_connect("TCPIP0::192.168.1.111::inst0::INSTR") — connect directly

Optionally set LECROY_SUBNET to hint the scan range:

"env": {
  "PYTHONUNBUFFERED": "1",
  "LECROY_SUBNET": "192.168.1.0/24"
}

Usage

Once connected, you have tools for:

  • Channel setup (scale, offset, coupling, bandwidth limit)
  • Trigger configuration (mode, source, level, edge)
  • Timebase and memory depth
  • Automated measurements (PKPK, FREQ, RMS, RISE, DUTY, etc.)
  • Waveform capture (JSON or CSV)
  • Screenshots
  • Math functions (FFT, INTG, DIFF, etc.)
  • WaveSource built-in generator (WaveSurfer 3000Z and similar)

Supported models

The server detects the connected model and adjusts commands accordingly. Profiles are included for:

  • WaveSurfer 3000Z / 4000HD
  • HDO4000A / HDO6000B / HDO8000A
  • WaveRunner 6000 / 8000
  • WavePro HD
  • MDA800A, SDA

Unknown models fall back to conservative defaults.

Updating

With uvx, use the @latest tag to force the newest version:

uvx lecroy-mcp@latest

Or update the args in your .mcp.json to always pull the latest:

"args": ["lecroy-mcp@latest"]

With pip:

pip install --upgrade lecroy-mcp

Manual installation

If you prefer not to use uvx:

pip install lecroy-mcp

Then use lecroy-mcp as the command in your MCP config instead of uvx lecroy-mcp.

Notes

  • Requires pyvisa-py backend — NI-VISA is not supported (breaks screenshot capture)
  • All VISA access is serialized via a threading lock; parallel MCP tool calls are safe

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

lecroy_mcp-0.1.7.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

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

lecroy_mcp-0.1.7-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file lecroy_mcp-0.1.7.tar.gz.

File metadata

  • Download URL: lecroy_mcp-0.1.7.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lecroy_mcp-0.1.7.tar.gz
Algorithm Hash digest
SHA256 6681be4fcaa5b81d5cf886dcc3631c51442c1efa71b6e9597e2e1bba02790e41
MD5 971aee60ecb861d9d87e6cd2de22ca91
BLAKE2b-256 2cc1c692b6a6b2f9ecf7f84580732c720a2c1effc24728608f80758c3742f92e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lecroy_mcp-0.1.7.tar.gz:

Publisher: release.yml on lucasgerads/lecroy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lecroy_mcp-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: lecroy_mcp-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lecroy_mcp-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d0eacc28a49aa8ed1fb542b23c3d2a796d21860c146b961da11ceddb7925ccb9
MD5 acadcdcf69221a85aa9102a232980b5a
BLAKE2b-256 c114a43965bcbebbaa21f188a8ae39057153219c5ba13664b1fea40d9ae2cdfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for lecroy_mcp-0.1.7-py3-none-any.whl:

Publisher: release.yml on lucasgerads/lecroy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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