Engineering
arduino-mcp avatar

arduino-mcp

An MCP server enabling agents to edit, manage, and compile Arduino IDE 2.0 sketches, including source code manipulation and automated build capabilities via arduino-cli.

Introduction

The Arduino MCP Skill provides a specialized interface for AI agents to interact with Arduino IDE 2.0 projects. By utilizing the Model Context Protocol (MCP), it bridges the gap between natural language prompts and low-level source code manipulation, allowing for seamless development of embedded software. This skill is designed for developers, educators, and hobbyists who seek to automate repetitive coding tasks, refactor firmware, or implement continuous integration workflows for microcontroller projects.

The tool facilitates complete project lifecycle management, from validating project structures to compiling binary outputs. By maintaining a REST API with an MCP stdio transport, it ensures compatibility with a variety of agent frameworks like Moltbot or Clawdbot, while keeping operations constrained within defined project directories for security. Users can interact with their Arduino sketches to modify logic, add debugging statements, or manage multi-file projects involving .ino, .h, .cpp, or .c files.

  • Validates Arduino sketch folders to ensure proper IDE 2.0 compliance.

  • Reads and writes source files directly, with default functionality targeting the primary .ino file.

  • Lists all associated source files (headers, C/C++ source) within the project directory for comprehensive context.

  • Triggers build processes using the external arduino-cli utility, supporting custom FQBN (Fully Qualified Board Name) configurations.

  • Provides health checks and RESTful endpoints for integration with non-MCP environments.

  • Always define the projectRoot path when invoking tools to ensure operations are confined to the target sketch directory.

  • Changes are applied incrementally; for safety, the skill prefers modifying the main .ino file unless specific file paths are requested.

  • Requires Node.js 18+ and an optional installation of arduino-cli for compilation tasks.

  • Environment variables such as ARDUINO_FQBN and ARDUINO_API_PORT can be configured for specific hardware targets or custom port requirements.

  • Ideal for use cases involving serial debugging, library integration, or rapid prototyping across different boards like Nano, Uno, or ESP variants.

Repository Stats

Stars
0
Forks
0
Open Issues
0
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 10:51 PM
View on GitHub