npm arduino-mcp-serverstdioMITupdated 16d ago
Give your AI assistant full control over Arduino — compile, upload, monitor serial, and verify wiring safety, all through natural language.
O que dá para fazer com Arduino MCP Server?
arduino-mcp-server
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:
npm install -g arduino-mcp-server
Add to Claude Desktop (claude_desktop_config.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
| Tool | What it does |
|---|---|
arduino_cli_doctor |
Check Arduino CLI installation and version |
install_arduino_cli |
Guide through arduino-cli installation |
detect_hardware |
Detect connected boards and infer FQBNs |
list_connected_boards |
List all connected Arduino boards |
list_serial_ports |
List available serial ports |
ensure_core_installed |
Check/install board cores |
compile_sketch |
Compile a sketch for a target board |
upload_sketch |
Upload compiled sketch to a board |
upload_and_wait_ready |
Upload and wait for device ready signal |
serial_open_session |
Open a stateful serial session |
serial_read |
Read buffered serial data |
serial_expect |
Wait for a pattern in serial output |
serial_write |
Send data over serial |
serial_close_session |
Close a serial session |
serial_list_sessions |
List active serial sessions |
read_serial_snapshot |
Quick one-shot serial read |
safety_preflight |
Electrical safety check before hardware ops |
get_board_details |
Get pin/capability details for a board |
list_supported_boards |
List all boards arduino-cli supports |
list_board_reference |
Browse board pin reference |
search_board_reference |
Search board reference by keyword |
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
Configuration
| Variable | Default | Description |
|---|---|---|
ARDUINO_CLI_PATH |
arduino-cli |
Path to arduino-cli binary |
ARDUINO_SKETCH_ROOT |
(none) | Restrict sketch paths to this directory |
Development
git clone https://github.com/hardware-mcp/arduino-mcp-server
cd arduino-mcp-server
npm install
npm run typecheck
npm run build
npm 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
Instalação
Adicione Arduino MCP Server ao seu cliente. Escolha o que você usa.
claude mcp add arduino-mcp-server -- npx -y arduino-mcp-servercodex mcp add arduino-mcp-server -- npx -y arduino-mcp-serveramp mcp add arduino-mcp-server -- npx -y arduino-mcp-server{
"mcpServers": {
"arduino-mcp-server": {
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"arduino-mcp-server": {
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"arduino-mcp-server","command":"npx","args":["-y","arduino-mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"arduino-mcp-server": {
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"arduino-mcp-server": {
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"arduino-mcp-server": {
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"arduino-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"arduino-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"arduino-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"arduino-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y arduino-mcp-serverRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
21 ferramentas
Arduino MCP Server expõe 21 ferramentas a um agente conectado.
- arduino_cli_doctor
- Check Arduino CLI installation and version
- install_arduino_cli
- Guide through arduino-cli installation
- detect_hardware
- Detect connected boards and infer FQBNs
- list_connected_boards
- List all connected Arduino boards
- list_serial_ports
- List available serial ports
- ensure_core_installed
- Check/install board cores
- compile_sketch
- Compile a sketch for a target board
- upload_sketch
- Upload compiled sketch to a board
- upload_and_wait_ready
- Upload and wait for device ready signal
- serial_open_session
- Open a stateful serial session
- serial_read
- Read buffered serial data
- serial_expect
- Wait for a pattern in serial output
- serial_write
- Send data over serial
- serial_close_session
- Close a serial session
- serial_list_sessions
- List active serial sessions
- read_serial_snapshot
- Quick one-shot serial read
- safety_preflight
- Electrical safety check before hardware ops
- get_board_details
- Get pin/capability details for a board
- list_supported_boards
- List all boards arduino-cli supports
- list_board_reference
- Browse board pin reference
- search_board_reference
- Search board reference by keyword
Pontuação
79 / 100
Boa
- Documentação21/25
- Manutenção25/25
- Confiança13/20
- Capacidade8/15
- Instalação12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 9 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 21 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Histórico de versões
| Versões | Publicada |
|---|---|
| 0.2.7Mais recente | 2 de mar. de 2026 |
| 0.2.6 | 1 de mar. de 2026 |
| 0.2.1 | 28 de fev. de 2026 |