ESP32 AI Toys: What Runs on the Board, What Runs in the Cloud

Say “turn to 80 degrees” to a XiaoZhi device and six things happen in order. The microphone records you, the board streams the audio to a server, the server transcribes it, a language model reads the transcript and emits a tool call, the call is sent back down to the board, and a servo moves. Three of those steps happen in your house. Three do not.

Every argument about how an AI toy should be built is really an argument about where that line falls. The protocol is now standard enough that the line is a design choice rather than an accident — and the two choices available in the same firmware produce very different products.

What MCP actually is

MCP, the Model Context Protocol, is a way to describe tools to a language model so that any model can call any tool without a custom integration for each pair. Before it, connecting N models to M tools took N×M adapters. After it, the same job takes N+M, because the tool describes itself in a format the model can read.

The architecture has three parts: a host application, a client inside it, and a server that wraps the actual capability. Messages are JSON-RPC 2.0, and a server exposes three kinds of thing — tools the model can call, resources it can read, and prompts a user can invoke. The useful comparison in the Chinese developer write-ups is USB-C: one port, many devices.

For a toy, only the first of those matters. A tool is a named function with a description, a parameter list and a return value. When the model decides the user wants the servo moved, it does not send code; it sends the name of the tool and the arguments, and something else executes it.

That “something else” is the whole question.

Local tools: the servo moves on the board

In xiaozhi-esp32, a tool can be registered inside the firmware. The signature has four parts: a name, a description in natural language, a property list, and a callback.

The description is not documentation for humans. It is the text the model reads when deciding whether to call the tool at all, which is why the convention is to name things in a hierarchy — `self.servo.set_angle` rather than `servo` — and to spell out the units and range in the description itself.

When that tool is called, the callback runs on the ESP32. It writes a PWM value, or a GPIO pin, or reads a sensor, and returns a short string that goes back up the chain to be spoken aloud. The latency is the latency of a function call plus the network hop that delivered the instruction. There is no API in the middle, no rate limit, and no vendor who can change the behaviour tomorrow.

Infographic showing three layers where a decision can be made in an AI toy: on the chip, on the local network and in the cloud, with a table of what keeps working if the Wi-Fi dies and who owns each layer
Three places a decision can happen. Only two of them survive a dead router.

This is the layer that makes a toy feel like a device rather than a terminal. It is also the layer most products skip, because registering a tool means compiling firmware in C++, and compiling firmware is the part that does not scale to a thousand SKUs.

Remote tools: the device becomes a pipe

The alternative is to put the tool on the server. The ESP32 then does what it is good at — capture audio, play audio, draw a face — and the tool runs somewhere with a real CPU.

This is the right choice more often than purists admit. Weather, search, a database lookup, a calendar: none of these can live on a chip with 400 KB of RAM, and pretending otherwise produces bad products. Adding a remote tool requires no firmware change at all, which means a product can gain capabilities after it ships.

Table comparing local MCP and remote MCP in xiaozhi-esp32 across where the tool lives, whether firmware must change, latency, offline behaviour and typical use
Same protocol, two bets. One costs a firmware build, the other costs control.

The cost is structural. A remote tool stops working when the server does, and the server is somebody else’s computer with somebody else’s uptime and pricing. It also means the request — and often the audio attached to it — passes through infrastructure you do not control. For a weather query that is fine. For a microphone in a bedroom it is a decision that deserves to be made deliberately rather than by default.

The AI Passport screen at boot showing a pixel-art character, the FoloToy logo, the word NETRUNNER and two menu items, GAME and ALBUM
The whole interface of a screen-based toy: two menu items, one face, and a clock.

XiaoZhi supports both, which is why it has become the reference implementation for this category: about 31,900 stars on GitHub, MIT licensed, with a companion server that can be self-hosted when you want the remote half to be yours as well.

The third option: ask the model once

There is a design that avoids the trade entirely, and it comes from a much smaller project.

WireClaw runs on an ESP32-C6, S3 or C3 with at least 4 MB of flash. You describe an automation in plain language over Telegram, serial or a message broker, and the model translates it into a structured rule. The rule is then written into the firmware’s rule engine and runs in the main loop.

After that point there is no model in the loop. The board checks a sensor every five seconds against a threshold and flips a relay. The README puts it in one line: no cloud, no server, no LLM calls. It also keeps notes in flash, so a preference like “my favourite colour is blue” survives a reboot and can be referred to later.

The project is small — about 211 stars — and its author is candid about the limits. It is not a real-time controller; rules are evaluated periodically, so anything needing millisecond response is out. Telegram alerts still need the network. And the rule engine is simple, which is both why it fits in a few kilobytes and why it will not run your house.

But the idea is the important part. The model is used as a translator, once, and the device keeps the result. The intelligence is rented for a minute and then the object stands on its own.

The price of letting a model write your device

Everything above describes a device that executes what a model asks for. The moment you extend that from “call this tool” to “write this behaviour”, a new class of problem appears, and the projects shipping it are refreshingly direct about it.

ESP-Claw loads Lua at runtime so that behaviour can change without a reflash. That is the feature: a user describes what they want, and the device gains a capability it did not ship with. It is also, structurally, a remote code path into a device that sits in your home. Espressif’s own documentation warns that scripts published in its community lab are written by third parties and may contain malicious code, and that the web console does not use HTTPS by default while holding your API keys.

None of that is a reason to avoid the architecture; it is a reason to be specific about what you are trusting. A device that can be reprogrammed by a language model can also be reprogrammed by whoever convinces the language model. The practical mitigations are unglamorous: keep the console off the public internet, treat community scripts the way you would treat a browser extension, and prefer rule-based translation — as WireClaw does — over free-form code generation when the thing being controlled has a motor or a mains relay.

The same logic applies to what the model is allowed to touch. Meta’s Linux SDK exposes four capabilities and states that commands run with the installing account’s privileges, which is an honest way of saying that the agent can do anything that account can. That is a reasonable design for a hobby machine and an unacceptable one for a shared server, which is why the documentation tells you to create a dedicated account first.

Even the platform companies chose the pipe

The most useful confirmation that “the device is an interface” is now the default comes from Meta.

In early October the company open-sourced Muse Gadgets: an ESP32 device SDK and a Linux device SDK under Apache-2.0, which let a board or a Raspberry Pi expose a screen, a microphone, buttons and sensors to Meta’s personal agent. The repository passed a thousand stars within about 48 hours and sits near 2,400 now.

Meta is explicit that nothing runs locally. The ESP32 and the Pi are the interface layer; inference happens in Meta’s cloud. On the Linux side the exposed surface is four capabilities — run a command, read a file, write a file, report device health — with a 120-second default timeout, a 600-second ceiling and a 96 KiB cap per output stream. Commands run with the privileges of the account that installed the agent, which the documentation states plainly and which is worth reading twice before installing it anywhere sensitive.

A row of Muse Gadget reference devices: a round AMOLED display, an M5Stack StickS3, the white puck-shaped Muse Home Link, a Raspberry Pi board outline and a Seeed e-ink terminal
The reference hardware Meta shipped with the SDK. Every one of them is an interface, not a brain.

The hardware list is a tour of the current state of the art in small AI devices: a round AMOLED board, an M5Stack StickS3, a Seeed e-ink terminal, a Raspberry Pi. Meta also ships its own puck, the Home Link, built on an ESP32-C5 with 8 MB of PSRAM and 8 MB of flash, dual-band Wi-Fi 6 and a 35×42×10 mm body. It runs locked firmware built on the same SDK, which is the clearest statement of the trade you will find: the code is open, the device you can buy is not yours to change.

Open source is not the same as free to sell

That distinction is where most hardware plans fail, and it is worth being precise about it.

Table of six projects with their licence and star count: xiaozhi-esp32 MIT, ESP-Claw Apache-2.0, WireClaw MIT, FoloToy AI Passport MIT, Muse Gadget SDK Apache-2.0, Velxio AGPL-3.0, each with what the licence means for selling hardware
Six licences, two walls, and neither wall is in the licence file.

The licences in this space are mostly permissive. XiaoZhi, WireClaw and FoloToy’s AI Passport are MIT; ESP-Claw and the Muse SDK are Apache-2.0. In each case the code is genuinely yours to ship, subject to keeping notices.

The walls are elsewhere. Meta’s SDK requires a token to pair a device, and the terms cap you at 50 devices for personal, non-commercial use — the code being Apache-2.0 does not change that, because the restriction lives in the service terms rather than the licence. Velxio, the browser-based ESP32 simulator, is AGPL-3.0, so hosting a modified version as a service means publishing your changes. And in every case the model itself is a separate product, billed per call, with no obligation to keep working on the terms you built against.

A toy that ships is a stack of four agreements: a software licence, a service contract, a component supply chain and a privacy policy. Open source settles exactly one of them.

The three questions worth asking

If you are buying rather than building, the architecture is still the thing to interrogate, and it can be reduced to three questions.

Does anything move when the Wi-Fi is off? If a servo, an LED or a wake word still works, part of the product is genuinely local — and that part will survive the company’s next pricing change.

Does the audio leave the house? For a screen-based toy it usually does, and that is a normal trade for the capability you get. What matters is whether the product says so and whether the vendor keeps the recordings.

Can you change the behaviour without asking permission? This is where the firmware licence matters more than the spec sheet. A device running XiaoZhi or ESP-Claw can be reflashed by its owner. A device with locked firmware cannot, whatever the repository says.

StackChan, an open-source ESP32-S3 desktop robot from M5Stack with a 2-inch display showing an animated face and two servo-driven arms, at AIXTOY

M5Stack StackChan

$159.71

An open-source desktop robot built on the ESP32-S3 CoreS3 controller, with a 2-inch 320×240 IPS face and a community that ships its own behaviours – the clearest example of the device-as-interface model in a finished product.

What to build, and in which order

For anyone who wants to test the architecture rather than read about it, the order is: decide where the tool runs, then pick the board, then pick the firmware.

If the tool needs to touch hardware, it belongs on the board, and that means an S3 with PSRAM and a firmware you can compile. If the tool needs the internet, put it on a server and keep the device thin. If the tool is really a rule — a threshold, a schedule, a preference — translate it once with a model and then stop paying for inference, the way WireClaw does.

ESP-Claw expansion board for ESP32, an I/O module with servo headers, sensor inputs and motor drivers for DIY robot projects, at AIXTOY

ESP-Claw Expansion Board

$48.99

The I/O half of the argument: multi-channel servo control, analogue and digital sensor inputs and motor outputs, so a local MCP tool has something physical to drive.

The board itself is the least interesting decision, which is the point of the whole exercise. A C3 at $1.07 and an S3 at $2.51 differ by less than the shipping, and the difference that matters is not clock speed. It is whether there is enough memory for the device to keep something of its own.

That is the part of the object that survives when the server does not.

Image credits: reference hardware photograph from Meta’s Muse Gadget SDK repository (Apache-2.0); device photograph from the FoloToy AI Passport teardown, October 2026.

Tags:

More on AI Toys

Your Shopping cart

Close

Your Cart

Your Cart

You're 100.00$ away from Free Gift
🎁
$
🚚
100.00$ Free Gift
200.00$ 10% Discount
300.00$ Free Shipping

Your Cart is Empty

Start Shopping
Payment Details
Sub Total 0.00$