An MCP (Model Context Protocol) server that enables AI assistants to interact with Arduino hardware. This server provides tools for board detection, sketch uploading, and serial communication.
- Board Detection: List connected Arduino boards and get detailed board information
- Sketch Upload: Compile and upload Arduino sketches to connected boards
- Serial Communication: Monitor serial output and send commands to Arduino
- Python 3.10 or higher
- arduino-cli installed and available in PATH
# Clone the repository
git clone <your-repo-url>
cd Arduino
# Install the package
pip install -e .arduino-mcpAdd to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"arduino": {
"command": "arduino-mcp"
}
}
}Lists all connected Arduino boards with their ports and board types.
{
"boards": [
{
"port": "/dev/ttyUSB0",
"board_name": "Arduino Uno",
"fqbn": "arduino:avr:uno"
}
]
}Get detailed information about a specific board type.
Parameters:
fqbn(required): Fully Qualified Board Name (e.g.,arduino:avr:uno)
Compile and upload an Arduino sketch to a connected board.
Parameters:
sketch_path(required): Path to the.inosketch file or sketch directoryport(required): Serial port (e.g.,/dev/ttyUSB0,COM3)fqbn(required): Fully Qualified Board Name (e.g.,arduino:avr:uno)
Read data from the serial port of a connected Arduino.
Parameters:
port(required): Serial port (e.g.,/dev/ttyUSB0,COM3)baud_rate(optional): Baud rate for serial communication (default: 9600)duration(optional): How long to monitor in seconds (default: 5)
Send data/commands to Arduino via serial port.
Parameters:
port(required): Serial port (e.g.,/dev/ttyUSB0,COM3)message(required): Message to send to the Arduinobaud_rate(optional): Baud rate for serial communication (default: 9600)
mcp>=1.0.0- Model Context Protocol SDKpyserial>=3.5- Serial communication library
MIT