SIDEQUEST← All guides

Guide 06 · Grown-up setup

Give StackChan a safe stage.

stackchan-mcp 0.17.0 is installed on the Mac mini. The robot has not been flashed or changed.

This is a later upgrade. Adventure #001 does not need StackChan or MCP.

What it is

CODEX / MCP CLIENT
↓ stdio
PYTHON GATEWAY ON MAC MINI
↓ WebSocket + brief photo upload
REPLACEMENT FIRMWARE ON STACKCHAN
This third-party gateway is separate from M5Stack factory firmware, factory AI Agent, and StackFlow.

Package installed ≠ robot changed

The Python tool is ready. Nothing has been flashed. The gateway does not start by itself.

Why activation waits

0.0.0.0 + NO TOKEN = STOPDo not publish robot control on the local network without a shared secret

The default preflight reports device WebSocket on port 8765, photo capture on 8766, local HTTP MCP on 8767, no STACKCHAN_TOKEN, and no camera host. Starting it now would expose device-facing ports without a shared token.

Safe activation checklist

01

Verify the exact robot

Read the newest release notes. Confirm the owned kit matches official K151/K151-R hardware.

Check

Hardware and firmware bundle match.

Fix

Stop. Do not guess with a firmware flash.

02

Keep it local

Use the Mac mini and home LAN only. Leave remote relay and Tailscale Funnel off.

ROBOT ↔ MAC MINILocal network only
03

Add one strong token

Create STACKCHAN_TOKEN. Store the same token in the gateway and robot NVS. Never commit it.

Check

Preflight says the token is present.

Fix

Do not start the gateway until it does.

04

Choose camera off or on

Leave VISION_HOST unset for motion and expressions only. If camera capture is needed, set it to the Mac mini LAN address.

Check

Capture has a visible purpose and clear cue.

Fix

Turn capture off. The character still works.

05

Flash as a separate decision

Download the newest upstream bundle. A clean flash resets Wi-Fi and NVS. An app-only update keeps NVS.

Pause here

A flash changes the robot. Back up what matters and confirm the bundle before continuing.

06-08

Connect, then test tiny

Use mDNS discovery or a fixed local WebSocket URL. Start the gateway. Check status. Test one expression and one LED before motion.

STATUS → FACE → ONE LED → SMALL TILTVertical motion stays inside 5-85° on a clear surface
Check

Each action is stable and easy to stop.

Fix

Disconnect power. Fix the current step before adding another.

Its Sidequest job

  • React as a character. Never own quest progress.
  • Capture only after a visible, deliberate action.
  • Use small, adult-bounded motions.
  • Turn a lost connection into a saved line, not a stuck game.