Arduino MCP Server

io.github.akshatnerella由 GitHub 帳號 akshatnerella 發布v0.2.7更新於 Nov 10, 2026

Arduino MCP server for CLI setup, board detection, compile/upload, serial monitoring, and pin refs.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

讓 AI 助理操控 Arduino 硬體:偵測開發板、編譯並上傳草稿碼、監控序列埠輸出,並執行電氣安全檢查。

可以做什麼
包裝 arduino-cli,讓助理能偵測已連接的開發板與序列埠、推斷開發板 FQBN、安裝板級核心、編譯草稿碼並上傳到裝置。它也提供具狀態的序列埠工作階段(開啟、讀取、等待、寫入、關閉)以及單次讀取,並在硬體操作前以安全檢查確認腳位電壓與電流。參考類工具提供腳位與能力資料,提示詞可引導 CLI 環境設定。
適用情境
當你希望助理不必切換終端機就能建置、燒錄與除錯 Arduino 草稿碼,或在嵌入式開發中查看序列埠輸出與腳位資訊時使用。它是僅限桌面的本機伺服器,適合已連接開發板的工作站。
執行需求
透過 stdio 在本機執行,從 npm 套件 arduino-mcp-server 安裝(需要 Node.js)。需要 arduino-cli 位於 PATH,或透過 ARDUINO_CLI_PATH 指定路徑;伺服器也可引導安裝。ARDUINO_SKETCH_ROOT 為選用,可把草稿碼操作限制在某個目錄。上傳與監控需要已連接的開發板和序列埠。
安裝前請注意
它會寫入硬體:upload_sketch 與 upload_and_wait_ready 會燒錄韌體,serial_write 會向裝置傳送資料,可能影響所連接的電路。safety_preflight 只是提示性檢查,並非保證。設定 ARDUINO_SKETCH_ROOT 可限制可存取的草稿碼路徑,未設定則檔案存取範圍更大。不要求任何憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Arduino MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

bash
npm install -g arduino-mcp-server

Add to Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "arduino": {      "command": "npx",      "args": ["-y", "arduino-mcp-server"],      "env": {        "ARDUINO_CLI_PATH": "arduino-cli",        "ARDUINO_SKETCH_ROOT": "/path/to/your/sketches"      }    }  }}

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

ToolWhat it does
arduino_cli_doctorCheck Arduino CLI installation and version
install_arduino_cliGuide through arduino-cli installation
detect_hardwareDetect connected boards and infer FQBNs
list_connected_boardsList all connected Arduino boards
list_serial_portsList available serial ports
ensure_core_installedCheck/install board cores
compile_sketchCompile a sketch for a target board
upload_sketchUpload compiled sketch to a board
upload_and_wait_readyUpload and wait for device ready signal
serial_open_sessionOpen a stateful serial session
serial_readRead buffered serial data
serial_expectWait for a pattern in serial output
serial_writeSend data over serial
serial_close_sessionClose a serial session
serial_list_sessionsList active serial sessions
read_serial_snapshotQuick one-shot serial read
safety_preflightElectrical safety check before hardware ops
get_board_detailsGet pin/capability details for a board
list_supported_boardsList all boards arduino-cli supports
list_board_referenceBrowse board pin reference
search_board_referenceSearch board reference by keyword

Resources:

  • arduino://boards/reference — structured board pin/capability reference

Prompts:

  • arduino-cli-bootstrap-policy — policy for arduino-cli setup behavior
  • arduino-setup-assistant — guided Arduino environment setup

Configuration

VariableDefaultDescription
ARDUINO_CLI_PATHarduino-cliPath to arduino-cli binary
ARDUINO_SKETCH_ROOT(none)Restrict sketch paths to this directory

Development

bash
git clone https://github.com/hardware-mcp/arduino-mcp-servercd arduino-mcp-servernpm installnpm run typechecknpm run buildnpm run dev

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

Open an issue

來源:README.md,提交 37ea038

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.7最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分