Arduino MCP Server
v0.2.8Arduino MCP server for CLI setup, board detection, compile/upload, serial monitoring, and pin refs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_connected_boards List Connected Boards
List connected boards and serial ports detected by arduino-cli.
arduino_cli_doctor Arduino CLI Doctor
Check whether arduino-cli is available and return OS-specific installation instructions if missing.
install_arduino_cli Install Arduino CLI
Attempt to install arduino-cli for the current OS using available package managers, then verify and configure CLI path.
| Parameter | Type | Description |
|---|---|---|
method | string | Install method. Default `auto` tries OS-relevant methods in order. |
setCliPathInProcess | boolean | If true (default), set ARDUINO_CLI_PATH in this MCP process after install. |
list_supported_boards List Supported Boards
List supported/installable boards from the local arduino-cli index.
| Parameter | Type | Description |
|---|---|---|
search | string | Optional case-insensitive filter for name/FQBN. |
ensure_core_installed Ensure Core Installed
Ensure the Arduino core required by a board FQBN is installed. Can auto-install via `arduino-cli core install`.
| Parameter | Type | Description |
|---|---|---|
autoInstall | boolean | If true (default), install missing core automatically. |
coreId | string | Core ID, e.g. arduino:avr. |
fqbn | string | Board FQBN, e.g. arduino:avr:uno. |
detect_hardware Detect Hardware
Detect connected Arduino-compatible hardware, infer board/FQBN candidates, and generate next compile/upload commands.
| Parameter | Type | Description |
|---|---|---|
includeBoardDetails | boolean | If true, query `arduino-cli board details` for selected FQBN candidates. |
port | string | Optional exact port filter, e.g. COM6 or /dev/ttyACM0. |
list_serial_ports List Serial Ports
List serial ports and any detected board metadata using arduino-cli. Works on Windows/macOS/Linux.
compile_sketch Compile Sketch
Compile an Arduino sketch with a specific board FQBN.
| Parameter | Type | Description |
|---|---|---|
fqbn * | string | Board FQBN, e.g. arduino:avr:uno. |
sketchPath * | string | Path to sketch folder or .ino file. |
autoInstallCore | boolean | If true (default), auto-install missing board core before compile. |
buildPath | string | Optional build output directory. |
clean | boolean | If true, clean build cache before compile. |
exportBinaries | boolean | If true, export binaries into sketch folder. |
warnings | string |
upload_sketch Upload Sketch
Upload a compiled sketch to a connected board/port.
| Parameter | Type | Description |
|---|---|---|
port * | string | Serial port path, e.g. COM6 or /dev/ttyACM0. |
sketchPath * | string | Path to sketch folder or .ino file. |
autoInstallCore | boolean | If true (default), auto-install missing board core when fqbn is provided. |
fqbn | string | Optional board FQBN when auto-detect is insufficient. |
safetyContext | object | Optional electrical context for preflight checks. |
unsafeSkipPreflight | boolean | If true, bypasses safety_preflight checks. Use only when user explicitly accepts risk. |
verify | boolean | Verify uploaded binary when supported. |
upload_and_wait_ready Upload And Wait Ready
Upload a sketch and wait for a serial readiness pattern, handling post-upload reset/re-enumeration windows.
| Parameter | Type | Description |
|---|---|---|
port * | string | Serial port path, e.g. COM6 or /dev/ttyACM0. |
sketchPath * | string | Path to sketch folder or .ino file. |
autoInstallCore | boolean | If true (default), auto-install missing board core when fqbn is provided. |
fqbn | string | Optional board FQBN when auto-detect is insufficient. |
readyBaudRate | integer | Baud rate for readiness check. Default 115200. |
readyCaseSensitive | boolean | If true, readiness matching is case-sensitive. |
readyPattern | string | Optional serial text pattern to wait for after upload. |
readyTimeoutMs | integer | How long to wait for readyPattern. |
safetyContext | object | |
unsafeSkipPreflight | boolean | If true, bypasses safety_preflight checks. Use only when user explicitly accepts risk. |
verify | boolean | Verify uploaded binary when supported. |
read_serial_snapshot Read Serial Snapshot
Capture serial output for a bounded duration from a given port.
| Parameter | Type | Description |
|---|---|---|
port * | string | Serial port path, e.g. COM6 or /dev/ttyACM0. |
baudRate | integer | Baud rate. Default: 9600. |
durationMs | integer | Capture duration in ms. |
safety_preflight Safety Preflight
Run electrical preflight checks (voltage/current/pin risks) before upload or serial write operations.
| Parameter | Type | Description |
|---|---|---|
board | string | Board name/id (preferred when known). |
fqbn | string | Board FQBN when known. |
port | string | Optional port for automatic board inference. |
power | object | |
wiring | array |
serial_open_session Serial Open Session
Open a stateful serial monitor session with port lock ownership.
| Parameter | Type | Description |
|---|---|---|
port * | string | Serial port path, e.g. COM6 or /dev/ttyACM0. |
baudRate | integer | Baud rate. Default: 9600. |
maxBufferBytes | integer | Max in-memory receive buffer. |
ttlMs | integer | Session lease TTL in ms. |
serial_list_sessions Serial List Sessions
List active serial sessions and current port lock state.
serial_read Serial Read
Read buffered bytes from an open serial session.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
encoding | string | Output encoding. Default: utf8. |
fromOffset | integer | Read offset cursor. Defaults to current buffer start. |
maxBytes | integer | Maximum bytes to return. |
serial_expect Serial Expect
Wait for a string pattern in a serial session buffer with timeout.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
sessionId * | string | |
caseSensitive | boolean | |
fromOffset | integer | Optional explicit cursor offset. |
timeoutMs | integer |
serial_write Serial Write
Write bytes to an open serial session. Safety preflight is enforced unless explicitly skipped.
| Parameter | Type | Description |
|---|---|---|
data * | string | Payload to send. |
sessionId * | string | |
encoding | string | Payload encoding. Default: utf8. |
lineEnding | string | Optional line ending append. |
safetyContext | object | |
unsafeSkipPreflight | boolean | If true, bypasses safety_preflight checks. Use only with explicit user acceptance. |
serial_close_session Serial Close Session
Close a serial session and release its port lock.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string |
get_board_details Get Board Details
Get detailed board metadata from arduino-cli for a specific FQBN.
| Parameter | Type | Description |
|---|---|---|
fqbn * | string | Board FQBN, e.g. arduino:avr:uno. |
list_board_reference List Board Reference
List local board reference entries with pin/spec metadata.
search_board_reference Search Board Reference
Search local board reference by board name, alias, id, or FQBN.
| Parameter | Type | Description |
|---|---|---|
query * | string |