servomotor-mcp
Drive open-source Gearotons M17 servomotors from natural language via an MCP server with safety rails and a mock backend.
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 — as a small set of safe, 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"). |
Safety rails (in the server, not the model)
The LLM can hallucinate a tool call; these make that safe — they run on every request:
- Alias allow-list — only configured motors can be driven.
- Position limits — absolute/relative targets are clamped to a per-motor software range, so a bad command can't drive an axis into a hard stop.
- Speed clamp — requested speeds are capped.
Clamps are reported back to the model (in safety_notes) rather than silently applied,
so it can see what actually happened and adjust. Configure via env:
GEAROTONS_MOTOR_ALIASES="x,y,z"
GEAROTONS_LIMITS='{"x":{"min_deg":-180,"max_deg":180,"max_speed":300},"z":{"min_deg":0,"max_deg":90}}'
How it works
natural language → Claude → MCP tool calls → this server → RS-485 → M17 motors
The server is a thin, safety-checked wrapper over the Gearotons servomotor Python
library (high-level, unit-aware commands — no DIR/STEP timing). The same intents run
against the mock backend for development and CI.
Develop / test
pip install -e '.[dev]'
pytest # safety + mock-bus tests, no hardware needed
GEAROTONS_MOCK_SIM_SECONDS=0.4 servomotor-mcp # lifelike timing for demos
Status
- ✅ MCP server, full tool surface, safety rails, mock backend — done; 16 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 a live safety clamp (a 200° command on a ±90° motor stopped at 90°). 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。