pico-mcp

pico-mcp

Enables LLMs to control a PicoScope 5000A USB oscilloscope for signal generation, block capture, measurements, and frequency response sweeps.

Category
访问服务器

README

pico-mcp

A lean MCP (Model Context Protocol) server for PicoScope 5000A USB oscilloscopes (developed and verified on a 5442B). It lets an LLM/agent drive the scope: discover the device, configure channels, run the built-in signal generator, capture blocks, take measurements, and sweep a frequency response.

Built because the existing third-party server was too buggy (a find_all_units() discovery that crashes the process on the ps6000a driver, ctypes.byref errors on GetUnitInfo, a device-handle leak, and an is_connected check on a field that is never set). This server talks to the ps5000a driver directly; every code path was verified against real hardware.

macOS Apple Silicon note (important)

The PicoSDK C libraries shipped inside PicoScope 7 T&M.app are x86_64. An arm64 Python cannot load them (dlopen … incompatible architecture). The fix: run the server in an x86_64 venv under Rosetta and point DYLD_LIBRARY_PATH at the app's libraries. On Windows/Linux with a natively installed PicoSDK this is not needed.

Setup

git clone https://github.com/Schimmilab/pico-mcp.git
cd pico-mcp

# macOS Apple Silicon (Rosetta x86_64 venv):
uv venv --python cpython-3.11-macos-x86_64 .venv-x86
uv pip install --python .venv-x86/bin/python -e .

# Other platforms: a normal venv is fine:
# uv venv && uv pip install -e .

Quick hardware test (close the PicoScope desktop app first — a scope can only be opened by one program at a time):

DYLD_LIBRARY_PATH="/Applications/PicoScope 7 T&M.app/Contents/Resources" \
  .venv-x86/bin/python -c "from pico_mcp.scope import probe_devices; print(probe_devices())"

Register in Claude Code

claude mcp add pico --scope user \
  --env DYLD_LIBRARY_PATH="/Applications/PicoScope 7 T&M.app/Contents/Resources" \
  -- /ABSOLUTE/PATH/TO/pico-mcp/.venv-x86/bin/pico-mcp

(Replace /ABSOLUTE/PATH/TO/ with your clone location. The DYLD_LIBRARY_PATH env is only needed on macOS Apple Silicon.)

Tools

Tool Purpose
list_devices Find connected scopes (model / variant / serial)
connect / disconnect Open (resolution 8/12/14/15/16 bit) / release the device
device_info Model, variant, serial, resolution, configured channels
set_channel Channel A–D: enable, DC/AC, range (0.01–20 V), analog offset
set_signal_generator / stop_signal_generator Built-in AWG: sine/square/triangle/ramp, frequency, amplitude
capture_block Block capture of all enabled channels → Vpp/min/max/mean/rms, estimated frequency, downsampled waveform (≤240 points)
frequency_sweep Frequency response: log-spaced AWG sweep, gain out/in per frequency (linear + dB), −3 dB band edges. Timebase chosen automatically per frequency

Example: measuring a transformer

Connect AWG/GEN → channel A (input) → device-under-test → channel B (output), enable both channels, then ask the agent to run a frequency_sweep. The server drives each frequency, captures both channels and reports the gain B/A — yielding the −3 dB bandwidth, pass-band flatness and any resonances. (This was the first real use: characterising a 1:1 audio isolation transformer — flat 17 Hz–1.4 MHz, one mild resonance at 380 kHz.)

Notes

  • Close the PicoScope desktop app before connecting — exclusive device access.
  • capture_block returns a downsampled waveform (no megasample dumps); measurements are computed from the full-resolution data.
  • Code changes take effect after the MCP host reloads the server (e.g. restart the session). The driver layer can be tested without a reload by running it directly in the venv.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选