Logo de Stackchan MCP

Stackchan MCP

Comunidade
kisaragi-mochi

MCP gateway for StackChan (xiaozhi-esp32): bridge any MCP client to a CoreS3 + servo + camera robot

Publicado porkisaragi-mochi
Repositóriostackchan-mcp
IdiomaC++
Forks
66
Estrelas
161
Ferramentas disponíveis
0
Tipo de transportestdio, streamable-http
Categorias
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Stackchan MCP disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    161 estrelas e 66 forks no repositório vinculado.

English | 日本語

stackchan-mcp

An MCP (Model Context Protocol) bridge for the M5Stack official StackChan (2025 Kickstarter shipping kit), letting any LLM client drive the device.

Born out of the stack-chan project community (originated by Shinya Ishikawa in 2021). This repository targets the M5Stack official StackChan kit that grew out of that lineage.

┌─────────────┐     stdio MCP      ┌──────────────┐    WebSocket MCP    ┌──────────────┐
│ MCP client  │ ─────────────────▶ │   gateway    │ ──────────────────▶ │ ESP32 (CoreS3│
│ (e.g.Claude)│ ◀───────────────── │  (Python)    │ ◀────────────────── │  +StackChan) │
└─────────────┘                    │              │                     └──────────────┘
                                   │  /capture    │ ◀── HTTP POST (JPEG) ──┘
                                   └──────────────┘

From any MCP client (Claude Code / Claude Desktop / others) you can call StackChan operations such as head movement, camera capture, touch sensor reads, and avatar expression switches.

Repository layout

This repository is a monorepo.

DirectoryContents
firmware/Full git subtree of 78/xiaozhi-esp32. The custom StackChan board lives at firmware/main/boards/stackchan/.
gateway/Python MCP gateway. stdio MCP server (LLM side) + WebSocket MCP client (ESP32 side) + HTTP capture server.
docs/architecture.md: full component diagram, tool name mapping, photo flow, auth, phase roadmap. firmware-sync.md: upstream xiaozhi-esp32 sync playbook. remote-access.md: Tailscale Funnel setup for non-LAN use.
examples/Optional, unmaintained examples. cloudflare-relay/: Cloudflare Workers WebSocket relay for reaching the gateway from outside the local LAN.

Target hardware

M5Stack official StackChan kit (Kickstarter 2025 shipping version). The firmware in this repository is meant to replace the kit's factory firmware.

PartSpec
BodyM5Stack CoreS3 (ESP32-S3, 16MB Flash, 8MB PSRAM)
Neck servosSCS0009 ×2 (yaw + pitch, serial bus, TX=GPIO6, RX=GPIO7)
CameraGC0308 (DVP, 320×240)
TouchFT6336 / Si12T
DisplayILI9342 (SPI, 320×240)

A self-built stack-chan (following the original stack-chan project design) may also work as long as the pin assignments and I2C addresses match. Reports and PRs welcome.

Tools (callable by MCP clients via the gateway)

ToolDescriptionStatus
get_statusGateway connection state✅
get_device_infoESP32 device state (battery / volume / WiFi / etc.)✅
take_photo(question?)Capture a frame, save as JPEG, return the path + inline image block✅
set_volume(volume)Speaker volume (0-100)✅
set_brightness(brightness)Screen brightness (0-100)✅
set_off_timeout(seconds)Persistent idle screen-off timeout (0..86400 seconds; default 300, 0 disables). Requires firmware 1.17.0+✅
get_off_timeoutRead the persistent screen-off timeout and current screen state. Requires firmware 1.17.0+✅
move_head(yaw, pitch, speed?)Move the neck (servos). pitch is constrained to 5..85 — the M5Stack-recommended operating range. For the wider firmware hard clamp (0..88), use the firmware-side set_head_angles device tool instead.✅
get_touch_stateTouch sensor state (press / release / stroke / etc.)✅
get_touch_sensor_enabledRead whether head-touch detection is enabled. The NVS-backed setting persists across reboot.✅
set_touch_sensor_enabled(enabled)Enable or disable head-touch detection. Disabling stops both the firmware local motion response and MCP stackchan/event emission, and persists across reboot. Head-touch is off until enabled.✅
set_avatar(face)Switch avatar expression (idle / happy / thinking / sad / surprised / embarrassed), or off to hide the avatar and disable blink so the underlying WiFi config / OTA / settings screens are visible. Any other face brings the avatar back and restores blink.✅
set_blink(state)Blink on/off✅
set_mouth(state)Mouth open/close (one-shot, held until next call)✅
set_mouth_sequence(steps)Queue and play a list of {shape, duration_ms} steps locally for TTS lip-sync — no per-step WebSocket RTT jitter✅
check_vm_enCheck servo power supply (VM EN HIGH) state✅
set_led(index, r, g, b)Set one of the 12 base RGB LEDs (index 0..11, channels 0..255)✅
set_all_leds(r, g, b)Set all 12 base RGB LEDs to the same color✅
set_leds(colors)Batch-set the first N LEDs from a [[r,g,b], ...] array in a single I2C burst (use this for animations / multi-color patterns); trailing LEDs keep their previous color✅
clear_ledsTurn all 12 base RGB LEDs off✅
say(text, voice?, speaker_id?, reference_audio?)Speak text on the device speaker via gateway-side TTS. A supported expression emoji in the text can switch the avatar face in the same call. Default engine: VOICEVOX (runs as a separate HTTP service — see TTS setup). Requires the [tts] extra.✅
listen(duration_ms?, engine?, language?, model?, motion?, look_up_pitch?)Capture a short utterance from the device microphone and transcribe it via gateway-side STT. Default engine: faster-whisper (local, MIT) — see STT setup. Optional motion feedback can show the thinking face or tilt the head up during capture. Requires the [stt-faster-whisper] (or [stt-openai]) extra and a firmware update with the inbound listen wire type.✅
beat_mode_start(motion_intensity?, sensitivity?, color?, duration_sec?)Start gateway-only beat mode: continuously capture ambient device audio through the existing listen wire path, estimate BPM in the gateway, and drive free-running beat-synced head sway plus base-ring LED flashes. sensitivity tunes the onset floor for quiet rooms or loud venues. Beat mode requests the firmware raw capture profile so music bypasses speech-oriented AFE suppression. While active, listen() is mutually exclusive; say() may interrupt and beat mode re-arms listening afterwards. Requires the [stt] extra for Opus decoding.✅
beat_mode_stop()Stop beat mode and send listen.stop best-effort while retaining the latest rolling audio buffer for clip export until the next beat-mode start or gateway restart.✅
beat_mode_update(motion_intensity?, sensitivity?, color?, blink_rate?, motion_enabled?, led_enabled?)Update beat-mode VJ parameters without restarting capture.✅
beat_meta_snapshot()Poll the latest beat-mode metadata: active state, BPM, confidence, active sensitivity/minimum onset floor, last beat/audio timestamps, capture health, counters, and current motion/LED parameters.✅
beat_clip_save(seconds?)Save the latest rolling beat-mode audio window as a 16 kHz mono WAV temp file and return its path plus actual captured duration. Clip files persist on disk; the caller is responsible for deleting them when no longer needed.✅
stackchan_follow_pose_stream(action, url, ...)Subscribe to an arbitrary external WebSocket pose-stream and drive the head to follow incoming yaw / pitch frames 1:1 within the SCS0009 working range. action switches between start / stop / status. Includes per-axis flip, pitch-center offset, downsample rate cap, angular-velocity clamp, and reconnect with exponential backoff; the initial pose is seeded from the device so the angular-velocity clamp is anchored at the real servo position from the first frame. The upstream server's protocol (zero-offset commands, source dispatching, transport) is intentionally outside this gateway's scope.✅
upgrade_firmware(firmware_path, timeout?)Flash a local xiaozhi.bin to the device over Wi-Fi, no USB cable. The gateway refuses files that are not an ESP32-S3 xiaozhi image for this board with a valid SHA-256 that fits the OTA slot, before contacting the device; then serves it once from a random short-lived URL, waits for the reboot and confirms the running image. See Updating over Wi-Fi.✅
stackchan_follow_led_stream(action, url, target, ...)Subscribe to an arbitrary external WebSocket LED-frame stream and forward validated colors frames to either the built-in 12-LED base ring or a Port B WS2812 strip. event frames bypass the rate gate; continuous frames are capped by max_fps.✅

See gateway/README.md for full schemas.

Quick start

1. Flash the firmware (CoreS3)

There are two paths. Option A is recommended for first-time users — no toolchain setup needed. Option B is for contributors who want to build from source.

Option A: Flash a pre-built binary (recommended for end users)

Download the latest firmware bundle from the Releases page — pick the most recent firmware-v* release and grab merged-binary.bin (and optionally xiaozhi.bin). Then flash with esptool.py:

bash
# Replace --port with your platform's serial device:
#   macOS:   /dev/cu.usbmodem* (e.g. /dev/cu.usbmodem1101)
#   Linux:   /dev/ttyUSB0 or /dev/ttyACM0
#   Windows: COM3 (or whichever it shows up as in Device Manager)

# Clean install (resets NVS — Wi-Fi settings will need to be re-entered):
esptool.py --chip esp32s3 --port /dev/cu.usbmodem1101 -b 460800 \
  write_flash 0x0 merged-binary.bin

# Or, app-only update (preserves NVS — keeps your Wi-Fi setup):
esptool.py --chip esp32s3 --port /dev/cu.usbmodem1101 -b 460800 \
  write_flash 0x20000 xiaozhi.bin

No ESP-IDF or Docker setup needed.

Updating over Wi-Fi (no USB)

Once the device is connected to your gateway, later updates can skip the cable. Call the gateway tool upgrade_firmware with the path to the app image (xiaozhi.bin from a Release or build/xiaozhi.bin; not merged-binary.bin) on the gateway host:

text
upgrade_firmware({"firmware_path": "~/Downloads/xiaozhi.bin"})

The gateway first checks the file (ESP32-S3 app image, project xiaozhi, this board's name, appended SHA-256, fits the 0x3F0000 OTA slot) and refuses anything else without touching the device. It then serves the file once on the capture port (CAPTURE_PORT, default 8766) under a random URL that expires after 120 s. The device needs to reach that port on the address it uses for the gateway WebSocket. The tool waits for the download (~25 s), reboot and reconnect and returns before / after (version, compile time, ELF SHA-256, OTA partition). About a minute in total.

The device writes into the inactive OTA slot and only switches over after ESP-IDF has verified the image. App rollback is enabled: a new image that reboots before it reaches the OTA version check goes back to the previous one on the next reset. If the device comes back on a different gateway (mDNS order), the tool reports no_reconnect; check that gateway.

After an OTA the device may be running from ota_1 (0x410000). An app-only USB flash to 0x20000 then has no effect until the OTA data is cleared: add erase_region 0xd000 0x2000 before write_flash 0x20000 xiaozhi.bin (NVS and Wi-Fi settings are kept).

Option B: Build from source with Docker (for contributors)

This repository uses git submodules under firmware/components/. If you cloned without --recursive, initialize them first:

bash
git submodule update --init --recursive

Then build:

bash
cd firmware
docker run --rm --cpus=4 --ulimit nofile=65536:65536 \
  -v $PWD:/project -w /project espressif/idf:v5.5.2 \
  python ./scripts/release.py stackchan
# → releases/v2.2.6_stackchan.zip

# Flash (after USB-connecting the CoreS3).
# Replace --port with your platform's serial device — see the Option A
# note above for the macOS/Linux/Windows mapping.
esptool.py --chip esp32s3 --port /dev/cu.usbmodem1101 -b 460800 \
  write_flash 0x0 build/merged-binary.bin

The --cpus=4 flag caps Docker container parallelism so the concurrent LVGL / xiaozhi-fonts/emoji_*.c compile steps stay within the memory budget on macOS Docker hosts (OrbStack / Docker Desktop). Without it, ninja autodetects job count from /proc/cpuinfo and the resulting parallel gcc pressure can exhaust container memory mid-LVGL with Cannot allocate memory — even on hosts with ample physical RAM (tracked as #112). The --ulimit nofile=65536:65536 flag separately avoids a Too many open files failure during the same LVGL compile step under the default file-descriptor limit. Linux hosts with higher defaults are unaffected, but passing both flags unconditionally is safe and matches CI.

After flashing, WiFi configuration happens on first boot — connect from a smartphone to the setup UI (the xiaozhi-esp32 standard flow).

On a local network, the gateway advertises _stackchan-mcp._tcp.local. by default. Fresh firmware can use that mDNS/DNS-SD record to find the WebSocket endpoint automatically when no primary URL has been saved yet. mDNS discovery requires NVS websocket.url to be empty.

Configuring the WebSocket gateway URL and auth token

Primary URL resolution order:

  1. NVS websocket.url
  2. mDNS _stackchan-mcp._tcp.local. when CONFIG_STACKCHAN_MDNS_DISCOVERY is enabled and the primary NVS URL is empty
  3. CONFIG_DEFAULT_WEBSOCKET_URL
  4. Empty/fail with a boot log error

Existing websocket.fallback_url and CONFIG_DEFAULT_WEBSOCKET_FALLBACK_URL candidates are still tried after the primary candidate path above. CONFIG_FORCE_DEFAULT_WEBSOCKET_URL=y remains an explicit exception for stale-NVS recovery: a non-empty Kconfig URL wins and mDNS discovery is skipped.

The gateway advertises mDNS by default; run stackchan-mcp --no-mdns to disable advertisement. To compile out firmware discovery, set CONFIG_STACKCHAN_MDNS_DISCOVERY=n. Discovery requires UDP multicast on the local LAN, and some routers or VLANs block it. When multiple gateways are visible, the firmware tries each usable IPv4 address from every supported gateway service discovered in one browse, and logs the accepted instance count and candidate address list. mDNS only discovers the URL; websocket.token / CONFIG_DEFAULT_WEBSOCKET_TOKEN still control authentication.

For LAN auto-discovery with an automatic out-of-LAN relay fallback, keep NVS websocket.url empty and store the relay URL in websocket.fallback_url. With that profile, mDNS candidates are tried first, and the relay is tried later if the local discovery path does not complete the WebSocket server hello flow.

Automatic recovery after a gateway host IPv4 change requires both sides of the paired mDNS fix: Gateway vA.B.C+ refreshes the advertised service when the host address changes, and Firmware vX.Y.Z+ tries all supported mDNS service instances from a browse. Earlier firmware may keep trying a stale cached instance until reboot.

The firmware reads these NVS keys for the gateway connection:

  • websocket.url — the gateway WebSocket URL (e.g. ws://<gateway-host>:8765/)
  • websocket.fallback_url — optional second gateway URL to try when websocket.url cannot be reached or does not complete the server hello flow
  • websocket.token — the bearer token sent as Authorization: Bearer <token>, matched against STACKCHAN_TOKEN / BEARER_TOKEN on the gateway side (leave both empty to skip authentication entirely)

There are four practical ways to provide them, plus one temporary source-level escape hatch:

  1. Build-time defaults via Kconfig (recommended for developers): run idf.py menuconfig → Component config → Xiaozhi Assistant, and set:

    • Default WebSocket gateway URL (fallback when NVS is empty) → CONFIG_DEFAULT_WEBSOCKET_URL (e.g. ws://<gateway-host>:8765/)
    • Fallback WebSocket gateway URL → CONFIG_DEFAULT_WEBSOCKET_FALLBACK_URL
    • Default WebSocket auth token (fallback when NVS is empty) → CONFIG_DEFAULT_WEBSOCKET_TOKEN (leave empty if your gateway accepts unauthenticated connections)

    By default these only apply when the corresponding NVS key is empty. For first-time flashes onto a fresh device this is exactly what you want. If both a primary and fallback URL are configured, the firmware tries them in deterministic order and keeps the first candidate that completes the WebSocket server hello flow.

  2. Use the on-device WiFi config UI (recommended for fresh users): while the device is in WiFi configuration mode, open the captive portal at http://192.168.4.1, switch to the Advanced tab, and fill in:

    • WebSocket Gateway URL (e.g. ws://<gateway-host>:8765/) — the primary gateway candidate.
    • Fallback Gateway URL (e.g. wss://<relay-host>/) — optional second candidate, tried only after the primary candidate fails the server-hello flow.
    • Gateway Token — optional bearer token, sent as Authorization: Bearer <token> to both candidates when set. The current value is never displayed (the WiFi config AP is unauthenticated, so the GET endpoint reports only whether a token is configured). Leave the field blank to keep the existing token, type a new value to update it, or hit ❌ to fall back to the build-time CONFIG_DEFAULT_WEBSOCKET_TOKEN. On stock builds where no Kconfig default is set this disables auth; on builds that ship a default token, ❌ reverts to that default rather than truly clearing authentication. To switch the device to an unauthenticated gateway on a build that ships a default token, rebuild the firmware with the Kconfig default empty (or set a non-empty token on the gateway side that matches the build default).

    Submit to persist the values to the websocket NVS namespace (websocket.url / websocket.fallback_url / websocket.token); they are read on the next boot. This is the intended path for end users running a pre-built firmware. Clearing a URL field with the ❌ button and submitting again falls back to the matching CONFIG_DEFAULT_WEBSOCKET_* Kconfig value (or to "no fallback" when no Kconfig default is set).

  3. Use the runtime MCP tools over an established connection: gateway_config_get reports websocket.url, websocket.fallback_url, whether a token is set, force_mode, discovery_enabled, and the connected candidate URL without exposing the token value. gateway_config_set accepts optional url, fallback_url, and token strings. Passing an empty string clears that NVS key; for example url="" restores the mDNS discovery path on the next reconnect. Changes are persisted immediately but do not trigger a disconnect, reconnect, or reboot.

  4. Write websocket.url / websocket.fallback_url / websocket.token directly to NVS (advanced): for example with a custom NVS-write tool over serial. Same persistence semantics as the WiFi config UI and runtime MCP tools; primarily useful for batch provisioning.

  5. Temporary source hardcode (not recommended): editing websocket_protocol.cc can unblock local experiments, but keep it out of commits.

Common gateway URL setups:

ModePrimary URLFallback URL
LAN auto-discovery with relay fallbackempty (mDNS)wss://<relay-host>/
Fixed local onlyws://<gateway-host>:8765/empty
Relay onlywss://<relay-host>/empty
Fixed local with relay fallbackws://<gateway-host>:8765/wss://<relay-host>/

Existing devices with stale NVS — CONFIG_FORCE_DEFAULT_WEBSOCKET_URL

If you are flashing onto a device that previously ran upstream xiaozhi-esp32 firmware, NVS will already contain websocket.url=wss://api.tenclass.net/... written by the upstream OTA-config path. In this case the empty-NVS fallback in option 1 above will not trigger, and the device will keep trying to talk to tenclass instead of your local gateway.

If the device can still establish a stackchan-mcp connection through any candidate, call gateway_config_set with url="" to clear the stale primary NVS URL and restore the mDNS discovery path on the next reconnect. If the stale URL prevents any stackchan-mcp connection from being established, use the force-override switch without erasing all of NVS (which would also drop WiFi credentials):

  • Force CONFIG_DEFAULT_WEBSOCKET_URL/TOKEN to override NVS → CONFIG_FORCE_DEFAULT_WEBSOCKET_URL=y

When set, non-empty Kconfig URL/token values override whatever NVS holds. Empty Kconfig values still fall through to the NVS-based behaviour, so leaving the token Kconfig empty keeps any NVS-stored token in use. The boot log will show FORCE: overriding NVS websocket.url with Kconfig: NVS=... -> ... so you can verify the override fired. This switch is the recommended way to bring ex-xiaozhi hardware onto a local stackchan-mcp gateway, and to lock CI/dev images to a known gateway URL.

The switch is opt-in so end-user devices configured at runtime keep their NVS-priority semantics.

Developer-local overrides — sdkconfig.defaults.local

For local hardware testing, do not put personal gateway URLs or tokens in the tracked firmware/sdkconfig.defaults. Instead, create a gitignored local file:

bash
cd firmware
cat > sdkconfig.defaults.local <<'EOF'
CONFIG_DEFAULT_WEBSOCKET_URL="ws://<your-lan-ip>:8765/"
CONFIG_DEFAULT_WEBSOCKET_FALLBACK_URL="wss://<relay-host>/"
CONFIG_DEFAULT_WEBSOCKET_TOKEN="<your-dev-token>"
CONFIG_FORCE_DEFAULT_WEBSOCKET_URL=y
EOF

Both python ./scripts/release.py <board> and plain idf.py build will read this file when it exists. The file is ignored by git, so personal settings cannot be added accidentally with git add -A.

2. Start the gateway

The gateway can either be installed as the published PyPI package (recommended for end users) or run from this repository as a checkout (recommended for contributors who want to follow main).

Option A: install as a tool (recommended for end users)

For an isolated install that does not collide with your system Python or other Python projects, use one of:

bash
uv tool install stackchan-mcp
# or
pipx install stackchan-mcp

Then run the gateway:

bash
stackchan-mcp

If you prefer a project-managed virtualenv, pip install stackchan-mcp inside an active venv works as well, and python -m stackchan_mcp inside that venv is equivalent to stackchan-mcp. Just avoid pip install against the system Python (PEP 668).

The STACKCHAN_TOKEN, VISION_HOST, and other settings documented in gateway/README.md can be supplied via environment variables, the active shell, or a .env file in the working directory.

Option B: from source via uv (contributors)

bash
cd gateway
cp .env.example .env       # set STACKCHAN_TOKEN / VISION_HOST
uv sync
uv run python -m stackchan_mcp

If the gateway is restarted while the ESP32 is already connected, the firmware automatically retries the WebSocket connection while idle. The retry delay starts at 5 seconds and backs off up to 60 seconds; use get_status to confirm that the device has reappeared. The same retry path also fires for any post-handshake server-initiated close — gateway crashes, TLS-layer resets, and gateway configurations that tear the WebSocket session down after the handshake — so the device recovers automatically once the gateway accepts the next connection attempt.

For non-LAN setups, see docs/remote-access.md for the Tailscale Funnel flow and the VISION_URL capture callback setting.

3. Register as an MCP client (Claude Code example)

Add to ~/.claude.json.

If you installed via pip install stackchan-mcp:

json
{
  "mcpServers": {
    "stackchan-mcp": {
      "type": "stdio",
      "command": "stackchan-mcp",
      "env": {
        "STACKCHAN_TOKEN": "your-secret-token-here",
        "VISION_HOST": "your.host.lan.ip"
      }
    }
  }
}

If you installed from source via uv:

json
{
  "mcpServers": {
    "stackchan-mcp": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run", "--directory", "/path/to/stackchan-mcp/gateway",
        "python", "-m", "stackchan_mcp"
      ]
    }
  }
}

See gateway/README.md for details.

Gateway user-defaults TOML file

The Python gateway can optionally read user-local default argument values from a TOML file under the OS-standard user config directory:

  • Linux / XDG: ~/.config/stackchan-mcp/user-defaults.toml
  • macOS: ~/Library/Application Support/stackchan-mcp/user-defaults.toml
  • Windows: %APPDATA%\stackchan-mcp\user-defaults.toml

The exact path is resolved with platformdirs, and the gateway logs the resolved path at startup. The tracked user-defaults.toml.example file at the repository root is the template.

The file is an overlay on top of the MCP schema defaults. If the file is absent or empty, schema defaults are used. If a key is omitted from the file, that key keeps its schema default. Explicit MCP tool-call arguments always take precedence over the file, so the order is: explicit argument > user-defaults file > schema default.

This is a gateway-side Python setting. It is separate from the firmware-side NVS connection settings exposed by gateway_config_get / gateway_config_set (added in PR #293). Those tools read or update the device's saved WebSocket connection settings; this TOML file only changes default MCP argument values used by the Python gateway.

Minimal example:

toml
[tool.stackchan_follow_pose_stream]
smoothing_window = 1
downsample_hz = 20
max_step_deg = 30

[tool.stackchan_follow_led_stream]
target = "base_ring"
max_fps = 30
source_filter = "stage"

follow_led_stream WebSocket LED frames

stackchan_follow_led_stream(action="start", url=..., target=...) connects from the gateway to an external WebSocket URL as a client. It validates incoming LED frames and forwards them to one of two targets:

  • target="base_ring" writes the built-in 12-LED base ring through set_leds. Omit led_count, or pass 12.
  • target="port_b" writes a WS2812 strip on Port B through port_b_ws2812_set_strip. led_count is required (1..256), and the gateway sends port_b_ws2812_init on stream start and after device reconnect.

Frame schema:

json
{"ts": 1751234567890, "kind": "event", "colors": [[255, 0, 0], [0, 0, 255]]}

ts must be numeric. kind is either event or continuous. continuous frames are downsampled to max_fps (default 30), while event frames bypass that gate so beat flashes are not silently dropped. colors must be a non-empty array of [r,g,b] integer triples (0..255) and must fit the target capacity. Optional string fields source and frame can be matched with source_filter and frame_filter.

Manual fallback does not need a switching step: when the stream is stopped or the upstream WebSocket is disconnected, plain set_leds and port_b_ws2812_* calls still work normally.

TOML overlay example:

toml
[tool.stackchan_follow_led_stream]
target = "port_b"
led_count = 24
max_fps = 30
source_filter = "stage"
frame_filter = "calibrated"

Measured guidance (real device, home WLAN)

  • Wire round-trip per frame: ~40-50 ms median → effective dispatch rate ~20 fps
  • Recommended max_fps: 20 — feeding more than the effective rate only increases continuous-frame drops (event frames are never dropped)
  • While the stream is active the gateway forces WiFi power save off (restored on stop); without it dispatch latency spikes to 300-1100 ms

4. Optional: TTS setup (VOICEVOX)

To make the device speak, install the [tts] extra and run a VOICEVOX engine alongside the gateway. VOICEVOX runs as a separate HTTP service, so its LGPL-3.0 license stays scoped to that process — the MIT-licensed gateway only issues HTTP requests against it.

Run the engine (Docker)

bash
docker run --rm -p '127.0.0.1:50021:50021' \
  voicevox/voicevox_engine:cpu-ubuntu20.04-latest

The engine listens on port 50021 by default. The CPU image is fine for short sentences; GPU images are also published upstream.

Install the TTS extra

bash
pip install 'stackchan-mcp[tts]'
# or, equivalently:
pip install 'stackchan-mcp[tts-voicevox]'

This pulls in httpx (HTTP client) and opuslib (Opus encoder bindings). The encoder needs libopus on the system — brew install opus on macOS, sudo apt-get install libopus0 on Debian/Ubuntu.

Configure (optional)

Environment variableDefaultNotes
STACKCHAN_VOICEVOX_URLhttp://127.0.0.1:50021VOICEVOX engine URL.
STACKCHAN_VOICEVOX_DEFAULT_SPEAKER3Default speaker ID (Zundamon normal). See the VOICEVOX speaker list for other options.

Try it

From an MCP client:

say(text="こんにちは、わたしはスタックチャンです")

The gateway POSTs to VOICEVOX, decodes the returned WAV, resamples to 16 kHz mono, encodes Opus frames (60 ms each), and pushes them as WebSocket binary frames to the device — which decodes and plays them through its speaker. No firmware changes are required: the existing audio decoder pipeline already accepts these frames. The TTS framework is engine-agnostic, so additional engines plug in behind the same say API — see the Irodori engine below.

say also accepts supported expression emoji in the text: happy (😊 😄 😀 😁 🙂 😆 🥰 😍 😋 🤗), sad (😢 😭 😞 😔 ☹️ 🙁 😿), surprised (😲 😮 😯 😱 🤯), embarrassed (😳 😅 🫣), and thinking (🤔 🧐 💭). The first mapped emoji changes the avatar face in the same MCP call before speech; unmapped emoji do not change the face. VOICEVOX and other engines without emoji-style support strip all emoji before synthesis. If stripping leaves empty text, the face change is attempted and speech is skipped.

Alternative engine: Irodori

Irodori is a second TTS engine that calls an external synthesis service returning MP3. It plugs into the same say pipeline as VOICEVOX (MP3 is decoded to 16 kHz mono PCM, then encoded to Opus), and it receives emoji embedded in the input text verbatim so they can act as voice-style cues.

There is no default endpoint — the synthesis backend is a hosted service, and shipping a hard-coded URL would point every install at someone else's deployment. You must self-host a compatible synthesis API (for example, duplicate the reference Hugging Face Space, or run your own service that honours the same request/response contract) and point the gateway at it.

Install the extra:

bash
pip install 'stackchan-mcp[tts-irodori]'

This pulls in httpx, opuslib, and miniaudio (a small self-contained MP3/audio decoder with prebuilt wheels, so no extra system library is needed beyond the libopus that opuslib already requires).

Configure via environment variables (URL and key are read from the environment only — never commit them):

Environment variableDefaultNotes
STACKCHAN_IRODORI_URL(required)Synthesis endpoint URL of your self-hosted service. Unset → the engine still lists but say(voice="irodori") returns a clear error.
STACKCHAN_IRODORI_KEY(none)Optional API key, forwarded as a query parameter.
STACKCHAN_IRODORI_SPEAKER3Default speaker identifier.
STACKCHAN_IRODORI_STEPS24Default diffusion step count (higher = slower, higher quality).

Select Irodori per call:

say(text="やったね😊", voice="irodori")

Or make it the default engine for every say call that omits voice:

bash
export STACKCHAN_TTS_ENGINE=irodori

VOICEVOX remains the default when STACKCHAN_TTS_ENGINE is unset, and an explicit voice argument always overrides the default.

Alternative engine: ElevenLabs

ElevenLabs is a cloud TTS engine that plugs into the same say pipeline (the MP3 reply is decoded to 16 kHz mono PCM, then encoded to Opus). Unlike VOICEVOX/Irodori there is nothing to self-host — you need an ElevenLabs account and API key, and each say call bills your ElevenLabs quota.

Install the extra:

bash
pip install 'stackchan-mcp[tts-elevenlabs]'

Configure via environment variables (the key is read from the environment only — never commit it):

Environment variableDefaultNotes
ELEVENLABS_API_KEY(required)Your ElevenLabs API key. STACKCHAN_ELEVENLABS_KEY is also accepted and wins when both are set.
STACKCHAN_ELEVEN_VOICE_<NAME>(none)Voice map: each variable names one speaker, e.g. STACKCHAN_ELEVEN_VOICE_RACHEL=<voice id> makes speaker_name="rachel" work.
STACKCHAN_ELEVEN_DEFAULT_SPEAKER(none)Speaker used when a call omits speaker_name. If unset and exactly one voice is mapped, that voice is the default.
STACKCHAN_ELEVEN_MODELeleven_v3ElevenLabs model identifier.

Select ElevenLabs per call — the speaker selector is the string speaker_name (not the numeric speaker_id, which is VOICEVOX-shaped); a raw ElevenLabs voice ID is also accepted and passed through verbatim:

say(text="Hello!", voice="elevenlabs", speaker_name="rachel")

Or make it the default engine:

bash
export STACKCHAN_TTS_ENGINE=elevenlabs

Alternative engine: Fish Audio

Fish Audio is a hosted TTS service with strong English voices and user-trainable voice models, which makes it a practical alternative to VOICEVOX (Japanese-only by default) for English deployments.

It is a third-party cloud service: the text passed to say leaves this machine and is sent to Fish Audio's servers to be synthesised. Review Fish Audio's terms and pricing before sending anything you would not want to share with them, and prefer a local engine such as VOICEVOX for sensitive utterances.

Unlike Irodori, this engine needs no audio decoder: the Fish Audio API returns 16-bit mono PCM/WAV at a caller-chosen sample rate, and the engine asks for 16 kHz — exactly what the device's Opus decoder expects. So there is no miniaudio (Irodori) and no ffmpeg (Edge TTS) dependency, and the extra is a convenience alias over [tts]:

bash
pip install 'stackchan-mcp[tts-fish-audio]'

The mp3 and opus response formats are deliberately unsupported — consuming them would pull in a decoder purely to undo an encode we never needed.

Carrying no decoder also means nothing downstream would notice a reply that is not audio, so the engine checks that itself: a 200 whose content type is missing or not audio, or whose body is not the format that was requested, is rejected rather than played, and a response shorter than its own WAV header promises — or a pcm body that is not a whole number of samples — is reported as truncated instead of quietly returning a clipped utterance.

Configure via environment variables (the API key is read from the environment only — never commit it):

Environment variableDefaultNotes
STACKCHAN_FISH_AUDIO_KEY(required)API key, sent as Authorization: Bearer <key>. Unset → the engine still lists but say(voice="fish-audio") returns a clear error.
STACKCHAN_FISH_AUDIO_MODEL(none)Default voice model ID (the API's reference_id). When unset the request omits it and Fish Audio uses its own default voice.
STACKCHAN_FISH_AUDIO_BACKENDs2.1-proSynthesis backend, sent as the model header. One of s1, s2-pro, s2.1-pro, s2.1-pro-free.
STACKCHAN_FISH_AUDIO_URLhttps://api.fish.audio/v1/ttsEndpoint override, for a proxy or a compatible self-hosted deployment.

Select Fish Audio per call:

say(text="Nice to meet you!", voice="fish-audio")

Or make it the default engine for every say call that omits voice:

bash
export STACKCHAN_TTS_ENGINE=fish-audio

A per-call speaker_name overrides STACKCHAN_FISH_AUDIO_MODEL, so a single deployment can switch between trained voices without restarting the gateway.

5. Optional: STT setup (faster-whisper)

To let the device hear, install one of the [stt-*] extras and pair it with a firmware that supports the inbound listen wire type (present from this release onward). The gateway sends a listen.start notification, the firmware opens the microphone, and the inbound Opus frames are decoded and transcribed locally — no audio leaves your machine when you use the default faster-whisper engine.

Install the STT extra

For local transcription with faster-whisper (MIT-licensed, CTranslate2-based, runs on CPU):

bash
pip install 'stackchan-mcp[stt-faster-whisper]'

For the OpenAI Whisper API (cloud, useful when local compute is constrained):

bash
pip install 'stackchan-mcp[stt-openai]'
export OPENAI_API_KEY=sk-...

Both extras include the base [stt] extra which pulls in opuslib for decoding the inbound frames. The decoder needs the system libopus library — brew install opus on macOS, sudo apt-get install libopus0 on Debian/Ubuntu (this is the same prerequisite as the [tts] extra).

Configure (optional)

Environment variableDefaultNotes
STACKCHAN_LISTEN_LANGUAGEjaDefault listen() language when the tool call omits language.
STACKCHAN_FASTER_WHISPER_MODELbaseModel identifier — tiny / base / small / medium / large-v3. Larger models are more accurate but slower and use more memory.
STACKCHAN_FASTER_WHISPER_DEVICEcpucpu / cuda / auto.
STACKCHAN_FASTER_WHISPER_COMPUTE_TYPEint8int8 / float16 / float32.
STACKCHAN_OPENAI_WHISPER_MODELwhisper-1OpenAI Whisper model identifier (only whisper-1 is currently exposed by the API).

Try it

From an MCP client:

listen(duration_ms=5000, language="ja")

The gateway sends {"type":"listen","state":"start","mode":"manual"} to the device, buffers the Opus frames the device streams up for the capture window, then sends {"type":"listen","state":"stop"} and hands the buffered audio to the registered STT engine. The first call to the faster-whisper engine downloads the chosen model (~140 MB for base) into the Hugging Face cache; subsequent calls reuse it. For visible capture feedback, pass motion="face-only" to show the thinking avatar during capture and restore idle at the end, or motion="look-up" to preserve yaw, tilt pitch to look_up_pitch (default 50°, valid 5..85°), show thinking, and hold that pose on success. The STT framework is engine-agnostic — additional engines (Vosk, whisper.cpp, cloud providers) can be added without changing the listen API.

6. Optional: enable event notifications

Stack-chan physical events (today: touch tap / stroke; the structure allows additional subtypes to be appended later) can be delivered through three notification channels. All channels are disabled by default; opt in via ~/.config/stackchan-mcp/notify.yml. More than one channel can be enabled at the same time; each event is then delivered over every enabled channel. Pick whichever match the host you are integrating with:

  • channels — Claude Code plugin path. Notifications are injected into the running session as <channel ...> blocks via Claude Code's experimental Channels capability. Use this when Stack-chan is wired into Claude Code as an installed plugin and you want events to reach the conversation in-band.
  • jsonl — Out-of-process file integration. Each event is appended as a single JSON line to a file you configure. Use this when an external host (anything other than Claude Code, or your own pipeline) needs to ingest events asynchronously by tailing a file.
  • legacy_event — Pre-plugin MCP notification. The gateway emits the self-defined stackchan/event MCP notification method, which existed before the Channels capability shipped. Use this for backward compatibility when the host wires the gateway via ~/.claude.json mcpServers rather than the Claude Code plugin path.

See notify.example.yml for the full annotated configuration reference.

Channel: channels (Claude Code plugin path)

Use when Stack-chan is loaded as a Claude Code plugin and you want events delivered as in-session channel blocks. This channel uses an experimental MCP capability that may evolve.

Enable in notify.yml:

yaml
channels:
  enabled: true

Delivered as a <channel ...> block injected into the Claude Code session, for example:

<channel source="plugin:stackchanmcp:stackchanmcp" ...>head was tapped</channel>

Setup:

  1. Plugin installation — install this repository as a Claude Code plugin from the kisaragi-mochi-channels marketplace:

    bash
    claude plugin install stackchanmcp@kisaragi-mochi-channels

    For local development against your working copy, pass --plugin-dir /path/to/stackchan-mcp instead of installing from the marketplace; Claude Code starts the gateway under ${CLAUDE_PLUGIN_ROOT}/gateway via the bundled .mcp.json.

  2. Host environment setup — the Channels delivery path requires three host-side names to be aligned with the gateway's MCP server name (stackchanmcp, no hyphen):

    • The plugin's .mcp.json mcpServers key for this gateway must be stackchanmcp. If you previously wired the gateway under a different key, rename it.

    • Claude Code's settings.local.json enabledMcpjsonServers whitelist must include stackchanmcp.

    • The Channels allowlist requires a system-wide approval — Claude Code does not honor user-level (e.g. ~/.claude/settings.json) settings for the Channels allowlist. On macOS, create or edit /Library/Application Support/ClaudeCode/managed-settings.json (requires sudo):

      json
      {
        "channelsEnabled": true,
        "allowedChannelPlugins": ["stackchanmcp@kisaragi-mochi-channels"]
      }
  3. Receiver side — launch Claude Code with the Channels flags:

    bash
    claude --channels plugin:stackchanmcp@kisaragi-mochi-channels \
           --dangerously-load-development-channels plugin:stackchanmcp@kisaragi-mochi-channels

    The --channels flag attaches the channel source to the gateway and injects <channel source="plugin:stackchanmcp:stackchanmcp" ...> blocks into the session. The --dangerously-load-development-channels flag is currently required alongside --channels because the plugin's Channels capability is experimental; the approved-allowlist-only path without this flag has been verified not to deliver notifications in current Claude Code versions. The flag is expected to become optional once the plugin's Channels capability stabilizes.

Important — pre-plugin wiring does not receive Channels: if you previously wired this gateway via ~/.claude.json mcpServers (the pre-plugin path), that wiring does not receive <channel ...> injections. Claude Code only attaches a channel source to plugin-loaded MCP servers. Before switching to the plugin path, stop any existing gateway process to release the ESP32 ownership lock; the plugin-loaded gateway will otherwise fail to acquire it. If you prefer to keep the ~/.claude.json wiring, use the legacy_event or jsonl channel below — both work without plugin loading.

Other hosts:

  • Hosts with a claude/channel-compatible receiver: open that receiver per the host's documentation. Compatibility with hosts other than Claude Code has not been verified in this repository.
  • Hosts without a Channels receiver: use the jsonl channel below.
Migration from the previous stackchan-mcp (hyphenated) form

If you enabled Channels using the older stackchan-mcp server-name form, rename to the current stackchanmcp form (no hyphen) in all four places to keep the host MCP client and the gateway aligned:

  • Plugin / server name: change stackchan-mcp to stackchanmcp in your host's .mcp.json mcpServers key, in settings.local.json enabledMcpjsonServers whitelist, and in the --channels / --dangerously-load-development-channels flag arguments.
  • Channels flag form: change from --channels server:stackchan-mcp to --channels plugin:stackchanmcp@kisaragi-mochi-channels. The plugin form is the supported form now that the marketplace manifest is published.
  • system-wide allowlist: ensure /Library/Application Support/ClaudeCode/managed-settings.json has allowedChannelPlugins listing stackchanmcp@kisaragi-mochi-channels (not the old stackchan-mcp form).

Without all four renames the host MCP client logs Channel notifications skipped: server <name> not in --channels list for this session and the notifications never reach the session.

Channel: jsonl (out-of-process file integration)

Use when an external host or your own pipeline needs to ingest events asynchronously by tailing a file. This is the simplest channel to wire into anything that is not Claude Code.

Enable in notify.yml:

yaml
jsonl:
  enabled: true
  path: ~/.claude/stackchan-events.jsonl

Each event is appended as one JSON line to the configured path. The file is created if it does not exist, and existing entries are preserved. Each line carries:

  • event_type — top-level event type (currently "touch").
  • subtype — subtype within the event type (currently "tap" or "stroke").
  • duration_ms — firmware-reported duration of the event in milliseconds.
  • ts — firmware uptime in milliseconds (monotonic).
  • ts_unix — wall-clock timestamp when the gateway recorded the event.
  • session_id — gateway session identifier.
  • action — avatar action keyword for the event subtype (e.g. head_pat, head_stroke). The built-in default templates always populate this, and messages: overrides are also required to specify action, so this field is present for every supported subtype.

The rendered wording (e.g. head was tapped) is what the channels channel delivers as the human-readable message; it is not stored in the JSONL record itself. A delivered tap-and-stroke pair looks like:

json
{"event_type": "touch", "subtype": "tap", "duration_ms": 0, "ts": 123456, "ts_unix": 1717862400.0, "session_id": "abc-123", "action": "head_pat"}
{"event_type": "touch", "subtype": "stroke", "duration_ms": 720, "ts": 124000, "ts_unix": 1717862400.7, "session_id": "abc-123", "action": "head_stroke"}

The top-level event_type and subtype correspond to the rows in "Supported event subtypes" below.

Channel: legacy_event (pre-plugin backward compatibility)

Use when the gateway is wired into the host via ~/.claude.json mcpServers (the pre-plugin path) and you want events without switching the host over to the plugin form.

Enable in notify.yml:

yaml
legacy_event:
  enabled: true

The gateway emits the self-defined stackchan/event MCP notification method. The notification params carry the same fields as the JSONL record above, except that ts_unix is not included (it is added only by the JSONL writer). The host is responsible for surfacing the notification — Claude Code's pre-plugin path historically displayed the rendered template inline; other hosts may handle the notification differently.

Supported event subtypes

The currently supported physical events are listed below. The structure is intentionally extensible: additional touch subtypes or new top-level types (e.g. motion, voice) can be appended in future releases without rewriting this section.

TypeSubtypeDefault actionDefault template
touchtaphead_pathead was tapped
touchstrokehead_strokehead was stroked for {duration_ms}ms

The built-in defaults are phrased experientially — describing what the device felt rather than naming a mechanical event — so the consuming agent reads them as first-person narration. The {duration_ms} placeholder is substituted from the event payload; unknown placeholders are preserved verbatim.

Overriding the wording

Add a messages: block to ~/.config/stackchan-mcp/notify.yml to override the per-subtype action and template. Only the subtypes you list are overridden; everything else keeps the defaults above.

yaml
# ~/.config/stackchan-mcp/notify.yml
messages:
  touch:
    tap:
      action: head_pat
      template: "got a head pat"
    stroke:
      action: head_stroke
      template: "head being stroked for {duration_ms}ms"

Both action and template are required for each overridden subtype. The action value is forwarded in the event metadata, so keep it stable if a downstream consumer keys off it. See notify.example.yml for the full annotated reference.

About the avatar images

firmware/main/boards/stackchan/avatar_images.cc is a pure black RGB565 placeholder. The firmware builds and runs, but the screen will display nothing.

For a personal avatar, keep PNG sources outside git and generate ignored local override files:

bash
cd firmware
python scripts/avatar_convert/convert_avatar

Instalação

TypingMind
{
  "mcpServers": {
    "stackchan-mcp": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/stackchan-mcp/gateway",
        "python",
        "-m",
        "stackchan_mcp"
      ]
    }
  }
}

Use o MCP de Stackchan MCP com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Stackchan MCP, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. É possível executar o MCP localmente no seu dispositivo ou se conectar à URL de um servidor MCP remoto.

Opção 1: use o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Stackchan MCP como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Stackchan MCP.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "stackchan-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Stackchan MCP, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Stackchan MCP.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Stackchan MCP para me ajudar nesta tarefa?
Stackchan MCP
Claro. Já li.
Veja o que encontrei usando Stackchan MCP.

Opção 2: Adicione a URL de um servidor MCP

Use esta opção quando Stackchan MCP já estiver hospedado remotamente ou quando sua equipe quiser um conector compartilhado que vários usuários possam acessar.

1

Abra Conectores MCP

No TypingMind, vá até Plugins, abra Conectores MCP e selecione Adicionar URL.

  1. Abra o TypingMind no navegador.
  2. Acesse Plugins.
  3. Abra Conectores MCP.
  4. Clique em Adicionar URL.
Formulário do TypingMind para adicionar a URL de um servidor MCP personalizado
2

Cole a URL do servidor

Insira a URL do servidor MCP fornecida pelo provedor no campo URL do servidor. Adicione um nome para a conexão, uma descrição, um ícone, cabeçalhos HTTP personalizados ou configurações do cliente OAuth se o servidor exigir.

  1. Cole a URL do servidor MCP fornecida pelo provedor no campo URL do servidor.
  2. Digite um nome para a conexão de Stackchan MCP.
  3. Adicione uma descrição e um ícone para facilitar a identificação.
  4. Adicione cabeçalhos HTTP personalizados ou dados do cliente OAuth se o servidor exigir autenticação.
3

Crie a conexão

Clique em Criar conexão, volte à lista de Plugins e confirme que a nova conexão MCP está ativa.

  1. Clique em Criar conexão.
  2. Volte à lista de conectores MCP.
  3. Confirme que a conexão de Stackchan MCP aparece como ativa.
  4. Atualize a lista de plugins se a conexão não aparecer imediatamente.
4

Troque de modelo sem reconectar

Inicie um chat com seu modelo preferido, ative as ferramentas de Stackchan MCP em Plugins e mude para outro modelo sempre que necessário. A conexão MCP continua disponível no espaço de trabalho do TypingMind.

  1. Inicie um novo chat no TypingMind.
  2. Selecione o modelo de IA que deseja usar.
  3. Ative as ferramentas de Stackchan MCP em Plugins.
  4. Peça ao modelo para usar a ferramenta quando necessário.
  5. Mude para outro modelo de IA e reutilize a mesma conexão MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Stackchan MCP para me ajudar nesta tarefa?
Stackchan MCP
Claro. Já li.
Veja o que encontrei usando Stackchan MCP.

Perguntas frequentes

Para que serve o servidor MCP Stackchan MCP?

Stackchan MCP é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Stackchan MCP com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Stackchan MCP com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Stackchan MCP com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Stackchan MCP conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Stackchan MCP ao TypingMind?

É possível conectar Stackchan MCP ao TypingMind com o conector MCP local ou adicionando a URL de um servidor MCP remoto. Use o conector local quando o servidor precisar acessar arquivos, apps ou recursos privados no seu dispositivo, e use uma URL de servidor quando o servidor MCP estiver hospedado remotamente.

Quais ferramentas o MCP Stackchan MCP oferece no TypingMind?

Stackchan MCP disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Stackchan MCP?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Stackchan MCP exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇