Skip to content

Add TCP support for Meshtastic MCP interface / tests and update docs#10355

Merged
thebentern merged 5 commits into
masterfrom
tcp-test-mcp
Apr 30, 2026
Merged

Add TCP support for Meshtastic MCP interface / tests and update docs#10355
thebentern merged 5 commits into
masterfrom
tcp-test-mcp

Conversation

@thebentern

Copy link
Copy Markdown
Contributor

No description provided.

@thebentern thebentern requested a review from Copilot April 30, 2026 11:40
@github-actions github-actions Bot added needs-review Needs human review enhancement New feature or request labels Apr 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() through meshtastic.tcp_interface.TCPInterface when tcp://... is selected.
  • Surface a synthetic TCP “device” from MESHTASTIC_MCP_TCP_HOST in devices.list_devices() so resolve_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

Comment thread mcp-server/src/meshtastic_mcp/devices.py Outdated
Comment thread mcp-server/tests/unit/test_connection_tcp.py Outdated
Comment thread mcp-server/src/meshtastic_mcp/connection.py Outdated
Comment thread mcp-server/src/meshtastic_mcp/connection.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread mcp-server/src/meshtastic_mcp/devices.py Outdated
Comment thread mcp-server/src/meshtastic_mcp/connection.py
Comment thread mcp-server/src/meshtastic_mcp/devices.py Outdated
@thebentern thebentern merged commit 21cef8c into master Apr 30, 2026
80 checks passed
@thebentern thebentern deleted the tcp-test-mcp branch April 30, 2026 18:51
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants