
Arduino MCP Server
io.github.hardware-mcpPublished by GitHub account hardware-mcpv0.2.8Updated Oct 24, 2026
Arduino MCP server for CLI setup, board detection, compile/upload, serial monitoring, and pin refs.
Overview
Local MCP server that wraps arduino-cli so an assistant can detect boards, compile and upload sketches, monitor serial ports, and run wiring safety checks.
- What you can do
- Detect connected boards and serial ports and infer board identifiers, with board and pin reference lookup and search. Compile sketches and upload them to a target board, including upload-and-wait-for-ready. Open, read, expect, write and close stateful serial sessions, plus one-shot serial snapshots. Run electrical safety preflight checks covering battery charge rate, battery polarity and ESP32-family pin hazards. Check or install arduino-cli and board cores, and browse setup prompts and a board reference resource.
- When to use it
- Useful when you want an assistant to drive an Arduino workflow end to end from natural language: setting up the toolchain, compiling and flashing sketches, watching serial output, or sanity-checking wiring and battery choices before powering hardware.
- Requirements
- Runs as a local stdio process on a desktop machine, installed from npm. Needs arduino-cli on the PATH or an ARDUINO_CLI_PATH pointing to the binary; the server can also guide installation. Optionally set ARDUINO_SKETCH_ROOT to restrict sketch operations to one directory. A connected board and serial port are needed for upload and serial tools.
Installation
In SourceWeft
- Open Arduino MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
arduino-mcp-server
[npm version] [License: MIT] [Node.js 20+]
Give your AI assistant full control over Arduino — compile, upload, monitor serial, and verify wiring safety, all through natural language.
Part of the HardwareMCP ecosystem — open-source MCP servers that bridge AI to physical hardware.
What this does
AI assistants can control Jira, GitHub, and databases. They can't talk to a microcontroller — until now.
arduino-mcp-server wraps arduino-cli into an MCP server so your AI can:
- Detect connected boards and ports automatically
- Compile and upload sketches without touching the terminal
- Monitor serial output with stateful sessions (open, read, expect, write, close)
- Run electrical safety checks before sending commands to hardware
- Manage dependencies — cores, libraries, and CLI installation
Quick Start
Install:
Add to Claude Desktop (claude_desktop_config.json):
Requires arduino-cli on your PATH, or let the server install it for you.
What you can say
Bootstrap from scratch:
"Check if Arduino CLI is installed and set everything up for an Arduino Uno."
Compile and upload:
"Compile my Blink sketch and upload it to the Uno on COM6."
Serial monitoring:
"Open serial on COM6 at 115200 and wait until the device prints READY."
Safety-first workflows:
"Run a safety preflight for an Arduino Uno with 5V on pin 13 at 25mA before I send commands."
Tools
Resources:
arduino://boards/reference— structured board pin/capability reference
Prompts:
arduino-cli-bootstrap-policy— policy for arduino-cli setup behaviorarduino-setup-assistant— guided Arduino environment setup
Safety preflight guardrails
safety_preflight (and the safetyContext passed to upload_sketch, upload_and_wait_ready, and serial_write) now also covers battery and ESP32-family pin footguns, driven by small, extensible data tables rather than hardcoded to any one board:
Battery charge-rate (C-rate) check — pass a battery object (capacityMah, chargeCurrentMa, chemistry) and the check computes chargeCurrentMa / batteryCapacityMah and flags it:
BATTERY_CRATE_UNSAFE(hard, blocking) above 1CBATTERY_CRATE_CAUTION(soft, non-blocking) above 0.5C
Generic small LiPo cells are commonly rated for roughly a 0.5–1C safe charge current, so the message spells out the math, e.g. "380mA into a 100mAh cell is a 3.8C rate — well above the ~0.5-1C safe range for typical small LiPo cells; verify your cell's actual rated charge current before proceeding." If chargeCurrentMa is omitted, it's inferred from a small board → onboard-charge-IC lookup table (currently seeded with Seeed XIAO ESP32S3, XIAO ESP32S3 Sense, and XIAO ESP32C3 — see data/battery-charge-ic-reference.json, easy to extend with more boards). These are approximate, manufacturer-published figures — verify against the live datasheet/wiki for your exact board revision before trusting them in a production workflow.
Battery polarity confirmation — when battery.connecting: true (or any battery field is set) but battery.polarityConfirmed isn't explicitly true, the preflight blocks with BATTERY_POLARITY_UNCONFIRMED and a reminder to never assume BAT+/BAT- from wire color. On Seeed XIAO boards it cites the official convention: the negative pad is closest to the USB-C port, positive is farthest from it.
ESP32-family pin safety (table-driven per board via data/board-reference.json):
- SPI-flash pins (GPIO6-11 on classic ESP32 WROOM/WROVER modules) — hard error (
SPI_FLASH_PIN_USED); wiring these prevents boot. - Boot-strapping pins (GPIO0/2/12/15 on classic ESP32) — caution; usable at runtime but risky if externally held during boot/reset (existing check).
- Input-only pins with no internal pull resistor (GPIO34-39 on classic ESP32) — caution (
NO_INTERNAL_PULL_PIN); add an external pull-up/pull-down if using them as buttons/switches. - Seeed XIAO ESP32S3 — modeled with its 11 usable GPIO (D0-D10), default I2C on D4/D5, and an informational note surfaced whenever D6/D7 are wired: they're hardware UART1 TX/RX by default, but enabling "USB CDC on Boot" frees them as plain GPIO.
Board data for all of the above lives in JSON, keyed by board id/FQBN, so more boards can be added without touching guardrail logic.
Configuration
Development
Part of HardwareMCP
This server is part of the HardwareMCP ecosystem — a collection of MCP servers that give AI assistants real control over physical hardware.
License
MIT — see LICENSE.
Support
Source: README.md at commit c020098
Tools
0Version history
1- v0.2.8LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts