PIO Agent MCP server
io.github.jl-codes/platformio-mcp·v3.1.0·51 starsBuild, inspect, flash, and monitor PlatformIO firmware projects with policy-controlled tools.
51 stars131 downloads/wk
Reviews
Write oneNobody has reviewed PIO Agent yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
PIO Agent tools (75, 19 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
acquire_lockExplicitly claim the hardware queue lock for multi-step tasks. Throws if already held.
agent_build_diagnosewrite actionRuns build_project and returns rich structured diagnostics with error taxonomy, evidence, severity, retry-safety, and resource usage (RAM/Flash).
agent_flash_monitor_verifyBuilds (optionally), flashes firmware with monitor restart, then verifies runtime serial output against expected/rejected patterns and stability criteria.
agent_generate_board_reportGenerates a compact board intelligence report and caches it in .pio-mcp-workspace/boardReport.json.
agent_get_last_reportReturns the last persisted agent report from .pio-mcp-workspace/lastAgentReport.json.
agent_monitor_healthResolves one device, performs a bounded serial capture, evaluates health markers, and persists change-only automation state when automationKey is provided.
agent_resolve_targetResolves exactly one PlatformIO environment, board, and attached physical device. Returns ambiguity instead of guessing and issues a short-lived binding for write workflows.
agent_safe_pin_auditHeuristic static pin audit for board-specific GPIO risks (ESP32 strapping/input-only/flash pins).
agent_validate_projectAgent-oriented pre-flight validation for a PlatformIO project. Reports environments, board IDs, source-file presence, config gaps, connected devices, and recommended next actions.
build_projectCompiles the project and generates the firmware binary via PlatformIO. PREFERRED over running `pio run` directly in a shell — this tool integrates with the hardware lock, the content-hash build cache (skips toolchain work when src/ is unchanged), and a structured-error parser that returns `structuredErrors` + `nextSteps` alongside the raw log. Returns immediately on a cache hit (no compilation). S
cancel_taskwrite actionIdempotently cancels one known background task and releases only resources proven to be owned by that task.
capture_serial_windowAcquires a bounded serial-monitor lease, captures redacted incremental output, and restores or releases resources on every exit path.
check_projectStatic analysis validation.
check_task_statusPolls the status of an ongoing background task. Returns a JSON object where `status` indicates the success of the polling operation itself, and `targetStatus` (running, failed, completed) indicates the state of the actual background task.
clean_projectwrite actionRemoves build artifacts and compiled files from the project.
coredumpInspect an ESP core dump from a file or explicitly authorized device partition read, optionally analyzing it against an explicit ELF. Device reads can reset hardware and require separate device and host-command grants.
decode_backtraceDecode crash addresses against the selected current or retained ELF. Requires build permission for metadata; does not prove flashed-device identity.
deps_checkAudit declared and installed project dependencies, with optional separately authorized build and LDF graph evidence.
get_approval_requestReads one approval request and expiry without exposing approve or deny mutations to the agent.
get_board_infoGets detailed information about a specific board including MCU, frequency, flash, RAM, and supported frameworks.
get_dashboard_urlRetrieves the address and auth token for the MCP Web Dashboard. Automatically starts the web server on demand if offline.
get_lock_statusReveals who currently owns the hardware queue lock.
get_monitor_statusReports active, inactive, or stale serial monitor state with a bounded incremental cursor.
get_policy_statusReturns the active policy profile and allowed/approval-required/denied operations.
get_project_configDumps platformio.ini JSON.
get_project_contextReturns a compact pre-flight snapshot of a PlatformIO project: declared environments, source files under src/, `lib_deps`, build-cache state, firmware artifact path, connected serial devices, and a `nextSteps` checklist. Call this FIRST when starting work on a project instead of issuing several read_file/list_devices/cat-log calls — it collapses that ritual into a single deterministic response. Pu
init_projectInitializes a new PlatformIO project with the specified board and optional framework. Creates project structure with src/, include/, lib/, and test/ directories.
install_libraryInstalls a library from the PlatformIO registry either globally or to a specific project. Supports version specification.
list_boardsLists all available PlatformIO boards with optional filtering by platform, framework, or MCU. Supports 1000+ boards across 30+ platforms.
list_devicesLists all connected serial devices that can be used for firmware upload and monitoring.
list_installed_librariesLists all installed libraries either globally or for a specific project.
list_pending_approvalsLists pending project-scoped approval requests without exposing any approval mutation.
list_targetsList structured target metadata for selected or all environments. Requires build permission; does not execute the listed targets.
list_task_historyReturns compact project-scoped task history after reconciling stale tracked processes.
partition_tableInspect ESP partition artifacts and firmware fit. Optional buildMetadata requires build permission and can execute project scripts. Optional readDevice resets/reads an explicitly selected serial device with separate permissions.
pio_buildwrite actionRun a fresh PlatformIO build with optional parallel jobs and compact diagnostics. Canonical build permissions apply.
pio_checkwrite actionRun static analysis with structured defects, source locations and CWE. Canonical check permissions apply.
pio_cleanClean selected build artifacts, optionally including dependencies. Canonical destructive cleanup permission applies.
pio_coredumpCapture and save the selected ESP core-dump partition, optionally analyzing it against the matching project ELF. Configuration, metadata, device, export and analysis permissions remain separate.
pio_debug_cmdwrite actionSend a classified GDB/MI or console command to this connection's session. Inspection, target mutation and privileged host commands are authorized separately. Timeout does not halt a running target.
pio_debug_listList this connection's debugger sessions, observed target state and pending cleanup. Does not enumerate another connection's sessions or contact hardware.
pio_debug_stopwrite actionRun the configured reset/run hook with host and target permissions, then close owned GDB/backend process groups and release probe custody. Set process_only for recovery without target commands; failed cleanup retains the session for retry.
pio_decode_backtraceDecode supplied crash text or an owned monitor session against a verified ELF snapshot. Build metadata collection and serial reads retain separate canonical permissions.
pio_deps_checkCompatibility dependency audit using canonical permissions and optional authorized build evidence.
pio_list_devicesList serial device hints and caller-owned monitor sessions under canonical permissions.
pio_partition_tableInspect the effective ESP partition layout and optionally compare a serial device. Build metadata and hardware access retain separate canonical permissions.
pio_port_diagnoseInspect serial-port presence, permissions and observed holders without opening or closing the device. Missing holder evidence does not prove availability.
pio_project_initInitialize a PlatformIO project with ordered options. Canonical initialization and configuration-read permissions apply before filesystem changes.
pio_run_targetwrite actionRun a named target through the canonical effect permissions and caller-owned serial lifecycle.
pio_size_reportReport ELF sections, largest symbols/files and partition-aware PlatformIO accounting under canonical build permissions. Static RAM excludes runtime heap and stack.
pio_system_infoInspect PlatformIO Core, effective server policy and caller-owned monitors through canonical permissions.
pio_testwrite actionRun PlatformIO tests with per-case results. Embedded tests can upload and open hardware; canonical high-risk test permission applies. Build-only policy disables upload and test execution.
pio_uploadwrite actionBuild and upload firmware through shared upload permissions and caller-owned serial cleanup.
pkg_installInstall a library, platform or tool in a project and save dependencies through PlatformIO.
pkg_listList project packages and environments. Requires build permission because PlatformIO loads platform code.
pkg_outdatedReport outdated project packages. Requires build permission because PlatformIO loads platform code.
pkg_searchSearch PlatformIO library, platform or tool registry packages by type and page.
pkg_uninstallwrite actionRemove a library, platform or tool from a project and its declared dependencies.
pkg_updatewrite actionUpdate project dependencies within declared version constraints, with retained output and configuration change hashes.
project_envsList resolved project environments, inherited board/framework/port settings and configured defaults without running build scripts.
project_metadataGenerate bounded build metadata for selected or all environments. Requires build permission; may execute project scripts or install dependencies.
query_logsScans the latest active background serial trace spool, returning a filtered string block.
release_lockRelease the explicit queue lock matching your session ID.
reset_server_stateForcefully cleans all server locks and terminates any tracked daemon or compilation PIDs globally or locally.
run_targetwrite actionRun a named PlatformIO target with effect-based permissions. Serial upload targets coordinate owned monitors and endpoint custody; network/probe destinations require their dedicated workflow.
run_testswrite actionValidates unit tests locally/remote.
search_librariesSearches the PlatformIO library registry for available libraries by name, keywords, or description.
size_reportReport GNU symbols and PlatformIO memory accounting for one environment. Metadata and size checks require build permission and may execute project scripts.
start_monitorManually start or restart the background serial-to-disk spooler for a specific device.
stop_monitorwrite actionKills the active background serial listener and unlocks the UART.
system_infoGets sys diagnostic path output.
uninstall_librarywrite actionRemoves target library.
update_librarywrite actionUpgrades library versions.
upload_filesystemwrite actionBuilds and uploads a SPIFFS/LittleFS filesystem image to the connected device. PREFERRED over `pio run --target uploadfs` in a shell — same hardware-lock and port-auto-detect benefits as `upload_firmware`. Supports `start_monitor=true` to re-attach serial after upload.
upload_firmwarewrite actionUploads compiled firmware to a connected device. PREFERRED over `pio run --target upload` in a shell — this tool routes through the hardware lock to serialize port access, auto-detects the port, and (with `start_monitor=true`) re-attaches the serial monitor after the device re-enumerates. Automatically rebuilds via `build_project` semantics if the cache is cold.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan556 source files scanned13/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- highShell command built from a string (injection risk)
exec.shell-concatbuild/api/folder-picker.js: …edPath } else { '' }"; result = execSync(`powershell -NoProfile -Command "${script}"`, { timeout: 60_000…
How PIO Agent compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 74/100
- higher than 43% of 4,460 AI and agents servers
- Tools
- 75
- the typical AI and agents server has 6
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 51
- more than 92% of 2,711 AI and agents servers
- Downloads a week
- 131
- more than 69% of 1,538 AI and agents servers with a package
What its tools let an agent do: 54 read · 2 create · 13 change · 1 delete · 5 run or deploy
Install PIO Agent in Claude Code, Cursor or VS Code
Runs npx -y platformio-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add platformio-mcp -- npx -y platformio-mcp
What the publisher says
From the PIO Agent repository's README, as published. We do not edit it. Read it on GitHub
PIO Agent
PIO Agent is the open-source, agent-first hardware execution layer for embedded development, built on the PlatformIO MCP runtime.
3.1.0 development status
The parity branch prepares an unreleased 3.1.0 version with optional reference tool aliases, owned serial workflows, retained flash, OTA and expanded distribution candidates. Existing published installations remain 3.0.0. See the unreleased changelog, compatibility guide, and distribution readiness for implemented behavior, remaining acceptance, and which package names are prepared versus published.
Brand and Compatibility
PIO Agent is the product and Codex Plugin name. PlatformIO MCP is the underlying MCP runtime and the compatibility identity used by existing installations. The Codex plugin ID, marketplace ID, configuration keys, and skill namespace remain platformio-mcp. On npm, platformio-mcp is the canonical package while pio-mcp and pio-agent are thin compatibility packages that delegate to it. The canonical package also installs both platformio-mcp and pio-agent executable names. This lets existing consumers upgrade without migration while new users see PIO Agent throughout the interface.
It exposes PlatformIO workflows for board discovery, project setup, build, flash, monitor, diagnostics, and task orchestration through:
- an MCP server adapter
- a first-class CLI adapter (platformio-mcp / pio-agent)
- an optional local dashboard for visibility and control
MCP is one adapter. PlatformIO is the first backend.
Agent-First Capabilities
- Project readiness validation (agentvalidateproject)
- Rich build diagnostics with structured error taxonomy (agentbuilddiagnose)
- Board-aware GPIO safety audits (agentsafepin_audit)
- Flash + monitor + runtime assertions (agentflashmonitor_verify)
- Persistent workflow artifacts in .pio-mcp-workspace/ (lastAgentReport.json, boardReport.json)
- Board intelligence reports (agentgenerateboard_report)
- Policy profile introspection (getpolicystatus)
- Exact project/environment/device bindings (agentresolvetarget)
- Bounded, cursor-based serial health checks (agentmonitorhealth)
- Idempotent task cancellation and compact history (canceltask, listtask_history)
- Read-only approval status for agents; approval remains human-controlled
All risky operations still honor policy and approval rules.
Quick Start
1. Run the dashboard
npx platformio-mcp dashboard2. Use the CLI
All three npm names are supported. platformio-mcp is canonical; pio-mcp and pio-agent install the same CLI through thin dependency-only aliases:
npx platformio-mcp --help
npx pio-mcp --help
npx pio-agent --helpnpx --package platformio-mcp pio-agent devices
npx --package platformio-mcp pio-agent boards --filter esp32
npx platformio-mcp init --board esp32dev --framework arduino --project-dir ./firmware
npx platformio-mcp build --project-dir ./firmware
npx platformio-mcp flash --project-dir ./firmware --port auto
npx platformio-mcp monitor --project-dir ./firmware --port auto --expect BOOT_OK --timeout 30
npx platformio-mcp agent-validate --project-dir ./firmware
npx platformio-mcp agent-build-diagnose --project-dir ./firmware
npx platformio-mcp agent-safe-pin-audit --project-dir ./firmware --board esp32dev
npx platformio-mcp agent-flash-monitor-verify --project-dir ./firmware --expect-all BOOT_OK --reject-patterns "Guru Meditation,Brownout detector,WDT reset" --timeout 45
npx platformio-mcp agent-last-report --project-dir ./firmware
npx platformio-mcp policy-status --project-dir ./firmware
npx platformio-mcp task-status <task-id>Use --json for machine-readable output:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
PIO Agent: common questions
- Is PIO Agent MCP server safe?
- Mostly: it is graded B (74/100). Read the PIO Agent safety report
- How do I install PIO Agent?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does PIO Agent need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is PIO Agent maintained?
- The last commit was 39 days ago (2026-09-25). The latest release is v3.1.0.
- What can I use instead of PIO Agent?
- Servers from other publishers that do the same job: agent-device MCP server and AKShare MCP server.
- How does PIO Agent compare with other AI and agents MCP servers?
- safety score 74/100 (higher than 43% of 4,460 AI and agents servers); tools 75 (the typical AI and agents server has 6); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to PIO Agent
Same job from other publishers: the closest match first, then the best rated.
- agent-deviceLet AI agents inspect, control, and debug real iOS, Android, desktop, and TV appsnot reviewedWidely usedA
- AKShareLet a model explore AKShare's 1000+ China market data functions on its own — search, inspect, callnot reviewedEstablishedA