Add TCP support for Meshtastic MCP interface / tests and update docs#10355
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds TCP transport support to the Meshtastic MCP server so tools can target a meshtasticd daemon (native/Portduino) via tcp://host[:port], plus unit tests and documentation updates.
Changes:
- Add TCP endpoint parsing/normalization and route
connect()throughmeshtastic.tcp_interface.TCPInterfacewhentcp://...is selected. - Surface a synthetic TCP “device” from
MESHTASTIC_MCP_TCP_HOSTindevices.list_devices()soresolve_port(None)can auto-select a daemon. - Reject TCP endpoints for USB-only operations (flash/vendor tools/serial monitor) and document the TCP/native workflow.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
mcp-server/src/meshtastic_mcp/connection.py |
TCP endpoint helpers + TCP branch in connect() with per-endpoint locking |
mcp-server/src/meshtastic_mcp/devices.py |
Prepends synthetic meshtasticd (TCP) entry when MESHTASTIC_MCP_TCP_HOST is set |
mcp-server/src/meshtastic_mcp/flash.py |
Reject TCP ports for flash-related operations; reject native* envs for upload |
mcp-server/src/meshtastic_mcp/hw_tools.py |
Reject TCP ports for vendor escape-hatch tools |
mcp-server/src/meshtastic_mcp/serial_session.py |
Reject TCP ports for serial_open |
mcp-server/tests/unit/test_connection_tcp.py |
New pure-Python unit tests for TCP parsing/routing + env-var behavior |
mcp-server/README.md |
Documents TCP/native-host workflow and tool applicability |
AGENTS.md |
Documents MESHTASTIC_MCP_TCP_HOST in test harness env vars |
.github/copilot-instructions.md |
Adds TCP/native-host node guidance for agents |
jp-bennett
pushed a commit
that referenced
this pull request
May 4, 2026
…10355) * Add TCP support for Meshtastic MCP interface / tests and update docs * Address TCP endpoint validation and error handling in connection * TCP connection handling and device listing logic * Fix docstring formatting in normalize_tcp_endpoint function
Evil8it
pushed a commit
to Evil8it/ME4TACTNK
that referenced
this pull request
Jun 10, 2026
…eshtastic#10355) * Add TCP support for Meshtastic MCP interface / tests and update docs * Address TCP endpoint validation and error handling in connection * TCP connection handling and device listing logic * Fix docstring formatting in normalize_tcp_endpoint function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.