arduino-mcp-server 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -122
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# arduino-mcp-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/arduino-mcp-server)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://nodejs.org)
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
- `server.json` for MCP Registry metadata.
|
|
7
|
-
- `manifest.json` for Claude Desktop MCP bundle (`.mcpb`) packaging.
|
|
7
|
+
**Give your AI assistant full control over Arduino — compile, upload, monitor serial, and verify wiring safety, all through natural language.**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Use this server to automate Arduino setup and development tasks from an MCP client while keeping operations local to your machine.
|
|
9
|
+
Part of the [HardwareMCP](https://github.com/hardware-mcp) ecosystem — open-source MCP servers that bridge AI to physical hardware.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
- Arduino CLI dependency diagnosis and guided installation
|
|
14
|
-
- Board/port detection with FQBN inference
|
|
15
|
-
- Core installation checks and optional auto-install
|
|
16
|
-
- Sketch compile/upload workflows
|
|
17
|
-
- Upload-and-wait serial readiness flow
|
|
18
|
-
- Stateful serial sessions (`open`, `read`, `expect`, `write`, `close`)
|
|
19
|
-
- Electrical safety preflight checks
|
|
20
|
-
- Board reference resource and setup prompts
|
|
11
|
+
---
|
|
21
12
|
|
|
22
|
-
##
|
|
23
|
-
- Node.js 20+
|
|
24
|
-
- `arduino-cli` on `PATH`, or install/configure it through provided tools
|
|
13
|
+
## What this does
|
|
25
14
|
|
|
26
|
-
|
|
27
|
-
Install from npm:
|
|
15
|
+
AI assistants can control Jira, GitHub, and databases. They can't talk to a microcontroller — until now.
|
|
28
16
|
|
|
17
|
+
`arduino-mcp-server` wraps `arduino-cli` into an MCP server so your AI can:
|
|
18
|
+
|
|
19
|
+
- **Detect** connected boards and ports automatically
|
|
20
|
+
- **Compile and upload** sketches without touching the terminal
|
|
21
|
+
- **Monitor serial output** with stateful sessions (open, read, expect, write, close)
|
|
22
|
+
- **Run electrical safety checks** before sending commands to hardware
|
|
23
|
+
- **Manage dependencies** — cores, libraries, and CLI installation
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
**Install:**
|
|
29
30
|
```bash
|
|
30
31
|
npm install -g arduino-mcp-server
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
Add to Claude Desktop (`claude_desktop_config.json`):
|
|
34
|
-
|
|
34
|
+
**Add to Claude Desktop** (`claude_desktop_config.json`):
|
|
35
35
|
```json
|
|
36
36
|
{
|
|
37
37
|
"mcpServers": {
|
|
@@ -40,125 +40,81 @@ Add to Claude Desktop (`claude_desktop_config.json`):
|
|
|
40
40
|
"args": ["-y", "arduino-mcp-server"],
|
|
41
41
|
"env": {
|
|
42
42
|
"ARDUINO_CLI_PATH": "arduino-cli",
|
|
43
|
-
"ARDUINO_SKETCH_ROOT": "
|
|
43
|
+
"ARDUINO_SKETCH_ROOT": "/path/to/your/sketches"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
- `ARDUINO_CLI_PATH`: Arduino CLI command/path (default: `arduino-cli`)
|
|
52
|
-
- `ARDUINO_SKETCH_ROOT`: optional absolute root restricting sketch compile/upload paths
|
|
50
|
+
Requires [arduino-cli](https://arduino.github.io/arduino-cli/) on your PATH, or let the server install it for you.
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
Example 1: Bootstrap missing Arduino CLI
|
|
52
|
+
---
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
Check if Arduino CLI is installed and install it automatically if missing.
|
|
60
|
-
```
|
|
54
|
+
## What you can say
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
2. `install_arduino_cli` (when missing)
|
|
65
|
-
3. `arduino_cli_doctor` (re-check)
|
|
56
|
+
**Bootstrap from scratch:**
|
|
57
|
+
> "Check if Arduino CLI is installed and set everything up for an Arduino Uno."
|
|
66
58
|
|
|
67
|
-
|
|
59
|
+
**Compile and upload:**
|
|
60
|
+
> "Compile my Blink sketch and upload it to the Uno on COM6."
|
|
68
61
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Compile D:/Projects/arduino-sketches/Blink for arduino:avr:uno and upload it to COM6.
|
|
72
|
-
```
|
|
62
|
+
**Serial monitoring:**
|
|
63
|
+
> "Open serial on COM6 at 115200 and wait until the device prints READY."
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
2. `upload_sketch` with sketch path + fqbn + port
|
|
65
|
+
**Safety-first workflows:**
|
|
66
|
+
> "Run a safety preflight for an Arduino Uno with 5V on pin 13 at 25mA before I send commands."
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
---
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
Open serial on COM6 at 115200 and wait until the device prints READY.
|
|
83
|
-
```
|
|
70
|
+
## Tools
|
|
84
71
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
| Tool | What it does |
|
|
73
|
+
|------|-------------|
|
|
74
|
+
| `arduino_cli_doctor` | Check Arduino CLI installation and version |
|
|
75
|
+
| `install_arduino_cli` | Guide through arduino-cli installation |
|
|
76
|
+
| `detect_hardware` | Detect connected boards and infer FQBNs |
|
|
77
|
+
| `list_connected_boards` | List all connected Arduino boards |
|
|
78
|
+
| `list_serial_ports` | List available serial ports |
|
|
79
|
+
| `ensure_core_installed` | Check/install board cores |
|
|
80
|
+
| `compile_sketch` | Compile a sketch for a target board |
|
|
81
|
+
| `upload_sketch` | Upload compiled sketch to a board |
|
|
82
|
+
| `upload_and_wait_ready` | Upload and wait for device ready signal |
|
|
83
|
+
| `serial_open_session` | Open a stateful serial session |
|
|
84
|
+
| `serial_read` | Read buffered serial data |
|
|
85
|
+
| `serial_expect` | Wait for a pattern in serial output |
|
|
86
|
+
| `serial_write` | Send data over serial |
|
|
87
|
+
| `serial_close_session` | Close a serial session |
|
|
88
|
+
| `serial_list_sessions` | List active serial sessions |
|
|
89
|
+
| `read_serial_snapshot` | Quick one-shot serial read |
|
|
90
|
+
| `safety_preflight` | Electrical safety check before hardware ops |
|
|
91
|
+
| `get_board_details` | Get pin/capability details for a board |
|
|
92
|
+
| `list_supported_boards` | List all boards arduino-cli supports |
|
|
93
|
+
| `list_board_reference` | Browse board pin reference |
|
|
94
|
+
| `search_board_reference` | Search board reference by keyword |
|
|
90
95
|
|
|
91
|
-
|
|
96
|
+
**Resources:**
|
|
97
|
+
- `arduino://boards/reference` — structured board pin/capability reference
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
```
|
|
99
|
+
**Prompts:**
|
|
100
|
+
- `arduino-cli-bootstrap-policy` — policy for arduino-cli setup behavior
|
|
101
|
+
- `arduino-setup-assistant` — guided Arduino environment setup
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
1. `safety_preflight`
|
|
100
|
-
2. `serial_write` only if preflight does not block
|
|
101
|
-
|
|
102
|
-
## MCP Surface
|
|
103
|
-
Tools:
|
|
104
|
-
- `arduino_cli_doctor`
|
|
105
|
-
- `install_arduino_cli`
|
|
106
|
-
- `detect_hardware`
|
|
107
|
-
- `ensure_core_installed`
|
|
108
|
-
- `compile_sketch`
|
|
109
|
-
- `upload_sketch`
|
|
110
|
-
- `upload_and_wait_ready`
|
|
111
|
-
- `read_serial_snapshot`
|
|
112
|
-
- `safety_preflight`
|
|
113
|
-
- `serial_open_session`
|
|
114
|
-
- `serial_list_sessions`
|
|
115
|
-
- `serial_read`
|
|
116
|
-
- `serial_expect`
|
|
117
|
-
- `serial_write`
|
|
118
|
-
- `serial_close_session`
|
|
119
|
-
- `list_connected_boards`
|
|
120
|
-
- `list_supported_boards`
|
|
121
|
-
- `list_serial_ports`
|
|
122
|
-
- `get_board_details`
|
|
123
|
-
- `list_board_reference`
|
|
124
|
-
- `search_board_reference`
|
|
125
|
-
|
|
126
|
-
Resources:
|
|
127
|
-
- `arduino://boards/reference`
|
|
128
|
-
|
|
129
|
-
Prompts:
|
|
130
|
-
- `arduino-cli-bootstrap-policy`
|
|
131
|
-
- `arduino-setup-assistant`
|
|
132
|
-
|
|
133
|
-
## MCP Bundle (MCPB)
|
|
134
|
-
Build and package:
|
|
103
|
+
---
|
|
135
104
|
|
|
136
|
-
|
|
137
|
-
npm run build
|
|
138
|
-
npm run mcpb:validate
|
|
139
|
-
npm run mcpb:pack
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Notes:
|
|
143
|
-
- `manifest.json` is consumed by `mcpb`.
|
|
144
|
-
- `.mcpbignore` excludes dev/reference files from bundle packaging.
|
|
145
|
-
- Bundle output is written as `<name>.mcpb` in the current directory by default.
|
|
146
|
-
|
|
147
|
-
## Privacy Policy
|
|
148
|
-
- Policy URL: https://github.com/akshatnerella/arduino-mcp-server/blob/main/PRIVACY.md
|
|
149
|
-
- Local copy: [PRIVACY.md](PRIVACY.md)
|
|
105
|
+
## Configuration
|
|
150
106
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
107
|
+
| Variable | Default | Description |
|
|
108
|
+
|----------|---------|-------------|
|
|
109
|
+
| `ARDUINO_CLI_PATH` | `arduino-cli` | Path to arduino-cli binary |
|
|
110
|
+
| `ARDUINO_SKETCH_ROOT` | *(none)* | Restrict sketch paths to this directory |
|
|
155
111
|
|
|
156
|
-
|
|
157
|
-
- GitHub Issues: https://github.com/akshatnerella/arduino-mcp-server/issues
|
|
112
|
+
---
|
|
158
113
|
|
|
159
114
|
## Development
|
|
115
|
+
|
|
160
116
|
```bash
|
|
161
|
-
git clone https://github.com/
|
|
117
|
+
git clone https://github.com/hardware-mcp/arduino-mcp-server
|
|
162
118
|
cd arduino-mcp-server
|
|
163
119
|
npm install
|
|
164
120
|
npm run typecheck
|
|
@@ -166,9 +122,18 @@ npm run build
|
|
|
166
122
|
npm run dev
|
|
167
123
|
```
|
|
168
124
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Part of HardwareMCP
|
|
128
|
+
|
|
129
|
+
This server is part of the [HardwareMCP](https://github.com/hardware-mcp) ecosystem — a collection of MCP servers that give AI assistants real control over physical hardware.
|
|
130
|
+
|
|
131
|
+
---
|
|
172
132
|
|
|
173
133
|
## License
|
|
174
|
-
|
|
134
|
+
|
|
135
|
+
MIT — see [LICENSE](LICENSE).
|
|
136
|
+
|
|
137
|
+
## Support
|
|
138
|
+
|
|
139
|
+
[Open an issue](https://github.com/hardware-mcp/arduino-mcp-server/issues)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arduino-mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Arduino CLI wrapper MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"arduino",
|
|
30
30
|
"arduino-cli"
|
|
31
31
|
],
|
|
32
|
-
"mcpName": "io.github.
|
|
32
|
+
"mcpName": "io.github.hardware-mcp/arduino-mcp-server",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
35
|
+
"url": "git+https://github.com/hardware-mcp/arduino-mcp-server.git"
|
|
36
36
|
},
|
|
37
37
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/
|
|
38
|
+
"url": "https://github.com/hardware-mcp/arduino-mcp-server/issues"
|
|
39
39
|
},
|
|
40
|
-
"homepage": "https://github.com/
|
|
40
|
+
"homepage": "https://github.com/hardware-mcp/arduino-mcp-server#readme",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.17.4",
|