KentraBOT MCP Server
An MCP (Model Context Protocol) server for controlling a two-track robot. This server exposes tools to control motor speeds and direction, allowing LLMs to drive the robot.
Features
- Movement Control: Independent control of left and right tracks.
- High-Level Commands:
drivetool for easy direction control (forward, backward, left, right). - Safety: Emergency
stoptool. - Hardware Abstraction: Built with a modular driver system. Currently configured with a
Dummydriver for simulation/testing.
Installation
Prerequisites
- Python 3.11 or higher
uv(recommended) orpip
Setup
-
Clone the repository:
git clone <repository-url> cd kentraBOT-MCP -
Install dependencies: Using
uv:uv syncOr using standard
pip:python3 -m venv .venv source .venv/bin/activate pip install .
Usage
Running the Server
Start the MCP server using uv:
uv run kentrabot
Or directly with python:
python3 src/kentrabot_mcp/server.py
connecting to an MCP Client
Configure your MCP client (e.g., Claude Desktop, MCP Inspector) to run the server command above.
Example claude_desktop_config.json:
{
"mcpServers": {
"kentrabot": {
"command": "uv",
"args": ["run", "kentrabot"]
}
}
}
Tools
| Tool | Description | Arguments |
|---|---|---|
move | Set independent track speeds | left_speed (-1.0 to 1.0), right_speed (-1.0 to 1.0) |
drive | Move in a specific direction | direction (forward, backward, left, right), speed (0.0 to 1.0) |
stop | Stop both motors | None |
Hardware Configuration
Currently, the server is set to use the DummyRobot driver which logs actions to the console.
To use real hardware (e.g., Raspberry Pi with Motor Hat):
- Implement a new driver in
src/kentrabot_mcp/drivers/. - Inherit from
kentrabot_mcp.robot.Robot. - Update
src/kentrabot_mcp/server.pyto initialize your new driver.
