mpremote-mcp
# mpremote-mcp
MCP server for MicroPython boards via [mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html).
## Install
```bash
uvx mpremote-mcp
```
Or:
```bash
pip install mpremote-mcp
mpremote-mcp
```
## Configuration
| Variable | Default | Description |
|----------|---------|-------------|
| `MPY_PORT` | auto-detect | Serial port override (e.g. `COM3`, `/dev/ttyACM0`) |
| `MPY_BAUD` | `115200` | Baud rate |
Auto-detection connects to the first USB serial device found.
### MCP client config example
```json
{
"mcpServers": {
"micropython": {
"command": "uvx",
"args": ["mpremote-mcp"]
}
}
}
```
## Tools
| Tool | Description |
|------|-------------|
| `exec` | Execute MicroPython code via raw REPL |
| `eval` | Evaluate an expression and return result |
| `run` | Run a local .py file on device from RAM |
| `device_info` | Board name, MicroPython version, memory info |
| `list_files` | List files/directories on device |
| `read_file` | Read file from device |
| `write_file` | Write file to device |
| `mkdir` | Create directory |
| `rmdir` | Remove directory |
| `rm` | Remove file |
| `touch` | Create empty file |
| `df` | Filesystem storage stats |
| `mip_install` | Install MicroPython package |
| `rtc_get` | Read device real-time clock |
| `rtc_set` | Sync device RTC to host time |
| `soft_reset` | Soft-reset (Ctrl-D equivalent) |
| `hard_reset` | Hard reset (machine.reset()) |
| `enter_bootloader` | Enter USB bootloader for flashing |
TDQS
Scored across 18 tools
Most tools map to clearly distinct resources and actions, especially filesystem operations and reset modes. The main overlap is between exec, eval, and run, which all execute code but differ in context and return behavior; descriptions help but could still cause occasional misselection.
All names use snake_case, but conventions are mixed: some are verb_noun (read_file, list_files), some are bare verbs/commands (exec, rm, touch, df), and some are noun_verb or adjective_noun (device_info, soft_reset, rtc_get). The names are readable, but there is no single predictable pattern.
Eighteen tools is slightly heavy but reasonable for a board-management server covering filesystem, execution, resets, packages, and RTC. Each tool appears to earn its place, though a few could arguably be consolidated.
The surface covers core device filesystem operations, code execution, resets, package installation, and RTC access well. Minor gaps like file rename/copy or explicit device discovery/connection management are absent, but most workflows can be worked around.