LabJack T-series DAQ

io.github.K-Dense-AI由 GitHub 账号 K-Dense-AI 发布v0.1.3更新于 Oct 24, 2026

MCP server for LabJack T4, T7/T7-Pro and T8 DAQ devices (LJM).

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手读取 LabJack T4、T7/T7-Pro 和 T8 数据采集设备的模拟输入、流式波形和热电偶,并在允许时驱动 DAC 与数字输出。

可以做什么
查看连接与设备:报告已连接的 LabJack 身份、型号、序列号、固件、可用输入、量程和数字线,查看原始命令日志,或在断电重启、重新插线后重连。单次读取模拟输入和设备温度,包括内部传感器与估算的环境温度。在 T7/T8 上读取热电偶,返回类型、测得电压和冷端温度。读取数字线的电平与方向,且不改变其方向。在模拟输入上进行硬件定时波形采集,返回各通道统计、降采样波形,可选保存为 CSV。驱动输出:将数字线置高或置低、写入 DAC0/DAC1 直流电压,并把输出恢复到安全状态。
适用场景
当你桌面上有 LabJack T4、T7/T7-Pro 或 T8,并希望助手在安全限值内进行测量、记录波形、检查热电偶或数字线,或调整模拟与数字输出时适用。内置模拟器可让你在没有硬件的情况下先试用流程。
运行要求
以 Python 包(uvx labmcp-labjack)通过 stdio 在本机运行,仅限桌面。需另行安装 LabJack 原生 LJM 库和 USB 驱动,设备需通过 USB、以太网或 WiFi 可访问。用 LABMCP_ADDRESS 指定仪器(序列号、IP、设备名或 ANY);可选 LABMCP_LIMITS、LABMCP_READ_ONLY 和 LABMCP_SIMULATE。请关闭 Kipling、LJLogM、LJStreamM 等其他 LabJack 软件,因为 USB 设备同一时间只能被一个进程占用。
安装前请注意
输出类工具会改变硬件状态:set_digital_output 和 write_dac 会驱动数字线和 DAC 电压,DAC 值会一直保持到被更改或调用 set_outputs_safe。可用 LABMCP_READ_ONLY=1 禁用改变状态的工具,并用 LABMCP_LIMITS 限制 DAC 电压、采集时长和扫描速率。模拟量程和分辨率设置会保留在设备上,直到更改或断电重启。README 说明该服务器目前为模拟测试状态,尚未在真实硬件上验证,依赖前请谨慎测试。

安装

在 SourceWeft 中

  1. 打开 控制台中的 LabJack T-series DAQ,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

LabJack T-series DAQ — MCP Server

Let an AI agent read analog inputs, stream waveforms, read thermocouples, check digital lines and (with your permission) set DACs and digital outputs on LabJack T4, T7/T7-Pro and T8 DAQ devices through LabJack's official LJM library.

Packagelabmcp-labjack
InstrumentsLabJack T4, T7, T7-Pro, T8 (and their OEM versions)
InterfacesUSB, Ethernet, WiFi (T7-Pro)
ProtocolLJM library + T-series Modbus register map (T-Series Datasheet, register map ljm_constants.json, labjack-ljm Python wrapper)
Status🧪 simulated: tested against a simulated LJM backend, not yet verified on hardware. Report a hardware test

Try it without hardware

bash
uvx labmcp-labjack --simulate --checkuvx labmcp-labjack --simulate --option sim_model=T8 --check     # T4, T7, T7-Pro (default) or T8

The simulator wires a 2 V / 10 Hz sine to AIN0, a thermistor divider (~2.5 V) to AIN1, DAC0 back into AIN2, an LM34 cold-junction sensor to AIN3, and a ~37 °C thermocouple to AIN0-AIN3 when the thermocouple feature is used. Other inputs are grounded.

Connect your LabJack

  1. Install LJM (the native library and USB driver) from labjack.com/support/software/installers/ljm. The labjack-ljm Python package is installed automatically with this server, but it needs that native library.
  2. Close other LabJack software (Kipling, LJLogM, LJStreamM). A device can only be claimed by one process at a time over USB.
  3. Test the connection:
    bash
    uvx labmcp-labjack --check                                  # first LabJack founduvx labmcp-labjack --address 470012345 --check              # by serial numberuvx labmcp-labjack --address 192.168.1.207 --option connection_type=ETHERNET --checkuvx labmcp-labjack --option device_type=T4 --check          # only open a T4
    --address is the LJM identifier: a serial number, an IP address, a device name, or ANY (the default).

Add to your MCP client

Claude Code

bash
claude mcp add labjack -- uvx labmcp-labjack --address 470012345

Claude Desktop / Cursor / Windsurf (claude_desktop_config.json, .cursor/mcp.json, …)

json
{  "mcpServers": {    "labjack": {      "command": "uvx",      "args": ["labmcp-labjack", "--address", "470012345"]    }  }}

Add --read-only to allow measurements but block the DAC and digital-output tools (set_outputs_safe stays available). Add --option safe_dio=FIO0,FIO1 to make set_outputs_safe always release those lines, even if another program drove them. For other clients, generate the snippet with uvx labmcp config labjack --client vscode (also cursor, codex, claude-code).

Tools

ToolKindDescription
get_command_log👁 readReturn the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.
get_connection_info👁 readReport which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.
get_device_info👁 readIdentify the connected LabJack (model, serial, firmware, connection) and list what it offers: analog inputs, valid input ranges, resolution indices, DAC range, digital lines and stream rate. Call this before configuring channels.
read_analog_inputs👁 readRead one or more analog inputs once (command-response) and return volts.
read_device_temperature👁 readRead the LabJack's internal temperature sensor (°C, about ±2 °C) and the estimated ambient air temperature. On the T8 also returns the sensor next to each AIN terminal. Cannot be read while a stream is running.
read_digital_inputs👁 readReport the logic level and direction (input/output/analog) of digital I/O lines.
read_thermocouple👁 readRead a thermocouple with the T7/T8 AIN thermocouple extended feature (types B, C, E, J, K, N, R, S, T) and return °C with the measured voltage and cold-junction temperature.
reconnect🛑 safetyClose and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).
set_digital_output⚠️ hazardMake a digital line an output and drive it high (3.3 V) or low (0 V).
set_outputs_safe🛑 safetyPut the outputs in a safe state: stop any stream, set DAC0 and DAC1 to 0 V, and release every digital line this server drove (plus the safe_dio option lines) to input - or drive them low with dio_mode='low'. Use when finished or if anything looks wrong.
stream_analog👁 readAcquire a hardware-timed waveform on one or more analog inputs (LJM stream mode) and return per-channel statistics plus a downsampled waveform; optionally save everything to CSV.
write_dac⚠️ hazardSet an analog output (DAC0/DAC1) to a DC voltage. The output stays at this value until changed or set_outputs_safe is called.

get_connection_info, get_command_log and reconnect are built into every LabMCP server. The command log records every LJM register read and write.

Safety limits

LimitDefaultMeaning
max_dac_voltage_v5 VHighest DAC voltage an agent may set (hardware: T4/T7 0-5 V, T8 0-10 V)
max_stream_duration_s60 sLongest hardware-timed stream
max_scan_rate_hz10 000 HzHighest stream scan rate (the device maximum still applies)

Override at launch, e.g. --limit max_dac_voltage_v=2.5. Limits are checked before anything is sent. Streams are also capped at 2 million samples in total.

Example prompts

  • "Read AIN0-AIN3 on the ±1 V range and tell me which channels look like they are floating."
  • "Stream AIN0 and AIN1 at 5 kHz for 2 seconds, give me the RMS and peak-to-peak of each, and save the data to ~/data/run12.csv."
  • "Read the type K thermocouple on AIN2 every 10 seconds for a minute and tell me whether it is still warming up."
  • "Set DAC0 to 1.25 V, then check the loopback on AIN2 and report the error in millivolts."
  • "Which digital lines are outputs right now, and what level are they at?"
  • "We're done — put all the outputs back in a safe state."

Notes

  • Model differences are enforced. Valid input ranges (AIN#_RANGE) and resolution indices come from LabJack's register map: T7 ±10/±1/±0.1/±0.01 V and index 0-8 (T7-Pro 0-12, but 9-12 cannot stream); T8 ±11 … ±0.018 V and index 0-16 (one index shared by all inputs); T4 fixed ranges (AIN0-3 ±10 V, AIN4-11 0-2.5 V) and index 0-5. DAC range: T4/T7 0-5 V, T8 0-10 V.
  • Settings persist. Range, resolution and differential settings made by read_analog_inputs stay on the device until changed or power-cycled. Omitted settings are left as they are; every reading reports what it was measured against (GND, the T7 negative input, or the T8's isolated terminal).
  • Reading digital lines never changes their direction. read_digital_inputs uses the DIO_STATE/DIO_DIRECTION bitmasks. (Reading a single-line register such as FIO3 would switch that line to input.)
  • T4 flexible I/O. AIN4-AIN11 share terminals with FIO4-EIO3. The server refuses to read those AINs while the line is a digital output, because the read would switch it to analog and release whatever it drives.
  • set_outputs_safe default is input, the T-series power-up state (input with pull-up). If an attached relay board treats a pulled-up input as "on", use dio_mode="low" instead.
  • Thermocouples use the AIN extended feature (AIN#_EF_INDEX 20-30). With cjc="internal" the CJC register is set to its documented default TEMPERATURE_DEVICE_K (address 60052), which the T8 firmware maps to each channel's own terminal sensor (TEMPERATURE#_CAPTURE); cjc="lm34" uses LabJack's LM34 conversion (55.56 K/V, 255.37 K). An open input returns valid=false (the device reports -9999).
  • Streams follow LabJack's stream_basic.py example (internal clock, no trigger, auto settling). While a stream runs, command-response analog reads are blocked by the device. Skipped scans (buffer overflow) are reported and left empty. set_outputs_safe does not wait for a running stream: it stops it at the next read (the partial result is returned with aborted: true). A stream runs at 1 scan/s or faster (so that stop is prompt) and always takes at least two scans; that real duration is what the max_stream_duration_s limit checks. The returned waveform is downsampled by keeping each block's minimum and maximum, so short spikes are not lost; save_path must be a new .csv file (an existing file is never overwritten, and the path is checked before streaming).
  • Importing the LJM wrapper prints to stdout if the native library is missing. The server redirects that import so the MCP stdio channel is never corrupted, and reports a clear install hint instead.

Hardware verification

ModelFirmwareInterfaceVerified byDate
none yet: be the first

来源:servers/engineering/labjack/README.md,提交 46545ea

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.1.3最新Sep 27, 2026
  2. v0.1.1Sep 26, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分