PicoScope MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PicoScope MCP Server measure the frequency on channel A"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PicoScope MCP Server
A STDIO MCP server that enables LLMs like Claude to interact with PicoScope oscilloscopes for signal acquisition, measurement, and analysis. Built with FastMCP and the official PicoSDK Python bindings.
Features
Device Management: Auto-discover and connect to PicoScope devices
Channel Configuration: Set voltage ranges, coupling, and offsets
Data Acquisition: Block capture and streaming modes
Triggering: Simple and advanced trigger configurations
Measurements: Frequency, amplitude, rise time, FFT, THD, and more
Signal Generation: Control built-in arbitrary waveform generator
AI-Native: Designed for natural language control via Claude and other LLMs
Related MCP server: niscope-mcp
Quick Start
# Clone the repository
git clone https://github.com/markuskreitzer/picoscope_mcp.git
cd picoscope_mcp
# Install dependencies (requires uv package manager)
uv sync
# Run the MCP server
uv run picoscope-mcpThe server runs in STDIO mode and is ready to communicate with MCP clients like Claude Desktop.
Installation
Prerequisites
PicoSDK C Libraries (required for hardware operation)
Windows: Download from PicoTech Downloads
macOS: Download PicoScope software package
Linux: Install via package manager:
# Ubuntu/Debian sudo apt-get install libps5000a libps4000a libps3000a libps2000a
Python 3.11+ with uv package manager
Install Dependencies
# Clone or navigate to the project directory
cd picoscope_mcp
# Install dependencies
uv syncUsage
Running the Server
uv run picoscope-mcpThe server runs in STDIO mode, communicating via standard input/output for use with MCP-compatible clients.
Using with Claude Desktop
Add this configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"picoscope": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/picoscope_mcp",
"run",
"picoscope-mcp"
]
}
}
}Restart Claude Desktop, and you'll see the PicoScope tools available in the MCP menu.
Testing Without Hardware
The server will run even without PicoScope hardware connected, though device operations will fail until:
PicoSDK C libraries are installed
A PicoScope device is connected
MCP Tools
Discovery & Connection
Tool | Description |
| Find all connected PicoScope devices |
| Connect to a specific device (by serial) or first available |
| Get details about connected device |
| Disconnect from current device |
Channel Configuration
Tool | Description |
| Set channel parameters (range, coupling, offset) |
| Query current channel settings |
| Configure sampling rate (informational) |
Triggering
Tool | Description |
| Configure edge trigger (rising/falling/both) |
Data Acquisition
Tool | Description |
| Single snapshot capture with pre/post trigger samples |
| Begin continuous data capture |
| End streaming mode |
| Retrieve latest streaming data |
Analysis
Tool | Description |
| Calculate signal frequency |
| Measure voltage (pk-pk, RMS, etc.) |
| Edge timing analysis |
| Pulse characteristics |
| Frequency domain analysis |
| Signal statistics (min/max/mean/std) |
| Total Harmonic Distortion |
Advanced
Tool | Description |
| Configure AWG output |
| Disable signal generator |
| Channel operations (A+B, A-B, etc.) |
| Save data to file (CSV/JSON/NumPy) |
| Set downsampling mode |
Example Usage with Claude
User: "Connect to the first PicoScope and measure the frequency on channel A"
Claude calls:
1. list_devices() -> finds available devices
2. connect_device() -> connects to first device
3. configure_channel(channel="A", enabled=true, voltage_range=5.0) -> enables channel A
4. set_simple_trigger(source="A", threshold_mv=0) -> sets auto-trigger
5. capture_block(pre_trigger_samples=1000, post_trigger_samples=1000) -> captures waveform
6. Returns captured data with time and voltage values
User can then analyze the returned data for frequency, or request additional captures.Configuration
Typical Workflow
Connect:
connect_device()Configure Channels:
configure_channel()for each channelSet Trigger:
set_simple_trigger()Capture:
capture_block()orstart_streaming()Analyze: Use measurement tools on captured data
Supported Hardware
PS5000A Series (primary support)
PS2000/3000/4000/6000 Series (planned)
Currently optimized for PS5000A. Other series will require device-specific implementations.
Development
Project Structure
picoscope_mcp/
├── src/picoscope_mcp/
│ ├── server.py # FastMCP server
│ ├── device_manager.py # Device abstraction
│ ├── models.py # Data structures
│ ├── utils.py # Helper functions
│ └── tools/ # MCP tool implementations
│ ├── discovery.py
│ ├── configuration.py
│ ├── acquisition.py
│ ├── analysis.py
│ └── advanced.py
└── tests/
└── test_tools.pyRunning Tests
uv run pytestAdding Support for New Device Series
Update
device_manager.pyto detect device seriesImport appropriate picosdk module (e.g.,
ps3000a)Map device-specific constants and API calls
Handle series-specific capabilities
Troubleshooting
"PicoSDK not found" Error
Install PicoSDK C libraries for your platform (see Prerequisites).
"No device connected" Errors
Ensure PicoScope is connected via USB
Check device appears in system (Windows Device Manager, macOS System Information, Linux
lsusb)Verify PicoSDK drivers are installed
Try reconnecting the device
Channel Configuration Fails
Check voltage range is supported: 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20V
Verify channel exists (A-D for 4-channel models)
Capture Timeout
Ensure trigger settings are appropriate for signal
Try increasing auto-trigger timeout
Check signal is within configured voltage range
Roadmap
Phase 1: Foundation - Device discovery, connection, PS5000A support
Phase 2: Advanced acquisition - Streaming mode, advanced triggers
Phase 3: Multi-device support - PS2000/3000/4000/6000 series
Phase 4: Enhanced analysis - Real-time FFT, automated characterization
Phase 5: Visualization - Web dashboard for waveform viewing
See PROJECT_PLAN.md for detailed architecture and development plans.
Contributing
Contributions are welcome! This project is in active development.
How to Contribute
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Setup
# Clone your fork
git clone https://github.com/YOUR_USERNAME/picoscope_mcp.git
cd picoscope_mcp
# Install dependencies including dev tools
uv sync
# Run tests
uv run pytestAreas for Contribution
Support for additional PicoScope series (PS2000, PS3000, PS4000, PS6000)
Streaming mode implementation
Advanced trigger modes (pulse width, window, logic)
Additional measurement algorithms
Documentation and examples
Test coverage
Bug reports and fixes
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Note: This license allows commercial use but requires derivative works to remain open source under GPLv3.
Acknowledgments
Pico Technology for the PicoSDK Python wrappers
Anthropic for the Model Context Protocol
Jeff Lowin for FastMCP
The open source community
References
Contact
Issues: GitHub Issues
Discussions: GitHub Discussions
Available Tools
24 toolscapture_blockB
Capture a single block of data.
Args: pre_trigger_samples: Number of samples before trigger. post_trigger_samples: Number of samples after trigger.
Returns: Dictionary containing captured waveform data for all enabled channels.
Inputs: pre_trigger_samples, post_trigger_samples. Returns: object
compute_fftC
Compute FFT (Fast Fourier Transform) for frequency domain analysis.
Args: channel: Channel to analyze. window: Window function to apply.
Returns: Dictionary containing frequency bins and magnitude spectrum.
Inputs: channel (required), window. Returns: object
configure_channelB
Configure a channel on the oscilloscope.
Args: channel: Channel identifier (A, B, C, or D). enabled: Whether the channel is enabled. coupling: AC or DC coupling. voltage_range: Voltage range in volts (e.g., 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20). analog_offset: DC offset voltage in volts.
Returns: Dictionary containing configuration status and applied settings.
Inputs: channel (required), enabled, coupling, voltage_range, +1 more. Returns: object
configure_downsamplingC
Configure downsampling for data acquisition.
Args: mode: Downsampling mode. ratio: Downsampling ratio (1 = no downsampling).
Returns: Dictionary containing downsampling configuration.
Inputs: mode, ratio. Returns: object
configure_math_channelC
Configure a math channel (channel operations).
Args: operation: Mathematical operation to perform. channel_a: First channel. channel_b: Second channel.
Returns: Dictionary containing math channel configuration.
Inputs: operation, channel_a, channel_b. Returns: object
connect_deviceB
Connect to a specific PicoScope device.
Args: serial: Device serial number. If empty, connects to first available device.
Returns: Dictionary containing connection status and device information.
Inputs: serial. Returns: object
disconnect_deviceB
Disconnect from the currently connected PicoScope device.
Returns: Dictionary containing disconnection status.
Inputs: no named parameters. Returns: object
export_waveformC
Export captured waveform data to file.
Args: format: Export format (csv, json, or numpy). channels: List of channels to export. filename: Output filename (without extension).
Returns: Dictionary containing export status and file path.
Inputs: format, channels, filename. Returns: object
get_channel_configB
Get current configuration of a channel.
Args: channel: Channel identifier (A, B, C, or D).
Returns: Dictionary containing current channel settings.
Inputs: channel (required). Returns: object
get_device_infoA
Get detailed information about the currently connected device.
Returns: Dictionary containing device model, serial, variant, capabilities, etc.
Inputs: no named parameters. Returns: object
get_statisticsB
Get statistical analysis of signal.
Args: channel: Channel to analyze. num_samples: Number of samples to analyze.
Returns: Dictionary containing min, max, mean, std dev, etc.
Inputs: channel (required), num_samples. Returns: object
get_streaming_dataC
Get latest streaming data.
Args: max_samples: Maximum number of samples to retrieve.
Returns: Dictionary containing latest streaming data for enabled channels.
Inputs: max_samples. Returns: object
list_devicesB
List all connected PicoScope devices.
Returns: Dictionary containing list of discovered devices with their info.
Inputs: no named parameters. Returns: object
measure_amplitudeA
Measure signal amplitude on a channel.
Note: This requires a recent capture. Call capture_block first.
Args: channel: Channel to measure. measurement_type: Type of amplitude measurement.
Returns: Dictionary containing amplitude in volts and measurement type.
Inputs: channel (required), measurement_type. Returns: object
measure_frequencyA
Measure signal frequency on a channel.
Note: This requires a recent capture. Call capture_block first.
Args: channel: Channel to measure.
Returns: Dictionary containing frequency in Hz and measurement details.
Inputs: channel (required). Returns: object
measure_pulse_widthC
Measure pulse width at specified threshold.
Args: channel: Channel to measure. threshold_percent: Threshold percentage for pulse measurement (0-100).
Returns: Dictionary containing pulse width in seconds.
Inputs: channel (required), threshold_percent. Returns: object
measure_rise_timeA
Measure signal rise time (10% to 90% by default).
Args: channel: Channel to measure. low_threshold_percent: Lower threshold percentage (0-100). high_threshold_percent: Upper threshold percentage (0-100).
Returns: Dictionary containing rise time in seconds.
Inputs: channel (required), low_threshold_percent, high_threshold_percent. Returns: object
measure_thdC
Measure Total Harmonic Distortion (THD).
Args: channel: Channel to measure.
Returns: Dictionary containing THD percentage and harmonic components.
Inputs: channel (required). Returns: object
set_signal_generatorB
Configure the built-in signal generator (AWG).
Args: waveform_type: Type of waveform to generate. frequency_hz: Frequency in Hz. amplitude_mv: Peak-to-peak amplitude in millivolts. offset_mv: DC offset in millivolts.
Returns: Dictionary containing signal generator status and configuration.
Inputs: waveform_type, frequency_hz, amplitude_mv, offset_mv. Returns: object
set_simple_triggerA
Set up a simple edge trigger.
Args: source: Trigger source channel or external. threshold_mv: Trigger threshold in millivolts. direction: Trigger on rising, falling, or either edge. auto_trigger_ms: Auto-trigger timeout in milliseconds (0 = disabled).
Returns: Dictionary containing trigger configuration status.
Inputs: source (required), threshold_mv (required), direction, auto_trigger_ms. Returns: object
set_timebaseA
Set the timebase (sampling rate) for data acquisition.
Note: The actual timebase is determined during block capture based on the requested number of samples. This tool is informational.
Args: sample_interval_ns: Desired sample interval in nanoseconds. num_samples: Number of samples to capture.
Returns: Dictionary containing timebase information.
Inputs: sample_interval_ns (required), num_samples (required). Returns: object
start_streamingB
Start streaming data acquisition.
Args: sample_interval_ns: Sample interval in nanoseconds. buffer_size: Size of streaming buffer. auto_stop: Whether to automatically stop after max_samples. max_samples: Maximum samples to capture (0 = continuous).
Returns: Dictionary containing streaming status and configuration.
Inputs: sample_interval_ns (required), buffer_size, auto_stop, max_samples. Returns: object
stop_signal_generatorB
Stop the signal generator output.
Returns: Dictionary containing status of signal generator.
Inputs: no named parameters. Returns: object
stop_streamingB
Stop streaming data acquisition.
Returns: Dictionary containing stop status and summary of captured data.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have distinct purposes with clear boundaries, such as capture_block for data acquisition and compute_fft for frequency analysis. However, some measurement tools like measure_amplitude and measure_frequency could be confused as they both rely on a prior capture and target similar signal characteristics, though their specific functions differ.
Tool names follow a highly consistent verb_noun pattern throughout, such as configure_channel, get_device_info, and measure_amplitude. All tools use snake_case with clear, descriptive verbs, making the set predictable and easy to navigate without any deviations in style.
With 24 tools, the count is borderline high for an oscilloscope server, potentially overwhelming for agents. While it covers many functions like configuration, measurement, and data handling, it might benefit from consolidation or categorization to reduce complexity, though it's not extreme.
The tool set provides comprehensive coverage for oscilloscope operations, including device connection, channel configuration, data capture (block and streaming), signal analysis (FFT, statistics), measurements (amplitude, frequency, THD), and auxiliary functions like signal generation and export. No obvious gaps are present, supporting full lifecycle management.
Maintenance
Related MCP Connectors
Create RF signal projects from prompts, inspect graphs, and export IQ data.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Generate contextual prompts and reusable agent skills, evaluate prompts with the 16-dimension Prompt Score, and manage saved work in PromptDrive. Twelve MCP tools also provide authorized access to private Memory for source-grounded answers. Connect over Streamable HTTP using OAuth 2.1 and PKCE. Generation consumes account quota and automatically saves successful results; Memory access follows account permissions and plan limits.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables remote control of LeCroy oscilloscopes via SCPI commands over LAN to perform waveform capture, screenshots, measurements, channel configuration, and triggering through natural language. Supports multiple LeCroy models including WaveSurfer, HDO, WaveRunner, and WavePro series with automatic model detection.4811AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly control NI oscilloscopes (e.g., PXIe-5160/5164/5110) through the Model Context Protocol, including waveform acquisition, measurement, and configuration.MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to control a PicoScope 5000A USB oscilloscope for signal generation, block capture, measurements, and frequency response sweeps.1MIT
- AlicenseAqualityBmaintenanceEnables LLMs to control RIGOL oscilloscopes over SCPI via LAN or USB, including configuring channels/timebase/trigger, taking measurements, capturing waveforms and screenshots, decoding serial protocols, running FFT analysis, and controlling the built-in AFG.38MIT