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.
Files changed (2) hide show
  1. package/README.md +87 -122
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # Arduino MCP Server
1
+ # arduino-mcp-server
2
2
 
3
- Arduino MCP server for `arduino-cli` workflows: dependency checks/install, hardware detection, compile/upload, serial monitoring, board reference lookup, and safety preflight checks.
3
+ [![npm version](https://img.shields.io/npm/v/arduino-mcp-server)](https://www.npmjs.com/package/arduino-mcp-server)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+ [![Node.js 20+](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)
4
6
 
5
- This repository includes:
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
- ## Description
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
- ## Features
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
- ## Requirements
23
- - Node.js 20+
24
- - `arduino-cli` on `PATH`, or install/configure it through provided tools
13
+ ## What this does
25
14
 
26
- ## Installation
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": "D:/Projects/arduino-sketches"
43
+ "ARDUINO_SKETCH_ROOT": "/path/to/your/sketches"
44
44
  }
45
45
  }
46
46
  }
47
47
  }
48
48
  ```
49
49
 
50
- ## Configuration
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
- ## Usage Examples
55
- Example 1: Bootstrap missing Arduino CLI
52
+ ---
56
53
 
57
- User prompt:
58
- ```text
59
- Check if Arduino CLI is installed and install it automatically if missing.
60
- ```
54
+ ## What you can say
61
55
 
62
- Expected tool sequence:
63
- 1. `arduino_cli_doctor`
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
- Example 2: Compile and upload a sketch
59
+ **Compile and upload:**
60
+ > "Compile my Blink sketch and upload it to the Uno on COM6."
68
61
 
69
- User prompt:
70
- ```text
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
- Expected tool sequence:
75
- 1. `compile_sketch` with sketch path + fqbn
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
- Example 3: Open serial monitor session and wait for ready text
68
+ ---
79
69
 
80
- User prompt:
81
- ```text
82
- Open serial on COM6 at 115200 and wait until the device prints READY.
83
- ```
70
+ ## Tools
84
71
 
85
- Expected tool sequence:
86
- 1. `serial_open_session`
87
- 2. `serial_expect`
88
- 3. `serial_read` (optional for additional output)
89
- 4. `serial_close_session` (when done)
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
- Example 4: Safety preflight before writing to device
96
+ **Resources:**
97
+ - `arduino://boards/reference` — structured board pin/capability reference
92
98
 
93
- User prompt:
94
- ```text
95
- Before sending commands over serial, run a safety preflight for an Arduino Uno with my wiring details.
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
- Expected tool sequence:
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
- ```bash
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
- Summary:
152
- - No built-in telemetry or analytics.
153
- - Operations are local unless you explicitly invoke tooling that downloads dependencies.
154
- - Data handling by your MCP host application is governed by that host's policies.
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
- ## Support
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/akshatnerella/arduino-mcp-server
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
- ## Release
170
- - PRs into `main` must come from `release/*` branches.
171
- - PRs must include exactly one bump label: `patch`, `minor`, or `major`.
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
- MIT, see [LICENSE](LICENSE).
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.7",
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.akshatnerella/arduino-mcp-server",
32
+ "mcpName": "io.github.hardware-mcp/arduino-mcp-server",
33
33
  "repository": {
34
34
  "type": "git",
35
- "url": "git+https://github.com/akshatnerella/arduino-mcp-server.git"
35
+ "url": "git+https://github.com/hardware-mcp/arduino-mcp-server.git"
36
36
  },
37
37
  "bugs": {
38
- "url": "https://github.com/akshatnerella/arduino-mcp-server/issues"
38
+ "url": "https://github.com/hardware-mcp/arduino-mcp-server/issues"
39
39
  },
40
- "homepage": "https://github.com/akshatnerella/arduino-mcp-server#readme",
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",