arduino
An open source Arduino MCP server that enables AI assistants to interact with Arduino using structured tool access via the Model Context Protocol.
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:
-
Install the MCP server globally via npm: npm install -g arduino-mcp-server
-
Confirm the installation and version (optional): arduino-mcp-server --version
-
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" } } } }
-
If you prefer using npx directly in your workflow, you can run the server with: npx -y arduino-mcp-server
-
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.
-
(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
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.