# meshtastic-mcp

The meshtastic-mcp MCP server for Claude Code discovers, drives, and tests Meshtastic hardware over serial and TCP connections.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23 repo stars
- Author: meshtastic
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/meshtastic/meshtastic-mcp
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/meshtastic-mcp

## What it does

The server bridges AI assistants with Meshtastic devices for automated end-to-end testing and hardware diagnostics. Its core features work immediately against any connected device without requiring a firmware repository checkout.

The tool is distributed via PyPI and runs through `uvx`. Optional capabilities like firmware compilation or Android orchestration activate when local checkouts and environment variables such as `MESHTASTIC_FIRMWARE_ROOT` are configured.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `MESHTASTIC_FIRMWARE_ROOT`, `MESHTASTIC_MCP_TCP_HOST`, `MESHTASTIC_MCP_TOOLSETS`, `MESHTASTIC_MCP_READ_ONLY`, `MESHTASTIC_MCP_CONFIRM`, `MESHTASTIC_MCP_DATA_DIR`, `MESHTASTIC_UI_CAMERA_DEVICE`, `MESHTASTIC_UHUBCTL_LOCATION_TESTER`, `MESHTASTIC_PIO_BIN`, `MESHTASTIC_ANDROID_ROOT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MESHTASTIC_FIRMWARE_ROOT=<MESHTASTIC_FIRMWARE_ROOT> --env MESHTASTIC_MCP_TCP_HOST=<MESHTASTIC_MCP_TCP_HOST> --env MESHTASTIC_MCP_TOOLSETS=<MESHTASTIC_MCP_TOOLSETS> --env MESHTASTIC_MCP_READ_ONLY=<MESHTASTIC_MCP_READ_ONLY> --env MESHTASTIC_MCP_CONFIRM=<MESHTASTIC_MCP_CONFIRM> --transport stdio meshtastic-mcp -- uvx meshtastic-mcp
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from meshtastic-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add meshtastic-mcp --env MESHTASTIC_FIRMWARE_ROOT=<MESHTASTIC_FIRMWARE_ROOT> --env MESHTASTIC_MCP_TCP_HOST=<MESHTASTIC_MCP_TCP_HOST> --env MESHTASTIC_MCP_TOOLSETS=<MESHTASTIC_MCP_TOOLSETS> --env MESHTASTIC_MCP_READ_ONLY=<MESHTASTIC_MCP_READ_ONLY> --env MESHTASTIC_MCP_CONFIRM=<MESHTASTIC_MCP_CONFIRM> -- uvx meshtastic-mcp
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from meshtastic-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "meshtastic-mcp": {
            "command": "uvx",
            "args": [
                "meshtastic-mcp"
            ],
            "env": {
                "MESHTASTIC_FIRMWARE_ROOT": "<MESHTASTIC_FIRMWARE_ROOT>",
                "MESHTASTIC_MCP_TCP_HOST": "<MESHTASTIC_MCP_TCP_HOST>",
                "MESHTASTIC_MCP_TOOLSETS": "<MESHTASTIC_MCP_TOOLSETS>",
                "MESHTASTIC_MCP_READ_ONLY": "<MESHTASTIC_MCP_READ_ONLY>",
                "MESHTASTIC_MCP_CONFIRM": "<MESHTASTIC_MCP_CONFIRM>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from meshtastic-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "meshtastic-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "meshtastic-mcp"
            ],
            "env": {
                "MESHTASTIC_FIRMWARE_ROOT": "<MESHTASTIC_FIRMWARE_ROOT>",
                "MESHTASTIC_MCP_TCP_HOST": "<MESHTASTIC_MCP_TCP_HOST>",
                "MESHTASTIC_MCP_TOOLSETS": "<MESHTASTIC_MCP_TOOLSETS>",
                "MESHTASTIC_MCP_READ_ONLY": "<MESHTASTIC_MCP_READ_ONLY>",
                "MESHTASTIC_MCP_CONFIRM": "<MESHTASTIC_MCP_CONFIRM>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from meshtastic-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MESHTASTIC_FIRMWARE_ROOT=<MESHTASTIC_FIRMWARE_ROOT> -e MESHTASTIC_MCP_TCP_HOST=<MESHTASTIC_MCP_TCP_HOST> -e MESHTASTIC_MCP_TOOLSETS=<MESHTASTIC_MCP_TOOLSETS> -e MESHTASTIC_MCP_READ_ONLY=<MESHTASTIC_MCP_READ_ONLY> -e MESHTASTIC_MCP_CONFIRM=<MESHTASTIC_MCP_CONFIRM> meshtastic-mcp uvx meshtastic-mcp
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from meshtastic-mcp <command>

## When to use it
- discover connected Meshtastic device ports and nodes
- query device firmware version, region, and node count
- send text messages across the mesh network
- verify RF compliance using an RTL-SDR dongle

## Example prompts
- List connected Meshtastic devices
- Get device info for port /dev/cu.usbmodem101
- Send a text message to the mesh network

## Similar
- [Serial MCP](https://affpapa.org/en/nevibecode/mcp/serial-mcp.md) — MCP server · ★ 21 repo stars
- [pty-mcp](https://affpapa.org/en/nevibecode/mcp/pty-mcp.md) — MCP server · ★ 20 repo stars
- [arduino-cli-skill](https://affpapa.org/en/nevibecode/skills/arduino-cli-skill.md) — skill · 162 installs
- [arduino-serial-monitor](https://affpapa.org/en/nevibecode/skills/arduino-serial-monitor.md) — skill · 1 install
- [iot-fleet](https://affpapa.org/en/nevibecode/skills/iot-fleet.md) — skill · 766 installs
- [iot-register](https://affpapa.org/en/nevibecode/skills/iot-register.md) — skill · 737 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
