lab-mcp
Health Warn
- License — License: MIT
- No description — Repository has no description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
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, oscilloscopes, and spectrum analyzers.
- Find instruments through USB-TMC, LAN (SCPI), and USB serial connections, as supported by each model.
- Connect RS-232 instruments without automatic discovery (ISO-TECH IPS). You must state the port and the 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.
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 install
Start the server
Run this command from the project directory:
poetry run lab-mcp
Keep the process running while the HTTP client is connected. The default endpoint is:
http://127.0.0.1:10765/mcp
| Option | Default | Function |
|---|---|---|
--port |
10765 |
Set the HTTP port. |
--host |
127.0.0.1 |
Set the HTTP address. |
--transport |
http |
Select http or stdio. |
--ips-port |
none | Set the RS-232 port of an ISO-TECH IPS power supply, for example /dev/ttyS0. |
--ips-model |
none | Set the model at --ips-port: IPS-405, IPS-603 or IPS-2010. |
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.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found