↗ mesh-agent-mcp

understand the bridge

Give agents a useful view of your mesh.

Mesh Agent MCP connects an MCP-capable agent to meshctl and explicitly configured Meshtastic devices. It translates natural-language requests into a small, inspectable set of tools while keeping radio access and operational policy inside each provider boundary.

The short version

Why would anyone need this?

Mesh networks produce valuable context, but that context is usually split across commands, dashboards, logs, and radio-specific details. An MCP server gives an agent a standard way to ask for that context and use it responsibly.

01

Ask in plain language

“Which nodes have been quiet recently?” can become a structured sequence of read operations instead of a user stitching together several commands.

02

Keep one source of truth

The bridge reads the same meshctld API and event stream as other clients. It does not create a competing radio connection or invent a second state model.

03

Make automation legible

Agents see named tools, documented inputs, and explicit effects. Operators can understand what was requested before anything consequential is allowed.

Agent interaction

From question to mesh context.

The agent does not receive a shell prompt or unrestricted network access. It receives the MCP tool catalog and chooses a bounded operation.

01User asks

“Show me the radios and their connection health.”

→
02Agent selects tools

list_radios
get_radio_status

→
03Provider executes

Uses the selected provider boundary: meshctl API or explicit Meshtastic CLI.

→
04Agent explains result

“Radio A is connected; Radio B needs attention.”

Good fits

Useful when context matters.

✓

Incident triage
Summarize radio health, recent packets, and node changes before an operator investigates.

✓

Routine monitoring
Watch events and surface meaningful changes without manually tailing a stream.

✓

Field operations
Answer questions about reachability, routes, and known nodes while keeping the operator in control.

✓

Tool-building
Use a standard MCP surface from compatible desktop clients, agent frameworks, and automation runners.

A concrete conversation

Read first. Decide second.

A safe agent workflow gathers evidence before proposing an action.

USER

“Is node !abcd reachable, and when did we last hear from it?”

AGENT

I’ll inspect the current node record and recent packet history.

TOOLS

list_nodes → node found · list_packets → last packet 4 minutes ago

AGENT

Yes. It is known to meshctld and was last heard from 4 minutes ago. I found no newer packet.

Agent examples

What can an agent do?

These examples show the intended progression: discover, inspect, explain, then act only when explicitly authorized.

READ

Health summary

“Is my radio connected and what is its firmware?”

list_radios → get_radio_statusReturns link state, hardware, firmware, region, and local node identity.
LIVE

Watch the mesh

“Tell me when a node or packet changes.”

watch_eventsCollects the authenticated meshctld event stream for a bounded duration.
WRITE

Test channel message

“Find the test channel, confirm it, then send this message.”

list_channels → send_textChannel discovery comes first; writes require explicit opt-in and remain audited and rate-limited.
PROVIDER

Inspect a separate device

“Read the info from the Meshtastic device on my bench.”

meshtastic_info → meshtastic_nodesEnabled only with MESHTASTIC_HOST or MESHTASTIC_PORT, and never intended for a radio already managed by meshctld.

Human operator view

Use the TUI for a quick visual check.

meshctl-tui is a read-only companion for operators. It shares the authenticated meshctl client with the MCP server and never opens a second radio connection.

meshctl-tui configured radios view
Configured radios, provider, address, and link state.
meshctl-tui request error view
Errors stay visible in the footer and can be retried with r.

Boundaries matter

What this is not.

×

Not a replacement for meshctl.
meshctld remains the daemon and radio owner. Its HTTP/WebSocket authentication and API validation still apply; this project does not replace meshctl's server-side controls.

×

Not unrestricted shell access.
The agent gets declared MCP tools, not arbitrary commands or a raw serial port.

×

Not automatic write access.
Writes are opt-in, validated, allowlisted, rate-limited, and disabled by default.

Start with visibility

Let agents understand the mesh
before they act on it.