MCP server to drive Gearotons M17 open-source servomotors from natural language (Claude / any MCP client) over RS-485.
Project description
servomotor-mcp
Drive open-source Gearotons M17 servomotors from natural language.
An MCP server that exposes the M17 — a NEMA-17 integrated, closed-loop, RS-485 servomotor — as a small set of high-level tools. Connect it to Claude Desktop, Claude Code, or any MCP client and control real motors by just asking:
"Home everything, then draw a square with the X and Y axes."
It ships with a mock backend, so you can try the whole thing with no hardware.
The first servomotor with an official MCP server. Open hardware, open firmware, open software — and now an open, AI-native control interface.
Quickstart (no hardware, ~2 minutes)
# Run the server directly with uv (recommended):
uvx --from servomotor-mcp servomotor-mcp
# or install it:
pip install servomotor-mcp
servomotor-mcp
Then add it to Claude Desktop — copy the block from
examples/claude_desktop_config.json into your
claude_desktop_config.json, restart Claude Desktop, and ask:
"What motors do you have connected?" See examples/demo_prompts.md
for the full scripted demo.
Drive real motors
Plug an M17 (or a daisy-chain of them) into a USB↔RS-485 adapter and switch the backend:
pip install 'servomotor-mcp[serial]' # pulls in the Gearotons servomotor library
GEAROTONS_MOTOR_BACKEND=serial \
GEAROTONS_SERIAL_PORT=/dev/ttyUSB0 \
servomotor-mcp
Tools
| Tool | What it does |
|---|---|
list_motors |
Discover motors on the bus + positions (call first). |
move_to |
Move a motor to an absolute angle (closed-loop). |
move_relative |
Nudge a motor by a delta. |
trapezoid_move |
Smooth accel/decel move (best for arms/plotters). |
home |
Home one or all motors. |
get_status |
Position / moving / voltage / errors. |
stop |
Halt one or all motors. |
reset |
Recover a motor from a latched fault (firmware system reset, ~2 s). |
run_sequence |
Run a choreographed sequence ("draw a square"). |
How it works
natural language → Claude → MCP tool calls → this server → RS-485 → M17 motors
The server is a thin wrapper over the Gearotons servomotor Python library (high-level,
unit-aware commands — no DIR/STEP timing). It maps friendly aliases to real motors and
forwards each call straight to the hardware — no software clamping, so the motor does
exactly what it's asked (full multi-turn travel, any speed). The motor's own firmware
protections (over-current / over-voltage / over-temperature) still apply. The same intents
run against the mock backend for development and CI. Configure the alias→address map via
GEAROTONS_SERIAL_MOTORS (e.g. '{"x": 88}') or let the server auto-detect the bus.
Develop / test
pip install -e '.[dev]'
pytest # sequencer + mock-bus tests, no hardware needed
GEAROTONS_MOCK_SIM_SECONDS=0.4 servomotor-mcp # lifelike timing for demos
Status
- ✅ MCP server, full tool surface, mock backend — done; unit tests pass.
- ✅
SerialBusreal-hardware backend — verified against a physical M17 (fw 0.15.0.0): discovery, telemetry, closed-loop moves at 0.000° repeatability, and full multi-turn travel over MCP. Seehardware_tests/. - 🔜 Live FastMCP-over-stdio run with Claude Desktop needs a Python ≥3.10 host (tool logic already hardware-verified); plus the physical demo build + video. See demo spec.
License
MIT. Hardware, firmware, and software for the M17 are open-source — see github.com/tomrodinger/servomotor.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file servomotor_mcp-0.2.0.tar.gz.
File metadata
- Download URL: servomotor_mcp-0.2.0.tar.gz
- Upload date:
- Size: 87.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e33031ff9a2428ad2d03ca002252f0738fd9d8c7bb42c986a676f3d59de449e
|
|
| MD5 |
ccbdb66d71f4ac66daf3dd6fd461ff2c
|
|
| BLAKE2b-256 |
9c7edef6553aff3073723d5e7f55ca36faaacb43becc053a683d33d57db22984
|
Provenance
The following attestation bundles were made for servomotor_mcp-0.2.0.tar.gz:
Publisher:
publish.yml on Gearotons/servomotor-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
servomotor_mcp-0.2.0.tar.gz -
Subject digest:
6e33031ff9a2428ad2d03ca002252f0738fd9d8c7bb42c986a676f3d59de449e - Sigstore transparency entry: 2043815019
- Sigstore integration time:
-
Permalink:
Gearotons/servomotor-mcp@f2e162dd92fe25d2c26b7a2960e1d9b6c92ca4ec -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Gearotons
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2e162dd92fe25d2c26b7a2960e1d9b6c92ca4ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file servomotor_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: servomotor_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd0387b1d2e6460955875fffb862a25389e903b9ce7c5533cf20935c7254e38f
|
|
| MD5 |
93487f27e4c8c4437c1c85868493c58f
|
|
| BLAKE2b-256 |
21b7f0918a8090a79aa8c6ca73c1d3d95f724c6be0c90a8c56c1ef417439d710
|
Provenance
The following attestation bundles were made for servomotor_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Gearotons/servomotor-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
servomotor_mcp-0.2.0-py3-none-any.whl -
Subject digest:
dd0387b1d2e6460955875fffb862a25389e903b9ce7c5533cf20935c7254e38f - Sigstore transparency entry: 2043815052
- Sigstore integration time:
-
Permalink:
Gearotons/servomotor-mcp@f2e162dd92fe25d2c26b7a2960e1d9b6c92ca4ec -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Gearotons
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2e162dd92fe25d2c26b7a2960e1d9b6c92ca4ec -
Trigger Event:
push
-
Statement type: