lab-mcp
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., "@lab-mcpset power supply channel 1 to 5 V and 0.5 A, then turn it on"
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.
lab-mcp
lab-mcp is a Model Context Protocol (MCP) server for laboratory instruments. Its goal is to let an AI assistant find, configure, and read instruments through one MCP connection. The server finds supported instruments automatically. You usually do not need to enter device addresses or ports.
Current capabilities
Control supported DC power supplies, digital multimeters, function generators, and oscilloscopes.
Find instruments through USB-TMC, LAN (SCPI), and USB serial connections, as supported by each model.
Read measurements, waveforms, and status, set supported parameters, and switch outputs on or off.
Connect an MCP client through Streamable HTTP or stdio.
Support and test coverage differ by model. Some functions have only simulated tests or protocol checks. LAN operation is not tested on real instruments. Generator support is limited to basic waveforms. Refer to Supported devices for models, tools, test scope, limits, and troubleshooting.
Related MCP server: Instrument MCP Server
Before use
WARNING: An AI assistant can switch instrument outputs on. Disconnect sensitive loads before you use the server. Read the limits and safety notes for your device in Supported devices. The server checks values before it sends them to an instrument. It refuses values outside the permitted range. These checks cannot verify the wiring or the connected load.
CAUTION: For current measurements, use the multimeter current input and connect the instrument in series with the load. If you connect the current input across a voltage source, the multimeter fuse blows. The server cannot detect the position of the test leads.
WARNING: The server has no authentication. Anyone who can connect to it can control the instruments.
The default HTTP address accepts connections only from the same computer.
Use --host 0.0.0.0 only in a network that you trust.
Get started
Requirements
Git
Python 3.10 or later
Poetry 2.x
An MCP client with Streamable HTTP or stdio support
A supported instrument and its required interface driver for hardware use
Check the connection and discovery notes and the notes for your device before connection.
Install
Clone the repository and install its dependencies:
git clone https://github.com/risqyy/lab-mcp.git
cd lab-mcp
poetry installStart the server
Run this command from the project directory:
poetry run lab-mcpKeep the process running while the HTTP client is connected. The default endpoint is:
http://127.0.0.1:10765/mcpOption | Default | Function |
|
| Set the HTTP port. |
|
| Set the HTTP address. |
|
| Select |
Connect an MCP client
For a client with Streamable HTTP support, add the endpoint above as an MCP server.
Use the configuration format required by your client. For clients that accept mcpServers entries:
{
"mcpServers": {
"lab-mcp": {
"type": "http",
"url": "http://127.0.0.1:10765/mcp"
}
}
}For a client with stdio support, use this configuration instead.
The client starts the server process; you do not need a separate HTTP server.
Replace /path/to/lab-mcp with the absolute project path.
On Windows, use forward slashes in the JSON path, for example C:/work/lab-mcp.
{
"mcpServers": {
"lab-mcp": {
"command": "poetry",
"args": ["-C", "/path/to/lab-mcp", "run", "lab-mcp", "--transport", "stdio"]
}
}
}Find an instrument
Connect and switch on the instrument. Ask the MCP client to call discover_instruments.
Check the returned model and serial number before you send commands.
If more than one instrument of a type is found, use its connection tool with the serial number to select it.
Refer to Supported devices for the applicable tool and operating limits.
Development
Run the software tests with poetry run pytest. The tests use simulated instruments; no hardware is required.
Drivers are in src/lab_mcp/instruments/. MCP tools are in src/lab_mcp/tools/.
Refer to Extend device support to add an instrument.
Follow the repository instructions in AGENTS.md.
License
lab-mcp uses the MIT License. Refer to LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
- mytesla.ioOAuthio.mytesla
Control your Tesla from your AI assistant - climate, charging, access, and security.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly control NI oscilloscopes (e.g., PXIe-5160/5164/5110) through the Model Context Protocol, including waveform acquisition, measurement, and configuration.MIT
- AlicenseCqualityBmaintenanceEnables natural language control of test instruments like spectrum analyzers and power supplies via SCPI commands, with auto-discovery and multi-instrument session support.1001MIT
- AlicenseNot gradedqualityDmaintenanceConnects test and measurement instruments (oscilloscope, logic analyzer, multimeter, power supply) to AI via MCP, enabling natural language control and automated analysis.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to automatically generate Multisim circuits, run simulations, extract experimental data, and export circuit diagrams, CSV, waveforms, and lab reports.23MIT