daq-mcp
With the daq-mcp server, you can:
Discover and inspect NI DAQ devices: List connected devices and get detailed channel inventories, voltage ranges, and sample rates.
Read sensor data: Acquire voltage samples from analog input channels (with summary statistics) and read logic levels from digital input lines.
Write to outputs safely: Drive analog output channels to DC voltages (clamped to safe limits) and set digital lines high or low; writes are disabled by default and require an explicit allowlist.
Analyze waveforms: Acquire finite analog waveforms and get summary stats (mean, RMS, peak-to-peak, standard deviation, preview) instead of raw data.
Diagnose hardware: Run device self-tests to verify health.
Live monitoring and continuous acquisition: Start/stop background data streams and use a web dashboard for real-time visualization.
Simulate hardware: Operate in a pure-Python simulation mode without physical DAQ hardware, ideal for development and testing.
Safety features: Writes are opt-in, channels must be on an allowlist, analog outputs are clamped, and read-back confirms written values.
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., "@daq-mcp Monitor analog input Dev1/ai0"
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.
daq-mcp
An MCP server that lets an AI coding client talk to National Instruments DAQ hardware — with a safety model aimed at physical I/O, not just HTTP errors.
Not affiliated with, endorsed by, or supported by NI / Emerson. Licensed under the Apache License 2.0. See NOTICE for attribution.
Documentation: docs/ — architecture, safety, configuration, tool reference, devices, examples, limitations, troubleshooting, development history.
Portfolio-oriented stack notes: TECH_STACK.md.
Why this exists
Most MCP servers wrap APIs or filesystems. This one wraps data acquisition: list devices, read sensors, write digital/analog lines, stream a live signal. The protocol plumbing is straightforward; the interesting part is refusing unsafe writes, clamping analog output, and keeping agent and browser on the same allowlist.
Related MCP server: rigol-dho-mcp
Quick start (no hardware)
Requires Python 3.11+ and uv.
git clone https://github.com/rhit-folayaod/daq-mcp.git
cd daq-mcp
uv sync
DAQ_MCP_SIMULATE=1 uv run server.py$env:DAQ_MCP_SIMULATE="1"; uv run server.pyOptional NI binding: uv sync --extra hardware (needs NI-DAQmx on the machine).
If the driver is missing, the server falls back to simulation automatically.
Safety in one paragraph
Writes are off unless DAQ_MCP_ALLOW_WRITE=1. Only allowlisted channels are
reachable; only channels marked as outputs are writable; analog output is
clamped (±5 V by default). Configure channel roles with the dashboard picker or
wiring tools — profiles stay local (gitignored). Details: docs/safety.md.
Tools (summary)
Area | Tools |
Discovery |
|
Analog in |
|
Digital / AO |
|
Live |
|
Wiring |
|
Full parameter notes: docs/tools.md.
Live dashboard
DAQ_MCP_ALLOW_WRITE=1 uv run server.py --dashboard-onlyOpen http://127.0.0.1:8765/. For dashboard + MCP on one port (avoids two
processes fighting over the device): uv run server.py --http → MCP at
/mcp/. Remote access needs a token and/or a tunnel —
docs/configuration.md.
Cursor
See .cursor/mcp.json.example and docs/configuration.md.
Do not commit machine-local .cursor/mcp.json, tokens, or wiring profiles.
Tests
uv run pytestSimulator-only; CI runs the same on main.
Layout
server.py MCP tools + safety + entrypoint
src/daq_mcp/ backends, live, dashboard, wiring, captures, auth
docs/ architecture, safety, config, tools, …
tests/ pytest against the simulatorContributing
See CONTRIBUTING.md.
Available Tools
8 toolsdescribe_deviceA
Describe one device's full channel inventory.
Returns available analog input, analog output, digital input, and digital output channels, plus voltage ranges and max sample rates. Use this to pick valid channel names before reading or writing.
Inputs: device (required). Returns: object
list_devicesA
List NI DAQ devices visible to this machine.
Returns the device name, product type, serial number, and which channel types it supports. Call this first — channel names are device-specific.
Inputs: no named parameters. Returns: result
monitor_analogA
Acquire a finite analog waveform and return summary statistics.
Built for the "is my sensor behaving?" question: returns mean, RMS, peak- to-peak, standard deviation, and a downsampled preview rather than the full sample array. Keeps large acquisitions out of the context window.
Inputs: channel (required), duration_s (required), rate_hz. Returns: object
read_analogA
Read voltage samples from an analog input channel.
channel: fully qualified, e.g. "Dev1/ai0" samples: how many samples to acquire (1 = single instantaneous reading) rate_hz: sample rate for multi-sample reads
Returns the samples plus min/mean/max, so the model can reason about the signal without pulling thousands of raw floats into context.
Inputs: channel (required), rate_hz, samples, terminal_config. Returns: object
read_digitalA
Read the current logic level of a digital input line.
channel: e.g. "Dev1/port0/line0" Returns {"channel": ..., "value": true/false}.
Inputs: channel (required). Returns: object
self_testB
Run the device's built-in self-test and report pass/fail.
Useful as a first diagnostic when reads return unexpected values.
Inputs: device (required). Returns: object
write_analogA
Set an analog output channel to a DC voltage.
Clamped to AO_VOLTAGE_LIMITS. Returns both the requested and the actual applied voltage, and flags whether clamping occurred — never silently changes the value the model asked for.
Inputs: channel (required), voltage (required). Returns: object
write_digitalA
Set a digital output line high or low.
Requires DAQ_MCP_ALLOW_WRITE=1. Returns the line's state after the write (read back from hardware, not echoed) so the model can confirm the effect.
Inputs: value (required), channel (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools clearly target distinct resources/actions: device enumeration, channel description, analog read/write, digital read/write, waveform analysis, and self-test. The only potential overlap is between read_analog and monitor_analog—both acquire analog signals and return summary statistics—but their descriptions clarify different use cases (raw samples vs. battery of descriptive statistics).
All tool names follow a consistent snake_case verb_noun pattern (list_devices, describe_device, read_analog, write_analog, etc.). Even self_test fits the command-style, and there is no mixing of camelCase or inconsistent verb forms.
Eight tools cover the core tasks for a DAQ MCP server—device discovery, channel inventory, analog/digital I/O, waveform monitoring, and diagnostics. This is a well-scoped set that avoids bloat while providing all essential operations.
The surface provides a full CRUD-like lifecycle for basic DAQ interactions: enumerate, describe, read, write, and test. Minor gaps exist such as no arbitrary analog waveform generation (write_analog only outputs DC) and no continuous acquisition mode, but these are not critical for typical agent use.
Maintenance
Related MCP Connectors
MCP compatibility and transport verification server.
MCP compatibility and transport verification server.
MCP compatibility and transport verification server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for controlling Universal Robots arms and Robotiq grippers via RTDE protocol, enabling motion, force, I/O, and gripper operations.1MIT
- AlicenseAqualityDmaintenanceMCP server for controlling and reading Rigol DHO800/DHO900 oscilloscopes over LAN via SCPI commands.112MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for ADALM2000 (M2k) — AWG, scope, and PSU control via FastMCP 3.4.-
- AlicenseAqualityDmaintenanceA safety-bounded MCP server for discovering data-acquisition devices and performing finite analog-voltage and digital-input reads through NI's nidaqmx Python package.9Apache 2.0