Toio
FreeNot checkedControls toio robot cubes via natural language through BLE, enabling movement, LED control, and sound playback from MCP-compatible clients like Claude Desktop.
About
Controls toio robot cubes via natural language through BLE, enabling movement, LED control, and sound playback from MCP-compatible clients like Claude Desktop.
README
自然言語で toio ロボットキューブを制御する MCP サーバー。 toio.js 経由で BLE 接続した toio を、Claude Desktop や MCP 対応クライアントから操作できる。
前提条件
- Node.js 20 以上
- Bluetooth 4.0 (BLE) 対応 の PC
- toio Core Cube (実機が必要)
Windows の場合
toio.js が依存する noble のネイティブモジュールをビルドするため、以下が追加で必要である。
- Visual Studio Build Tools 2022 — 「C++ によるデスクトップ開発」ワークロードを選択してインストールする
- Python 3 — node-gyp が使用する
package.jsonのoverridesでnobleを Windows WinRT BLE 対応の@abandonware/nobleに差し替えている。
セットアップ
cd toio-mcp
npm install
npm run build
WebAPI サーバー
stackchan などの外部デバイスから自然言語で toio を操作するための WebAPI サーバーを内蔵している。 自然言語テキストを LLM(Claude / OpenAI)が解釈し、toio の操作に変換して実行する。
環境変数の設定
.env.example をコピーして .env を作成し、API キーを設定する。
cp .env.example .env
.env の内容:
# LLM プロバイダ(claude または openai)
LLM_PROVIDER=claude
# Claude API を使う場合
ANTHROPIC_API_KEY=sk-ant-...
# OpenAI API を使う場合
# OPENAI_API_KEY=sk-...
# モデル名(省略時はデフォルト値を使用)
# LLM_MODEL=claude-sonnet-4-20250514
# WebAPI サーバーのポート番号
PORT=3000
WebAPI の起動
npm run dev:web # 開発モード(tsx で直接実行)
npm run start:web # ビルド済みファイルで起動
エンドポイント
| メソッド | パス | 説明 | リクエストボディ |
|---|---|---|---|
| GET | /api/health |
ヘルスチェック | なし |
| POST | /api/chat |
自然言語で制御 | { "message": "前に進んで" } |
| POST | /api/tools/:name |
LLM を介さず直接制御 | ツール引数の JSON |
リクエスト例
# 自然言語で制御
curl -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "前に進んで"}'
# 直接ツール呼び出し
curl -X POST http://localhost:3000/api/tools/move \
-H "Content-Type: application/json" \
-d '{"left": 50, "right": 50, "duration": 1000}'
MCP サーバーの起動方法
1. Claude Desktop から使う(推奨)
Claude Desktop の設定ファイル claude_desktop_config.json に以下を追加する。
args のパスは実際のインストール先に合わせて変更すること。
{
"mcpServers": {
"toio": {
"command": "node",
"args": ["/path/to/toio-mcp/dist/index.js"]
}
}
}
設定後、Claude Desktop を再起動すると toio ツールが利用可能になる。
2. Claude Code から使う
Claude Code の MCP 設定(.claude/settings.json など)に同様のサーバー定義を追加する。
3. 開発モードで起動する
ビルドなしで直接実行する場合は以下を使用する。
npm run dev
4. MCP Inspector でテストする
MCP Inspector を使って各ツールを対話的にテストできる。
npm run inspect
使い方
- MCP クライアント(Claude Desktop など)から
connectツールを呼び出し、toio cube に BLE 接続する move,spin,set_ledなどのツールで cube を操作する- 操作が終わったら
disconnectで切断する
MCP ツール一覧
| ツール名 | 引数 | 動作 |
|---|---|---|
connect |
なし | 最寄りの cube に BLE 接続 |
disconnect |
なし | 切断 |
move |
left, right (-115〜115), duration (ms) |
左右モーター制御 |
stop |
なし | 停止 |
spin |
speed (-115〜115), duration (ms) |
その場で回転 |
set_led |
r, g, b (0-255), duration? (ms) |
LED 色変更 |
play_preset_sound |
soundId (0-10) |
内蔵効果音を再生 |
get_battery |
なし | バッテリー残量を取得 |
技術スタック
- TypeScript
- Node.js ≥ 20
@toio/scanner+@toio/cube@modelcontextprotocol/sdkzod
Installing Toio
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/u-akira/toio-mcpFAQ
Is Toio MCP free?
Yes, Toio MCP is free — one-click install via Unyly at no cost.
Does Toio need an API key?
No, Toio runs without API keys or environment variables.
Is Toio hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Toio in Claude Desktop, Claude Code or Cursor?
Open Toio on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Toio with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
