dso2d15-mcp

dso2d15-mcp

MCP server for controlling Hantek DSO2D15 and other DSO2000-family oscilloscopes via USB and SCPI, enabling waveform acquisition, measurements, and screen captures.

Category
访问服务器

README

dso2d15-mcp

A Model Context Protocol (MCP) server for the Hantek DSO2D15 (and other DSO2000-family scopes) using USB and SCPI over PyVISA (pyvisa-py backend by default).

Official SCPI reference: DSO2000 Series SCPI Programmer’s Manual (PDF).

Waveform acquisition follows the same PRIVate:WAVeform:DATA:ALL? flow used in community tooling (hantek-dso2000).

Requirements

  • Python 3.10+
  • USB connection to the scope (rear USB device port)
  • OS support for USB-TMC via PyVISA:
    • Linux: often works with usbcore / usbtmc kernel driver or libusb stack used by pyvisa-py
    • macOS: install includes pyusb so pyvisa-py can enumerate USB-TMC. If discovery still fails, try NI-VISA and DSO2D15_VISA_BACKEND=@ni.

DSO2D15 USB IDs (matches VISA USB0::1183::20574::…): Vendor 0x049F (1183), Product 0x505E (20574). Example serial: CN5546029098237 → resource like USB0::1183::20574::CN5546029098237::0::INSTR.

If opening the instrument fails with usb.core.USBError: … Access denied (insufficient permissions) on macOS, pyvisa-py cannot claim the USB-TMC interface via libusb. Install NI-VISA, set DSO2D15_VISA_BACKEND=@ni, and use the NI resource string, or fix libusb access for that device (vendor docs / system USB policy).

Install

cd dso2d15-mcp
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e .

Run the server (stdio transport for Cursor/Claude Desktop):

dso2d15-mcp
# or
python -m dso2d15_mcp.server

Environment variables

Variable Purpose
DSO2D15_VISA Full VISA resource string, e.g. USB0::0x049F::0x505E::...::INSTR (use dso2d15_list_visa_resources to discover)
DSO2D15_VISA_QUERY Pattern for auto-pick when DSO2D15_VISA is unset. Default: USB0::1183::20574:?* (Hantek DSO2000 IDs used by common tooling)
DSO2D15_TIMEOUT_MS VISA read timeout in ms (default 120000; large captures can be slow)
DSO2D15_VISA_BACKEND PyVISA resource manager string (default @py for pyvisa-py)
DSO2D15_SNAPSHOT_DIR Directory for BMP/SVG files from dso2d15_measure_snapshot (default: system temp)

Cursor MCP configuration

Add to your MCP settings (adjust the path):

{
  "mcpServers": {
    "dso2d15": {
      "command": "/absolute/path/to/dso2d15-mcp/.venv/bin/dso2d15-mcp",
      "env": {
        "DSO2D15_VISA": "USB0::...your resource...::INSTR"
      }
    }
  }
}

Tools

Tool Description
dso2d15_list_visa_resources List VISA resources (query parameter, default ?*)
dso2d15_list_hantek_candidates List resources matching DSO2D15_VISA_QUERY
dso2d15_identify *IDN?
dso2d15_scpi_write Send a SCPI command with no query response
dso2d15_scpi_query ASCII query (responses that are not binary blocks)
dso2d15_scpi_query_binary Binary/block responses (returns length + base64 preview)
dso2d15_fetch_waveform High-level waveform JSON via PRIVate:WAVeform:DATA:ALL?
dso2d15_measure_vpp_frequency Automatic Vpp and frequency via :MEASure:CHANnel<n>:ITEM?
dso2d15_measure_snapshot Vpp + freq, optional BMP screen grab (best-effort), and SVG waveform plot path

Use dso2d15_scpi_query for interactive exploration (examples: *IDN?, :CHANnel1:SCALe?, :TIMebase:MAIN:SCALe?). Refer to the Hantek PDF for the full command set.

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 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
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 模型以安全和受控的方式获取实时的网络信息。

官方
精选