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:
scope_scan— auto-detect LeCroy scopes on the local networkscope_list_resources— list all VISA resources (LAN + USB)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.
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-pybackend — 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lecroy_mcp-0.1.6.tar.gz.
File metadata
- Download URL: lecroy_mcp-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b13af6155cd7509cbc5f1b8eec57375be94979ba7a9295691cb04231a274e084
|
|
| MD5 |
86aa42461a7258981341d75c2a40e6ad
|
|
| BLAKE2b-256 |
540ff0fc0ae1a1c90aacd7eeb4fd81b71051edbf3c0919e937304929e5f78dd0
|
Provenance
The following attestation bundles were made for lecroy_mcp-0.1.6.tar.gz:
Publisher:
release.yml on lucasgerads/lecroy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lecroy_mcp-0.1.6.tar.gz -
Subject digest:
b13af6155cd7509cbc5f1b8eec57375be94979ba7a9295691cb04231a274e084 - Sigstore transparency entry: 1235067972
- Sigstore integration time:
-
Permalink:
lucasgerads/lecroy-mcp@a8dfea21f50a76aabf46fe6cb0e03ae9b9158210 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lucasgerads
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a8dfea21f50a76aabf46fe6cb0e03ae9b9158210 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lecroy_mcp-0.1.6-py3-none-any.whl.
File metadata
- Download URL: lecroy_mcp-0.1.6-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
517a8012f545dc3aa5d7b30285ffcec39eb9f19343cfdfc72cb905fabe5b9cc4
|
|
| MD5 |
1d070c3772240576c9b5bae3da0346f2
|
|
| BLAKE2b-256 |
25f9fd080a431d090706d049e386510f54a0ba32ebec7c91840a3cac27f6a2ab
|
Provenance
The following attestation bundles were made for lecroy_mcp-0.1.6-py3-none-any.whl:
Publisher:
release.yml on lucasgerads/lecroy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lecroy_mcp-0.1.6-py3-none-any.whl -
Subject digest:
517a8012f545dc3aa5d7b30285ffcec39eb9f19343cfdfc72cb905fabe5b9cc4 - Sigstore transparency entry: 1235067978
- Sigstore integration time:
-
Permalink:
lucasgerads/lecroy-mcp@a8dfea21f50a76aabf46fe6cb0e03ae9b9158210 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lucasgerads
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a8dfea21f50a76aabf46fe6cb0e03ae9b9158210 -
Trigger Event:
push
-
Statement type: