ScopeProbe
Enables AI to measure DC voltage and waveform statistics from DreamSourceLab DSCope oscilloscopes via MCP tools.
README
ScopeProbe MCP
让 AI 经 MCP 读 DreamSourceLab DSCope(如 DSCope U3P100)的电压/波形——用于数字电源等硬件的在线自测与采样校准。
配合配套的 MultiProbeFlash MCP(烧录/SWD/RTT/串口)成套:一个管烧录+调试,一个管示波器测量,AI 可闭环「改码→编译→烧录→RTT/串口验证→示波器量电压」。
为什么单独做
- mainline
sigrok-cli不支持 DSCope(需 DreamSourceLab 分叉的libsigrok4DSL)。 - 现成 scope MCP 都不覆盖 DSCope:
- KenosInc/sigrok-mcp-server(Go,包 sigrok-cli,偏逻辑分析/协议解码)
- MagnusJohansson/siglent-sds-mcp、lxkang00/oscilloscope-mcp(Python,SCPI 网口控 Siglent)
- Rigol DHO / Digilent WaveForms 等
- 本 server 直接包 WaveGate 的原生采集器
wavegate-capture(sigrok4dsl 后端,已驱动 DSCope),把测量暴露成 MCP。
工具
| 工具 | 说明 |
|---|---|
scope_scan |
扫描 DSCope 设备(model/serial/通道) |
scope_measure_dc(channel, vdiv_mv, samples, samplerate) |
采通道 → 算 DC 电压(中位码值→电压);vdiv_mv=0 自动切档(1V/2V/5V per div),带 tried/clipping/hint |
scope_capture_stats(channel, ...) |
采波形返回码值统计(min/max/mean/median/峰峰),快速看信号在不在/抖不抖 |
DC 电压换算
DSCope 8-bit 码值随电压反向(code 越小电压越高):
V = (hw_offset - code) * (vdiv_mv * vfactor * 10) / (ref_max - ref_min) / 1000
标定常数(vdiv_mv/hw_offset/ref_min/ref_max)从 wavegate-capture acquire 输出读,vdiv 跟随 DSCope 当前档位。1V/div 时量程约 ±5V。
自动切档量程
scope_measure_dc(channel, vdiv_mv=0, ...):
vdiv_mv=0(默认)→ 自动切档:依次试 1V/2V/5V per div,取不贴量程边界(ref_min/ref_max ±2)的那档。量 ~12V 输入会自动切到 2V/div。vdiv_mv>0→ 固定该档(mV/div)。- 返回带
tried(各档尝试)、clipping、hint。
依赖
wavegate-capture支持--vdiv(本仓库配套的 WaveGate 已加该参数)。若用的是旧版wavegate-capture(不认--vdiv),它会忽略该参数、维持设备当前档位,自动切档退化为"检测+提示",此时 >±5V 需在 DSView 手动调大 vdiv。
依赖 & 配置
pip install mcpwavegate-capture.exe(sigrok4dsl 后端);路径经环境变量WAVEGATE_CAPTURE指定。- DSCope USB 接入;同一时刻别和 DSView / WaveGate GUI 抢设备。
Claude Code .mcp.json:
{ "mcpServers": { "scopeprobe": {
"command": "uv",
"args": ["run","--with","mcp","python","scopeprobe_mcp.py"],
"env": { "WAVEGATE_CAPTURE": "C:/.../wavegate-capture.exe" }
} } }
实测
- DSCope CH0 接数字电源输出(5V):
scope_measure_dc(0)→ 5.02V;固件读 4.99V,吻合 ~0.6%。 - 12V 输入侧:1V/div 超量程(
clipping=True)→ 提示调 2V/div。
开发约定
沿用配套 MultiProbeFlash 的「功能必进 MCP」:新增采集/测量能力都在此暴露对应 MCP 工具。
License
MIT —— 见 LICENSE。
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.