# PIO Agent

PIO Agent lets a coding agent inspect PlatformIO projects, build and flash firmware, and monitor device output. Use it to run embedded-development tasks through an MCP client.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 54
- Author: jl-codes
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jl-codes/platformio-mcp
- Updated: 2026-10-13
- HTML: https://affpapa.org/en/nevibecode/mcp/pio-agent

## What it does

The server exposes PlatformIO tools for discovering boards and devices, initializing projects, building firmware, flashing hardware, and monitoring serial output. It can also diagnose build and upload failures, audit GPIO use for board safety, and check runtime output against expected conditions. Add `--json` to CLI commands when you need machine-readable results.

Policy rules and approval gates apply to risky operations. The agent can inspect approval status, while a person retains control over approval. Flashing is therefore subject to those checks. In Claude Code, connect the server with `claude mcp add platformio-mcp -- npx -y platformio-mcp`; each session using this setup starts its own server process.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add platformio-mcp -- npx -y platformio-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add pio-agent -- npx -y platformio-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pio-agent": {
            "command": "npx",
            "args": [
                "-y",
                "platformio-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pio-agent": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "platformio-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add pio-agent npx -y platformio-mcp
```

## When to use it
- discover connected boards and devices
- initialize a PlatformIO project for a board
- build firmware and inspect build failures
- flash a device and check serial output
- audit GPIO use against board safety

## Example prompts
- Find the connected boards and devices with PIO Agent.
- Build the PlatformIO project in `./firmware` and return JSON output.
- Flash the project in `./firmware` and check the monitor for `BOOT_OK`.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
