Arduino MCP server for CLI setup, board detection, compile/upload, serial monitoring, and pin refs.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
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:
Install:
Add to Claude Desktop (claude_desktop_config.json):
Requires arduino-cli on your PATH, or let the server install it for you.
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."
| Tool | What it does |
|---|---|
arduino_cli_doctor | Check Arduino CLI installation and version |
install_arduino_cli | Guide through arduino-cli installation |
detect_hardware | Detect connected boards and infer FQBNs |
list_connected_boards | List all connected Arduino boards |
list_serial_ports | List available serial ports |
ensure_core_installed | Check/install board cores |
compile_sketch | Compile a sketch for a target board |
upload_sketch | Upload compiled sketch to a board |
upload_and_wait_ready | Upload and wait for device ready signal |
serial_open_session | Open a stateful serial session |
serial_read | Read buffered serial data |
serial_expect | Wait for a pattern in serial output |
serial_write | Send data over serial |
serial_close_session | Close a serial session |
serial_list_sessions | List active serial sessions |
read_serial_snapshot | Quick one-shot serial read |
safety_preflight | Electrical safety check before hardware ops |
get_board_details | Get pin/capability details for a board |
list_supported_boards | List all boards arduino-cli supports |
list_board_reference | Browse board pin reference |
search_board_reference | Search board reference by keyword |
Resources:
arduino://boards/reference β structured board pin/capability referencePrompts:
arduino-cli-bootstrap-policy β policy for arduino-cli setup behaviorarduino-setup-assistant β guided Arduino environment setupsafety_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.5CGeneric 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_PIN_USED); wiring these prevents boot.NO_INTERNAL_PULL_PIN); add an external pull-up/pull-down if using them as buttons/switches.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.
| Variable | Default | Description |
|---|---|---|
ARDUINO_CLI_PATH | arduino-cli | Path to arduino-cli binary |
ARDUINO_SKETCH_ROOT | (none) | Restrict sketch paths to this directory |
This server is part of the HardwareMCP ecosystem β a collection of MCP servers that give AI assistants real control over physical hardware.
MIT β see LICENSE.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/arduino-mcp-server-2)<a href="https://allmcps.com/mcp/arduino-mcp-server-2"><img src="https://allmcps.com/api/badge/arduino-mcp-server-2?style=directory" alt="Arduino MCP Server on AllMCPs" /></a>