
Arduino MCP Server
io.github.hardware-mcp由 GitHub 帳號 hardware-mcp 發布v0.2.8更新於 Oct 24, 2026
Arduino MCP server for CLI setup, board detection, compile/upload, serial monitoring, and pin refs.
概覽
本機 MCP 伺服器,封裝 arduino-cli,讓助理偵測開發板、編譯並上傳草稿碼、監控序列埠,並執行接線安全檢查。
- 可以做什麼
- 偵測已連接的開發板和序列埠並推斷板卡識別碼,同時提供板卡與腳位參考的瀏覽和搜尋。編譯草稿碼並上傳到目標開發板,包括上傳後等待裝置就緒。開啟、讀取、等待符合樣式、寫入和關閉具狀態的序列埠工作階段,並支援一次性序列埠快照。執行電氣安全預檢,涵蓋電池充電倍率、電池極性和 ESP32 系列腳位風險。檢查或安裝 arduino-cli 與板卡核心,並提供安裝引導提示和板卡參考資源。
- 適用情境
- 適合希望用自然語言讓助理端到端操作 Arduino 流程的情境:建置工具鏈、編譯並燒錄草稿碼、觀察序列埠輸出,或在供電給硬體前核對接線與電池選擇。
- 執行需求
- 以本機 stdio 程序在桌上型電腦上執行,透過 npm 安裝。需要 arduino-cli 位於 PATH 中,或以 ARDUINO_CLI_PATH 指向該執行檔;伺服器也可引導安裝。可選設定 ARDUINO_SKETCH_ROOT 將草稿碼操作限制在某個目錄。上傳和序列埠工具需要已連接的開發板和序列埠。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Arduino MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 c020098
工具
0版本歷史
1- v0.2.8最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分