
Gearotons M17 Servomotor
io.github.Gearotons由 GitHub 帳號 Gearotons 發布v0.3.3更新於 Oct 24, 2026
Drive Gearotons M17 open-source servomotors from plain English over RS-485; mock mode, no hardware.
概覽
本機 MCP 伺服器,讓助理用自然語言探索、連線並驅動 Gearotons M17 RS-485 伺服馬達,並提供不需硬體的模擬模式。
- 可以做什麼
- 探索序列埠並連線馬達匯流排,自動偵測匯流排上的馬達,也可中斷連線或重新掃描(detect_devices 會重新啟動馬達)。列出偵測到的馬達及其即時位置、電壓、溫度和狀態,並讀取單一馬達快照、將錯誤解碼成易懂說明。以角度為單位做絕對或相對移動,停止單一或全部馬達,執行編排好的步驟序列(可含原始命令步驟)。把每條韌體命令各自暴露成工具,例如 enable_mosfets、homing、zero_position、set_pid_constants、set_device_alias、vibrate、system_reset,可用別名、唯一 ID 或 all 指定馬達。
- 適用情境
- 當你有接在 RS-485 匯流排上的 Gearotons M17 伺服馬達,想透過 Claude Desktop、Claude Code 或其他 MCP 用戶端以對話方式驅動它們時適用。也可在沒有硬體時用模擬後端體驗完整命令集。
- 執行需求
- 以 Python 套件(servomotor-mcp,可透過 pip 或 uvx)在本機以 stdio 執行。驅動真實馬達需安裝 serial 附加元件(會引入 Gearotons servomotor 函式庫)以及 USB 轉 RS-485 轉接器;未安裝該函式庫時伺服器會執行模擬器。選用環境變數 GEAROTONS_MOTOR_BACKEND、GEAROTONS_SERIAL_PORT、GEAROTONS_DEFAULT_SPEED_DPS。僅支援桌面端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gearotons M17 Servomotor,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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 — to Claude Desktop, Claude Code, or any MCP client. Control real motors by just asking:
"Find my motors and rotate the one on the bench two full turns, slowly."
Nothing is hardcoded: the server discovers your serial ports, auto-detects the
motors on the bus (the firmware's "Detect devices" command), and exposes the entire
firmware command set — every command in the servomotor library's catalog becomes an
MCP tool automatically (48 commands as of library 0.10.0), plus a few high-level tools
for everyday moves. It ships with a mock backend, so you can try the whole thing with
no hardware.
▶ 50-second video: the real motor and this session side by side — recorded 2026-09-09 on a bench M17; every line above is from the session log.
Step-by-step tutorial (boxed motor to "talk to it" in about twenty minutes): Talk to a servomotor from Claude Code on Hackster.
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)
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 serial ports do you see? Connect and find my motors."
See examples/demo_prompts.md for a scripted demo.
Drive real motors
Plug an M17 (or a daisy-chain of them) into a USB↔RS-485 adapter and install the
[serial] extra — that's it, no configuration:
With the servomotor library installed the server uses the real serial backend
automatically. Without it, the server runs its simulator and says so: list_serial_ports
and connect return a notice field, and a warning goes to stderr. With uv, use
uvx --from 'servomotor-mcp[serial]' servomotor-mcp. In a session, the model then:
list_serial_ports— enumerates the machine's ports (macOS/dev/cu.*, WindowsCOM*, Linux/dev/ttyUSB*), flagging USB serial adapters;connect— opens the port you (or it) picked, at 230400 baud;- auto-detects every motor on that bus (unique ID + alias) — no address maps to write;
- drives them. Tell it in plain English which adapter to use if you have several.
Tools
High-level (discovery + everyday motion):
Plus one tool per firmware command, generated from the library's command catalog:
enable_mosfets, go_to_position, move_with_velocity, move_with_acceleration,
multimove, homing, zero_position, get_position, get_temperature,
set_device_alias, set_pid_constants, system_reset, vibrate, ping, … — anything
the motor can do, the model can do. Motors are addressed by their alias number, their
16-hex-digit unique ID, or "all" (broadcast). Values are in friendly units (degrees,
seconds, degrees/s, volts, °C); the server converts to firmware units.
How it works
The server is a thin layer over the Gearotons servomotor Python library. The library is
data-driven — motor_commands.json defines every firmware command — and the server turns
that same catalog into MCP tools, so new library commands appear automatically. Tool calls
are forwarded straight to the hardware — no software clamping; full multi-turn travel, any
speed. The motor's own firmware protections (over-current / over-voltage /
over-temperature) still apply. The same tools run against the mock backend
(GEAROTONS_MOTOR_BACKEND=mock) for development and CI.
Environment variables (all optional):
GEAROTONS_MOTOR_BACKEND—auto(default: serial when theservomotorlibrary is installed, else mock),serial, ormock.GEAROTONS_SERIAL_PORT— default port forconnectwhen the model doesn't pass one.GEAROTONS_DEFAULT_SPEED_DPS— default speed formove_to/move_relative(180).
Develop / test
hardware_tests/ contains scripts that exercise the real serial path end to end
(port sweep, full command suite, stdio MCP session) against a bench motor.
Status
- ✅ Full firmware command surface (48 commands), serial-port discovery, bus
auto-detection — verified on a physical M17 (fw 0.15.3.0) over a real stdio MCP
session and via
uvx, on all four test adapters (motor found only where it truly is). - ✅ Mock backend + 39 unit tests, no hardware needed.
- ✅ Cross-platform port handling (macOS / Windows / Linux) via pyserial enumeration.
License
MIT. Hardware, firmware, and software for the M17 are open-source — see github.com/tomrodinger/servomotor.
來源:README.md,提交 190aff5
工具
0版本歷史
2- v0.3.3最新Sep 22, 2026
- v0.3.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分