Building a DIY AI Agent with Claude Code on M5Stack Stick 3
Sunday tinkering post by Mark Dembo (Head of Solutions, Developer Platform & AI at Cloudflare) published on June 7, 2026 on his personal blog. Narrative: inspired by Steve Ruiz, the author buys a small M5Stack Stick 3 device (~€30) and, taking advantage of the release of Opus 4.8, builds himself a DIY AI agent "out of pure curiosity, with no goal." Iteration 1 (45 min): he throws the device's documentation at Claude Code, which generates Python scripts (~200 LOC, "zero blast radius") displaying the weather in Munich, then in several cities; a Cloudflare Workers + Workers AI backend adds text-to-speech (TTS), push-to-talk (speech-to-text), and a central small LLM to answer questions. Iteration 2 (a real agent): moving from REST endpoints to WebSocket transport via the Cloudflare Agents SDK + Dynamic Worker execution → the "Code Mode" pattern (the agent writes and executes code to accomplish its task).
By **Mark Dembo**// Source markpauldembo.com ↗/Reading 2 min/.md// Auto-verified translation
#BYO agent#bring your own AI#DIY project#tinkering#M5Stack Stick 3#30-euro device#hardware DIY#Steve Ruiz
In this June 7, 2026 post, Mark Dembo (Head of Solutions – Developer Platform & AI at Cloudflare) recounts a Sunday tinkering project: building a DIY AI agent from a small M5Stack Stick 3 device bought for ~€30, inspired by Steve Ruiz and motivated by the release of Opus 4.8. The motto: "There is no goal. Pure exploration and curiosity. And that feels just great."
First iteration (45 minutes). He throws the device's documentation at Claude Code, which produces roughly 200 lines of Python scripts. Since they have "zero blast radius", he allows himself to not worry about the code at all. The flow stays human-in-the-loop (not very "2026" for his taste): Opus generates, he copy-pastes into the UIFlow web interface, runs it, and reports the result back. His role shrinks to three functions — idea generator, executor and judge. A Cloudflare Workers + Workers AI backend quickly adds text-to-speech, push-to-talk (speech recognition), and a central small LLM: the object listens, answers, and tells bad jokes.
Second iteration. Aiming for a real agent, he points Opus at the Cloudflare Agents SDK, switches from REST to WebSocket transport, and enables Dynamic Worker execution — unlocking his favorite pattern, "Code Mode": the agent writes and executes code to accomplish its task. Given internet access, the agent computes 11! with a one-liner, finds the Champions League winner via fetch() on Wikipedia, and gives the weather for any city. Its limit: no access to private data.
Third iteration. He connects Todoist via an MCP OAuth flow (added in a few minutes by Claude) — and inherits 50 tools all at once, hence two problems: context bloat and a real blast radius (a bad call could delete a critical task). His countermeasure, inspired by Cloudflare's MCP Server Portal and Claude connectors: set each tool to Always allow / Ask for approval / Disable — disabled tools never enter the context, an LLM classifier only accepts explicit grants, and default = deny.
What he did not do: no latency optimization, no evals, no optimistic calls — "I did not even look at the code once. And you know what? That's the nice part of it." The final sense of wonder is less about capability than about its accessibility: €30 and a few cents of inference for an object controlled in natural language.
Key takeaways
Date / source.June 7, 2026, personal blog markpauldembo.com. Author: Mark Dembo, Head of Solutions Developer Platform & AI Cloudflare. Inspiration: Steve Ruiz.
Setting. Sunday tinkering, ~€30 (M5Stack Stick 3) + freshly released Opus 4.8. "No goal. Pure exploration and curiosity." ### Iteration 1 — from zero to a talking object (45 min)
Device documentation → Claude Code → ~200 LOC Python scripts, "zero blast radius" → "I can afford to not care about the code at all".
Human-in-the-loop. flow (deemed not very 2026): Opus generates → copy-paste into UIFlow → run → report the result back to Claude.
Role reduced to idea generator / executor / judge (+ rarely technical guide).
Cloudflare Workers + Workers AI. backend: TTS, push-to-talk (STT), central small LLM to answer. ### Iteration 2 — a real mini-agent
Public data OK: 11! (one-liner), Champions League winner (via fetch() on Wikipedia — internet access given to the agent), weather for any city.
Limit: no access to private data → next mission. ### Iteration 3 — real powers (and their safeguard)
Todoist. connection via MCP OAuth (added in minutes by Claude) → 50 tools all at once.
Two problems: (1) context bloat (most tools unused); (2) real blast radius (a bad call = deletion of an important task).
Solution (Cloudflare MCP Server Portal + Claude connectors): per-tool Always allow / Ask for approval / Disable; Disabled stays out of context; LLM classifier only accepts distinct "allow" grants, default = deny. ### What he did NOT do (owned)
No audio+LLM latency/streaming optimization ("yes, I know, it's slow").
No optimistic LLM calls, no evals of models/prompts.
*"I did not even look at the code once". * — and this is claimed as the fun part of it. ### To use in briefs / presentations
Accessibility proof-point. €30 + 1 session window + a few cents of inference → conversational object. "The true unlock is how accessible it is."
Concrete demonstration of Code Mode + MCP + tool governance (allow/ask/disable, default-deny) — reusable to frame agentic security.
Pedagogical contrast. with Failing Faster (Pragdave): here "zero blast radius" justifies never looking at the code — discipline depends on blast radius, not dogma.
Attributed claims
« I did not even look at the code once »
— Mark Dembo
the accessibility of AI capability (€30 + a few cents of inference) is the real unlock
— Mark Dembo
The knowledge graph extracted from this fiche — 11 entities, 13 relations.
In this graph :Mark Dembo · BYO Agent with M5Stack Stick 3 · M5Stack Stick 3 · Opus 4.8 · Cloudflare Workers / Workers AI · Cloudflare Agents SDK · Code Mode · MCP (OAuth) · gouvernance d'outils MCP · zero blast radius · idea generator / executor / judge