Get the FREE Ultimate OpenClaw Setup Guide →

arduino

An open source Arduino MCP server that enables AI assistants to interact with Arduino using structured tool access via the Model Context Protocol.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio akshatnerella-arduino-mcp-server npx -y arduino-mcp-server \
  --env ARDUINO_CLI_PATH="arduino-cli" \
  --env ARDUINO_SKETCH_ROOT="D:/Projects/arduino-sketches"

How to use

This MCP server automates Arduino development tasks from an MCP client. It integrates with arduino-cli workflows to perform dependency checks and installations, detect boards and ports, ensure cores are installed, compile and upload sketches, monitor serial output, and run safety preflight checks before writing to a device. It exposes a set of tools such as arduino_cli_doctor, install_arduino_cli, detect_hardware, compile_sketch, upload_sketch, upload_and_wait_ready, serial_open_session, serial_expect, serial_read, serial_write, serial_close_session, safety_preflight, and more, allowing you to orchestrate complex Arduino workflows entirely through MCP commands. You can also query board references and bundle resources for guidance during development. To get started, run the MCP server via the configured command, then use your MCP client to invoke the needed tools in sequence for tasks like bootstrap, compile/upload, and serial monitoring.

How to install

Prerequisites:

  • Node.js 20+ installed on your machine
  • Arduino CLI installed and available on your PATH (or configure ARDUINO_CLI_PATH as shown in the config)
  • Access to npm to install the MCP server package

Installation steps:

  1. Install the MCP server globally via npm: npm install -g arduino-mcp-server

  2. Confirm the installation and version (optional): arduino-mcp-server --version

  3. Configure MCP surface in Claude Desktop or your MCP client configuration using the example config: { "mcpServers": { "arduino": { "command": "npx", "args": ["-y", "arduino-mcp-server"], "env": { "ARDUINO_CLI_PATH": "arduino-cli", "ARDUINO_SKETCH_ROOT": "D:/Projects/arduino-sketches" } } } }

  4. If you prefer using npx directly in your workflow, you can run the server with: npx -y arduino-mcp-server

  5. Ensure arduino-cli is accessible by the MCP server through ARDUINO_CLI_PATH or PATH. If you need to customize paths for sketches, set ARDUINO_SKETCH_ROOT accordingly.

  6. (Optional) Build or test the MCP bundle if you are packaging a custom bundle: npm run build npm run mcpb:validate npm run mcpb:pack

Additional notes

Tips and common considerations:

  • The server relies on arduino-cli; ensure it is installed and can be invoked by the configured ARDUINO_CLI_PATH.
  • ARDUINO_SKETCH_ROOT is an optional absolute path to constrain sketch operations to a specific directory; adjust as needed for your environment.
  • When using serial operations, consider enabling safety_preflight to verify wiring and avoid unintended writes.
  • For bundling into an MCPB package, utilize the MCPB tooling (build, validate, pack) and note that manifest.json is consumed by mcpb while .mcpbignore can exclude dev/reference files from the bundle.
  • If you encounter permission or path issues, verify environment variables in your MCP surface configuration and ensure your shell has permission to access serial ports and connected boards.

Related MCP Servers

Sponsor this space

Reach thousands of developers