MCP server for remote embedded hardware testing
Project description
Lab Testing MCP Server
MCP server exposing remote embedded hardware testing capabilities to AI assistants.
Version: 0.2.0
⚠️ ALPHA QUALITY WARNING: This package is currently in alpha development status. It is not ready for professional or production use. The API may change, features may be incomplete, and there may be bugs. Use at your own risk. See PUBLISHING.md for more details.
Installation
Requirements: Python 3.10+ (MCP SDK requires Python 3.10+)
From PyPI (Recommended)
# Install from PyPI
python3.10 -m pip install ai-lab-testing
# Or with development dependencies
python3.10 -m pip install "ai-lab-testing[dev]"
From Source
# Clone the repository
git clone https://github.com/DynamicDevices/ai-lab-testing.git
cd ai-lab-testing
# Install in development mode
python3.10 -m pip install -e ".[dev]"
# Verify installation
python3.10 lab_testing/test_server.py
Configuration
Add to Cursor MCP config (~/.cursor/mcp.json):
{
"mcpServers": {
"ai-lab-testing": {
"command": "python3.10",
"args": ["/path/to/ai-lab-testing/lab_testing/server.py"],
"env": {
"LAB_TESTING_ROOT": "/path/to/ai-lab-testing",
"VPN_CONFIG_PATH": "/path/to/wg0.conf"
}
}
}
}
Important: Use python3.10 (or python3.11+) since MCP SDK requires Python 3.10+.
VPN Setup
The server auto-detects WireGuard VPN configs. If you don't have one:
- See docs/VPN_SETUP.md for setup guide
- Use MCP tools:
vpn_setup_instructions,create_vpn_config_template
See docs/SETUP.md for detailed setup instructions or mcp.json.example for a template.
Architecture
graph TB
subgraph "AI Assistant"
AI[Claude/Cursor]
end
subgraph "MCP Server"
MCP[server.py]
TOOLS[Tools]
RES[Resources]
end
subgraph "Lab Framework"
CFG[Config]
DEV[Device Manager]
VPN[VPN Manager]
PWR[Power Monitor]
end
subgraph "Hardware"
BOARD[iMX Boards]
DMM[DMM]
TASMOTA[Tasmota]
end
AI -->|MCP| MCP
MCP --> TOOLS
TOOLS --> DEV
TOOLS --> VPN
TOOLS --> PWR
DEV --> BOARD
PWR --> DMM
Data flow: AI → MCP Server → Tools → Lab Framework → Hardware
Tools
- Device:
list_devices,test_device,ssh_to_device - VPN:
vpn_status,connect_vpn,disconnect_vpn - Power:
start_power_monitoring(DMM or Tasmota),get_power_logs,analyze_power_logs,monitor_low_power,compare_power_profiles- Power monitoring via DMM (SCPI) or Tasmota energy monitoring - Tasmota:
tasmota_control,list_tasmota_devices,power_cycle_device- Power cycle devices via Tasmota switches - OTA/Containers:
check_ota_status,trigger_ota_update,list_containers,deploy_container,get_system_status,get_firmware_version,get_foundries_registration_status,get_secure_boot_status,get_device_identity - Process Management:
kill_stale_processes- Kill duplicate processes that might interfere - Remote Access:
create_ssh_tunnel,list_ssh_tunnels,close_ssh_tunnel,access_serial_port,list_serial_devices- SSH tunnels and serial port access - Change Tracking:
get_change_history,revert_changes- Track and revert changes for security/debugging - Batch/Regression:
batch_operation,regression_test,get_device_groups - Network Mapping:
create_network_map- Visual map of network with device type, uptime, friendly names, power switches - Device Verification:
verify_device_identity,verify_device_by_ip,update_device_ip- Verify device identity in DHCP environments - Help:
help- Get usage documentation and examples
Resources
device://inventory- Device inventorynetwork://status- Network/VPN statusconfig://lab_devices- Raw confighelp://usage- Help documentation and usage exampleshealth://status- Server health, metrics, and SSH pool status
Development
# Use Python 3.10+ for development
python3.10 -m pip install -e ".[dev]"
pre-commit install
black . && ruff check . --fix
Adding tools: Create function in lab_testing/tools/, register in lab_testing/server/tool_definitions.py and lab_testing/server/tool_handlers.py.
Versioning: Semantic versioning (MAJOR.MINOR.PATCH). Update version.py, see CHANGELOG.md.
Documentation
- API Reference - Tool and resource API
- Setup Guide - Installation and configuration
- Architecture Diagram - Full system diagram
License
GPL-3.0-or-later - Copyright (C) 2025 Dynamic Devices Ltd
See LICENSE for full license text.
Maintainer
Alex J Lennon ajlennon@dynamicdevices.co.uk
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_lab_testing-0.2.0.tar.gz.
File metadata
- Download URL: ai_lab_testing-0.2.0.tar.gz
- Upload date:
- Size: 67.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24c657676e896d49da5b21a5355b35a3d99239760d2ccb9f12b7a24629864baf
|
|
| MD5 |
8eb32c7d65a55e676835d72b3cf9b5a0
|
|
| BLAKE2b-256 |
8547e203a3661fa054ad58d983ecc7c52fb6d563dfbd1cddbc75bcd97b16a96d
|
Provenance
The following attestation bundles were made for ai_lab_testing-0.2.0.tar.gz:
Publisher:
publish.yml on DynamicDevices/ai-lab-testing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_lab_testing-0.2.0.tar.gz -
Subject digest:
24c657676e896d49da5b21a5355b35a3d99239760d2ccb9f12b7a24629864baf - Sigstore transparency entry: 702445535
- Sigstore integration time:
-
Permalink:
DynamicDevices/ai-lab-testing@177a0de31e527ad7a23db26dfe9030bf415661fa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/DynamicDevices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@177a0de31e527ad7a23db26dfe9030bf415661fa -
Trigger Event:
release
-
Statement type:
File details
Details for the file ai_lab_testing-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ai_lab_testing-0.2.0-py3-none-any.whl
- Upload date:
- Size: 76.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
666876ba17cce38ac0d5531057e5326f367bf48ff5f543233205844cc32d0c02
|
|
| MD5 |
4369797a1093d6b101722fb25a0675c7
|
|
| BLAKE2b-256 |
8a9f2e5b1b17f674364c964834c4b78dca9de78762e3bce80bb37f8e5ab67c12
|
Provenance
The following attestation bundles were made for ai_lab_testing-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on DynamicDevices/ai-lab-testing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_lab_testing-0.2.0-py3-none-any.whl -
Subject digest:
666876ba17cce38ac0d5531057e5326f367bf48ff5f543233205844cc32d0c02 - Sigstore transparency entry: 702445536
- Sigstore integration time:
-
Permalink:
DynamicDevices/ai-lab-testing@177a0de31e527ad7a23db26dfe9030bf415661fa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/DynamicDevices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@177a0de31e527ad7a23db26dfe9030bf415661fa -
Trigger Event:
release
-
Statement type: