You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -575,6 +575,8 @@ Grouped by purpose. Full argument shapes in `mcp-server/README.md`; a few high-v
575
575
576
576
`confirm=True` is a tool-level gate on top of whatever permission prompt your MCP host shows. **Don't bypass it** by asking the host to auto-approve — it exists specifically because MCP hosts sometimes remember "always allow this tool" and that's dangerous for `factory_reset`, `erase_and_flash`, `uhubctl_power(action='off')`, and `uhubctl_cycle`.
577
577
578
+
**TCP / native-host nodes.** Setting `MESHTASTIC_MCP_TCP_HOST=<host[:port]>` makes `list_devices` surface a `meshtasticd` daemon (e.g. the `native-macos` build) as a synthetic `tcp://host:port` entry, and `connect()` routes through `meshtastic.tcp_interface.TCPInterface` instead of `SerialInterface`. Every read/write/admin tool that flows through `connect()` works against the daemon transparently. USB-only tools (`pio_flash`, `erase_and_flash`, `update_flash`, `touch_1200bps`, `serial_open`, `esptool_*`, `nrfutil_*`, `picotool_*`) raise a clear `ConnectionError` when handed a `tcp://` port; `pio_flash` against a `native*` env raises a `FlashError` (no upload step — use `build` and run the binary directly). The pytest harness still assumes USB-attached devices per role; TCP-aware fixtures are deferred. See `mcp-server/README.md` § "TCP / native-host nodes".
579
+
578
580
### Hardware test suite (`mcp-server/run-tests.sh`)
579
581
580
582
The wrapper auto-detects connected devices (VID → role map: `0x239A` → `nrf52`, `0x303A`/`0x10C4` → `esp32s3`), maps each role to a PlatformIO env (`nrf52` → `rak4631`, `esp32s3` → `heltec-v3`, overridable via `MESHTASTIC_MCP_ENV_<ROLE>`), then invokes pytest. Zero pre-flight config needed from the operator.
|`MESHTASTIC_MCP_ENV_<ROLE>`| Override PlatformIO env for a role (e.g. `MESHTASTIC_MCP_ENV_NRF52=rak4631-dap`). Default map: `nrf52→rak4631`, `esp32s3→heltec-v3`. |
132
-
|`MESHTASTIC_MCP_SEED`| PSK seed for the session test profile. Defaults to `mcp-<user>-<host>`. |
133
-
|`MESHTASTIC_MCP_FLASH_LOG`| File path to tee pio/esptool/nrfutil/picotool output. `run-tests.sh` sets this to `tests/flash.log` so the TUI can stream live flash progress. |
134
-
|`MESHTASTIC_UHUBCTL_BIN`| Absolute path to `uhubctl` binary. Default: PATH lookup. |
135
-
|`MESHTASTIC_UHUBCTL_LOCATION_<ROLE>`| Pin a role to a specific uhubctl hub location (e.g. `1-1.3`). Wins over VID auto-detection — use when multiple devices share a VID. |
136
-
|`MESHTASTIC_UHUBCTL_PORT_<ROLE>`| Pin a role to a specific hub port number. Required alongside `LOCATION_<ROLE>`. |
137
-
|`MESHTASTIC_UI_CAMERA_BACKEND`| Camera backend for UI tier + `capture_screen` tool: `opencv` / `ffmpeg` / `null` / `auto` (default). |
138
-
|`MESHTASTIC_UI_CAMERA_DEVICE`| Generic camera device (index or path). Used by the UI tier when no per-role var is set. |
139
-
|`MESHTASTIC_UI_CAMERA_DEVICE_<ROLE>`| Per-role camera pinning (e.g. `MESHTASTIC_UI_CAMERA_DEVICE_ESP32S3=0` for the OLED-bearing heltec-v3). |
|`MESHTASTIC_MCP_ENV_<ROLE>`| Override PlatformIO env for a role (e.g. `MESHTASTIC_MCP_ENV_NRF52=rak4631-dap`). Default map: `nrf52→rak4631`, `esp32s3→heltec-v3`. |
132
+
|`MESHTASTIC_MCP_SEED`| PSK seed for the session test profile. Defaults to `mcp-<user>-<host>`. |
133
+
|`MESHTASTIC_MCP_FLASH_LOG`| File path to tee pio/esptool/nrfutil/picotool output. `run-tests.sh` sets this to `tests/flash.log` so the TUI can stream live flash progress. |
134
+
|`MESHTASTIC_MCP_TCP_HOST`|`host` or `host:port` of a `meshtasticd` daemon (e.g. the `native-macos` build). Surfaces it in `list_devices` as `tcp://host:port` so `connect()`-based tools target it transparently. Default port 4403. |
135
+
|`MESHTASTIC_UHUBCTL_BIN`| Absolute path to `uhubctl` binary. Default: PATH lookup. |
136
+
|`MESHTASTIC_UHUBCTL_LOCATION_<ROLE>`| Pin a role to a specific uhubctl hub location (e.g. `1-1.3`). Wins over VID auto-detection — use when multiple devices share a VID. |
137
+
|`MESHTASTIC_UHUBCTL_PORT_<ROLE>`| Pin a role to a specific hub port number. Required alongside `LOCATION_<ROLE>`. |
138
+
|`MESHTASTIC_UI_CAMERA_BACKEND`| Camera backend for UI tier + `capture_screen` tool: `opencv` / `ffmpeg` / `null` / `auto` (default). |
139
+
|`MESHTASTIC_UI_CAMERA_DEVICE`| Generic camera device (index or path). Used by the UI tier when no per-role var is set. |
140
+
|`MESHTASTIC_UI_CAMERA_DEVICE_<ROLE>`| Per-role camera pinning (e.g. `MESHTASTIC_UI_CAMERA_DEVICE_ESP32S3=0` for the OLED-bearing heltec-v3). |
0 commit comments