toio-mcp is a Model Context Protocol (MCP) server for toio Core Cube. It provides a set of tools to control toio Core Cubes via the MCP protocol.
- Scan and connect to toio Core Cubes
- Control motors
- Control LED indicators (including repeated patterns and turning off)
- Get position information
- Play sounds (sound effects and MIDI notes)
- Get button state
- Get battery level
- Get sensor information (motion detection, posture angle, magnetic sensor)
- Python 3.11 or higher
- toio.py
- uv
- MCP Python SDK 1.7.1 or higher
Follow the Getting started guide for uv to install it.
git clone https://github.com/comoc/toio-mcp.git
cd toio-mcpuv syncOpen Claude Desktop's claude_desktop_config.json (Settings → Developer → Edit Config) and add:
{
"mcpServers": {
"toio-mcp": {
"command": "uv",
"args": [
"--directory",
"<path to toio-mcp directory>",
"run",
"server.py"
]
}
}
}The config file lives at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after editing. The toio-mcp tools should appear in the tool picker.
Register the server with the claude mcp add CLI:
claude mcp add toio-mcp -- uv --directory <path to toio-mcp directory> run server.pyUse --scope user to make it available across all projects, or omit the flag to keep it project-local. Verify with claude mcp list and start using the tools from any Claude Code session.
Add the following configuration to your MCP settings file:
{
"mcpServers": {
"toio-mcp": {
"command": "uv",
"args": [
"--directory",
"<path to toio-mcp directory>",
"run",
"server.py"
],
"alwaysAllow": [
"add"
],
"disabled": false
}
}
}scan_cubes: Scan for toio Core Cubesconnect_cube: Connect to a toio Core Cubedisconnect_cube: Disconnect from a toio Core Cubeget_connected_cubes: Get a list of connected cubes
motor_control: Control the motors of a toio Core Cubemotor_stop: Stop the motors of a toio Core Cube
set_indicator: Set the LED color of a toio Core Cubeset_repeated_indicator: Set repeated LED indicator patternsturn_off_indicator: Turn off LED indicators
get_position: Get the position of a toio Core Cube
play_sound_effect: Play a sound effectplay_midi: Play a MIDI notestop_sound: Stop sound playback
get_button_state: Get the button state
get_battery_level: Get the battery level
get_motion_detection: Get motion detection informationget_posture_angle: Get posture angle informationget_magnetic_sensor: Get magnetic sensor information
This project is licensed under the MIT License - see the LICENSE file for details.
toio-mcp は、toio Core Cube 用の Model Context Protocol (MCP) サーバーです。MCPプロトコルを通じてtoio Core Cubeを制御するためのツールセットを提供します。
- toio Core Cubeのスキャンと接続
- モーター制御
- LED制御(繰り返しパターンや消灯を含む)
- 位置情報の取得
- サウンド再生(効果音やMIDI音)
- ボタン状態の取得
- バッテリー残量の取得
- センサー情報の取得(モーション検出、姿勢角度、磁気センサー)
- Python 3.11以上
- toio.py
- uv
- MCP Python SDK 1.7.1以上
uvのGetting startedに従ってuvインストールしてください。
git clone https://github.com/comoc/toio-mcp.git
cd toio-mcpuv syncClaude Desktop の設定 → 開発者 → 設定を編集 から claude_desktop_config.json を開き、以下を追加します:
{
"mcpServers": {
"toio-mcp": {
"command": "uv",
"args": [
"--directory",
"<toio-mcpディレクトリへのパス>",
"run",
"server.py"
]
}
}
}設定ファイルの場所:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
編集後にClaude Desktopを再起動すると、ツール一覧に toio-mcp のツールが表示されます。
claude mcp add コマンドでサーバーを登録します:
claude mcp add toio-mcp -- uv --directory <toio-mcpディレクトリへのパス> run server.py全プロジェクトで使いたい場合は --scope user を付け、現在のプロジェクトだけで使う場合はフラグなしで実行します。claude mcp list で登録確認後、Claude Code セッションからツールを呼び出せます。
MCPの設定ファイルに以下の設定を追加します:
{
"mcpServers": {
"toio-mcp": {
"command": "uv",
"args": [
"--directory",
"<toio-mcpディレクトリへのパス>",
"run",
"server.py"
],
"alwaysAllow": [
"add"
],
"disabled": false
}
}
}scan_cubes: toio Core Cubeをスキャンconnect_cube: toio Core Cubeに接続disconnect_cube: toio Core Cubeから切断get_connected_cubes: 接続されているCubeのリストを取得
motor_control: toio Core Cubeのモーターを制御motor_stop: toio Core Cubeのモーターを停止
set_indicator: toio Core CubeのLEDの色を設定set_repeated_indicator: 繰り返しLEDインジケーターパターンを設定turn_off_indicator: LEDインジケーターを消灯
get_position: toio Core Cubeの位置情報を取得
play_sound_effect: 効果音を再生play_midi: MIDI音を再生stop_sound: サウンド再生を停止
get_button_state: ボタンの状態を取得
get_battery_level: バッテリー残量を取得
get_motion_detection: モーション検出情報を取得get_posture_angle: 姿勢角度情報を取得get_magnetic_sensor: 磁気センサー情報を取得
このプロジェクトはMITライセンスの下で提供されています - 詳細はLICENSEファイルを参照してください。