NI-DAQmx DAQ Devices — Claude Code MCP server: measure and output
An MCP server that hands an AI agent control over National Instruments hardware through the NI-DAQmx driver: voltage and thermocouple reads, digital line reads, analog and digital writes.
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ni-daqmx -- uvx labmcp-ni-daqmxWhat NI-DAQmx DAQ Devices does
Under the hood it talks to the nidaqmx Python package, which wraps the official NI-DAQmx driver. Read tools cover read_analog for one or more analog inputs, read_thermocouple for types B, E, J, K, N, R, S and T, and read_digital_lines. Call get_connection_info and get_device_info first to see channels, ranges and rates.
Writes sit behind a separate gate. write_analog and write_digital_lines are flagged as hazardous, and set_outputs_safe drives outputs back to zero. Launching with --read-only keeps acquisitions working while blocking output tools. Default limits are 5 V on an analog output, 100 000 samples per channel, 100 000 Hz and 60 s per acquisition; they are checked before any command goes out, and the board's own range still applies.
The NI-DAQmx driver is a separate install and runs on Windows and Linux only — macOS is out. Device names come from NI MAX or nilsdev on Linux, and NI MAX test panels have to be closed before you connect. No driver means no hardware access, so start with uvx labmcp-ni-daqmx --check.
What it helps with
- measure voltage across several analog inputs and get per-channel statistics
- read a thermocouple temperature through an NI 9211 module
- check the logic level of digital lines on a CompactDAQ chassis
- set a DC voltage on an analog output and later return it to zero
- run a full workflow without any hardware attached
Example prompts for the agent
- Acquire ai0 and ai1 at 10 kHz for 0.5 s on the ±1 V range, compute the RMS noise per channel, and save everything to
~/daq/noise.csv. - Read the type K thermocouples on cDAQ1Mod1/ai0 and report the temperature in Celsius.
How to install NI-DAQmx DAQ Devices
Platform CLI
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ni-daqmx -- uvx labmcp-ni-daqmxReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ni-daqmx <command>
Platform CLI
codex mcp add ni-daqmx --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> -- uvx labmcp-ni-daqmxReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ni-daqmx <command>
Config file
{
"mcpServers": {
"ni-daqmx": {
"command": "uvx",
"args": [
"labmcp-ni-daqmx"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ni-daqmx <command>
Config file
{
"servers": {
"ni-daqmx": {
"type": "stdio",
"command": "uvx",
"args": [
"labmcp-ni-daqmx"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ni-daqmx <command>
Platform CLI
gemini mcp add -e LABMCP_ADDRESS=<LABMCP_ADDRESS> -e LABMCP_SIMULATE=<LABMCP_SIMULATE> -e LABMCP_READ_ONLY=<LABMCP_READ_ONLY> -e LABMCP_LIMITS=<LABMCP_LIMITS> ni-daqmx uvx labmcp-ni-daqmxReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-ni-daqmx <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about NI-DAQmx DAQ Devices
How do I install NI-DAQmx DAQ Devices in Claude Code?
Run claude mcp add labmcp-ni-daqmx -- uvx labmcp-ni-daqmx. To pass a device address, simulation mode, read-only mode or custom limits, use the env-var form: `claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio ni-daqmx -- uvx labmcp-ni-daqmx`.
What does this MCP server do?
It exposes NI hardware to an agent through NI-DAQmx: analog input reads, thermocouple and digital line reads, plus analog and digital writes that can be reset to a safe state.
Can I try it without hardware?
Yes, a built-in X Series simulator is included. Start it with uvx labmcp-ni-daqmx --simulate --check. On Windows you can also create a simulated device in NI MAX and connect to it without the --simulate flag.