
yoto-cards-mcp
io.github.haimrait/yoto-cards-mcp
Build Yoto Make Your Own cards by chat. Independent; not made by or affiliated with Yoto.
Documentation
Yoto Cards MCP
An MCP server and agent skill for building and looking after Yoto Make Your Own cards by chatting with an AI agent: create cards from podcasts, files and streams, pick track icons and covers, reorder and fix tracks, and undo mistakes.
Independent project that works with Yoto. Not made by, endorsed by, or affiliated with Yoto.
It runs locally today (Claude Code, Claude Desktop and other desktop or CLI agents over stdio) and is built so the same tools can later be hosted for web and mobile agents.
What's different
- Every change is undoable. The previous version of a card is saved before every
write (25 per card);
restore_cardbrings it back, and can even recreate a deleted card. - No half-written cards. Tracks upload in parallel as a background job and are written to the card once, in order. Concurrent edits to one card are serialised, and each edit re-reads the latest card first, so changes made in the Yoto app are not overwritten.
- No accidental doubles. Audio already on the card (or twice in one request) is recognised by
Yoto's own content hash and skipped with a note saying which track it matches, so a retried
request or a re-added file does not fill the card twice.
allow_duplicateskeeps a copy on purpose. - Nothing is lost on round-trip. Card fields the server doesn't know are kept as they are.
- Limits enforced before writing: 100 tracks, 5 hours / 500 MB per card, 60 min / 100 MB per track.
- The parent sees the important moments themselves. In apps that support MCP elicitation, sign-in opens the real Yoto page through the app (the link never passes through the chat), and the upload plan is shown as a form before anything uploads.
- Confirmations the agent can't fake. Deleting, removing tracks, restoring and replacing
covers ask the parent through a form when the client supports it (MCP elicitation, both
protocol versions); otherwise the agent must ask in chat and pass
confirm: true. - Safe downloads. Files are identified by their bytes, never by name or headers. Web pages, archives, programs and scripts are refused. Downloads can't reach private networks or cloud metadata addresses, including through redirects or DNS tricks (the check runs on the address actually connected to). Size is capped while downloading.
- Painless sign-in. PKCE with a loopback listener catches the approval, so nobody copies codes by hand. Yoto's single-use refresh tokens are rotated under a lock shared across processes, so a desktop app and a CLI agent can share one login.
- The skill ships with the server over MCP (
skill://yoto-cards/SKILL.md). Only apps that support skills over MCP read it (such as Claude Code, Claude on the web and VS Code; Claude Desktop does not yet), so the essential rules are also in the server's instructions. - Icons for anything, still or animated. Yoto's library first; otherwise
make_iconturns an emoji into crisp 16x16 pixel art (Google's Noto Emoji, Apache 2.0) or renders a grid the agent draws, and shows a preview so the agent and the parent can see it before it goes on a track. Add amotion(bounce, wiggle, float, pulse, twinkle, flip) for a looping 16x16 GIF the player animates. - Suggestions for each child. A minimal profile (nickname, birth month, languages,
interests, things to avoid) is stored on your computer and read by the AI app you chat with;
the podcast search gets only search words and a country code.
discover_contentsearches in the child's languages, checks every show's real feed (language, length, still publishing, downloadable, not explicit) and never suggests a show twice. - Stickers for the physical cards.
make_labelsprints covers on an A4 PDF at real card size (rounded corners, cut lines, 9 per page), with a preview of the page. - Podcast cards that keep up. A card can follow its podcast: new episodes are found by date and added once each, oldest first, as far as the card's limits allow; old gaps are never refilled, and a full card is reported instead of squeezed. Optionally fully automatic.
- Cover designs to choose from.
design_coverbuilds three different layouts around the show's own artwork, in its colours, with readable titles (Hebrew and other right-to-left text included) and emoji from the content, and returns them as one numbered preview. In apps that support MCP Apps, the covers also appear as a picker: tap one to put it on the card. - YouTube audio, locally and carefully.
read_youtubelists a video or playlist (with the video's licence when YouTube shows one) and plans the cards; YouTube links then work as track sources. Only for audio the family has the right to use: the parent confirms it before anything downloads. Links are reduced to a video ID before reaching yt-dlp, which runs without a shell, the user's yt-dlp config or browser cookies. Live streams, age-restricted videos and anything over Yoto's track limits are refused. - Podcasts in one step.
read_feedtakes a feed, an Apple Podcasts link or a show's website and returns clean episodes plus a plan of how many cards they need within Yoto's limits. - Readable errors. Every failure comes back with a stable code and a "What to do" line.
Tools
| Area | Tools |
|---|---|
| Account | account_status, sign_in, finish_sign_in, sign_out |
| Cards | list_cards, get_card, create_card, update_card_details, delete_card |
| Tracks | add_tracks, rename_track, move_track, reorder_tracks, remove_tracks |
| Jobs | get_job, list_jobs, cancel_job |
| Podcasts | read_feed, follow_podcast, podcast_updates, add_new_episodes, unfollow_podcast |
| YouTube (local) | read_youtube |
| Art | search_icons, make_icon, set_track_icons, design_cover, set_cover |
make_labels | |
| Children | save_child_profile, list_child_profiles, delete_child_profile, discover_content, record_suggestion |
| Players (opt-in) | list_players, player_status, control_player, player_settings, change_player_settings |
| Undo | list_backups, restore_card |
Track sources: url (a podcast enclosure, a direct audio link, or a YouTube video link in
local mode), path (an absolute path on the computer running the server; local mode only) or
stream_url (audio the player streams on every play).
Setup
Both routes need your own free Yoto client ID (a public ID, not a secret): create a public
client at https://dashboard.yoto.dev and register the callback URL
http://127.0.0.1:8787/callback.
Claude Desktop: one file
No terminal, and no Node to install: Claude Desktop runs the extension with its built-in Node.
- Download the
.mcpbfile from the latest release. (Or build it yourself withnpm installandnpm run extension; it is written toextension/out/.) - Double-click it, or drag it into Settings → Extensions.
- Paste your client ID, choose whether to use YouTube and player control, and install.
- Ask Claude to connect your Yoto account.
Claude Desktop warns that the extension gets access to your computer and that Anthropic has not
verified the developer. Expect it, and install only a file from a source you trust. YouTube audio still needs yt-dlp (below). If you added
yoto-cards to the app's config by hand before, remove that entry so the tools are not doubled.
Claude Code, Cursor and other agents: from npm
Requires Node 22 or newer. Nothing to download or build.
- Claude Code:
claude mcp add yoto-cards -e YOTO_CLIENT_ID=your_client_id -- npx -y yoto-cards-mcp - Cursor, or another agent's MCP config:
{ "mcpServers": { "yoto-cards": { "command": "npx", "args": ["-y", "yoto-cards-mcp"], "env": { "YOTO_CLIENT_ID": "your_client_id" } } } }
Restart the app, then ask the agent to connect your Yoto account. To sign in from a terminal
instead: YOTO_CLIENT_ID=your_client_id npx -y yoto-cards-mcp login.
From source
Requires Node 22 or newer.
- Get the code and build it:
git clone https://github.com/haimrait/yoto-cards-mcp.gitcd yoto-cards-mcpnpm installnpm run build - Connect your agent.
- Claude Code:
claude mcp add yoto-cards -e YOTO_CLIENT_ID=your_client_id -- node "/absolute/path/to/dist/bin/cli.js" - Claude Desktop or another desktop agent's MCP config:
{ "mcpServers": { "yoto-cards": { "command": "node", "args": ["/absolute/path/to/dist/bin/cli.js"], "env": { "YOTO_CLIENT_ID": "your_client_id" } } } }
- Claude Code:
- Sign in: ask the agent to connect your Yoto account (it calls
sign_in), or from a terminal:YOTO_CLIENT_ID=your_client_id node dist/bin/cli.js login
Player control (optional)
Playing cards, pausing, volume, night light, sleep timer, alarms and volume limits on the family's players. Off by default because:
- it needs three more Yoto permissions:
family:devices:view,family:devices:controlandfamily:devices:manage(tick them on your app at dashboard.yoto.dev); - Yoto does not verify apps that use the control or manage permissions. That is fine for personal use and sharing, but matters for a public listing.
To switch it on, add YOTO_PLAYER_CONTROL=true to the server's environment, restart the app,
and sign in again so the parent approves the new permissions. Every command and settings
change is confirmed by the parent, a player's settings are backed up before each change,
and live commands use Yoto's documented player connection (MQTT, signed in with the
family's Yoto token).
Not yet tried on a real player. Sign-in with the three permissions and the player list were
checked live (2026-11-28) on an account with no players. Two things only a real player can
confirm: the address format sent to play a card (https://yoto.io/<cardId>) and the exact
shape of the player's replies.
YouTube audio (local only)
Needs yt-dlp, plus a JavaScript program it uses to read YouTube: Deno (preferred, since it runs YouTube's scripts without access to your files or network), or Node 22 or newer, used when Deno is missing. On a Mac, Homebrew installs Deno along with yt-dlp:
brew install yt-dlp
On Windows: winget install yt-dlp.yt-dlp DenoLand.Deno. The server looks in the usual
install places, since desktop apps start it with a short PATH; set YOTO_YTDLP_PATH if
yt-dlp is elsewhere. Keep yt-dlp up to date (brew upgrade yt-dlp): YouTube changes often.
YouTube's terms allow downloading only where YouTube or the rights holder permits it. Use this for the family's own videos, Creative Commons videos, or with the creator's permission.
Automatic podcast updates (optional)
Cards that follow a podcast with auto_add: true are updated by the sync command. Run it
once a day from your scheduler, for example with cron (crontab -e):
0 7 * * * YOTO_CLIENT_ID=your_client_id /usr/local/bin/node "/absolute/path/to/dist/bin/cli.js" sync >> "$HOME/.yoto-cards-mcp/sync.log" 2>&1
sync --dry-run shows what it would add without changing anything. Each line of the log
says what was added, what failed, and whether a card is full.
Configuration
| Variable | Default | Purpose |
|---|---|---|
YOTO_CLIENT_ID | (none) | Public client ID; required to sign in |
YOTO_REDIRECT_URI | http://127.0.0.1:8787/callback | Must match the URL registered for the client |
YOTO_DATA_DIR | ~/.yoto-cards-mcp | Tokens (file mode 600), backups, job records, temporary downloads |
YOTO_ALLOW_LOCAL_FILES | true | false accepts URLs only |
YOTO_SCOPES | openid profile offline_access user:content:view user:content:manage user:icons:manage | Requested Yoto scopes (Yoto only honours scopes requested explicitly) |
YOTO_ALLOW_YOUTUBE | same as YOTO_ALLOW_LOCAL_FILES | false hides read_youtube and refuses YouTube links |
YOTO_YTDLP_PATH | (searched) | Full path to yt-dlp, if it is not found automatically |
YOTO_PLAYER_CONTROL | false | true adds the player tools and their permissions (see above) |
YOTO_LOG_LEVEL | info | Logs go to stderr only, with secrets redacted |
node dist/bin/cli.js http --port 3939 serves the same tools over Streamable HTTP on
127.0.0.1, which is useful for testing with web-style clients through a tunnel.
Development
npm test
npm run typecheck
npm run extension
The last one builds the Claude Desktop extension, with the icon renderer's binaries for Mac, Windows and Linux on Intel and ARM.
Tests run against an in-process fake of the Yoto API and cover editing, limits, sniffing, network guards, token rotation across processes, sign-in, confirmations on both MCP protocol versions, backups and restore, and skills over MCP.
src/
yoto/ Yoto API client, auth (PKCE, refresh), loopback sign-in, card schemas
cards/ pure card edits, limits, icon search, CardService (lock, backup, verify)
media/ downloads, byte sniffing, private-network guard
jobs/ background job manager and the track upload pipeline
storage/ JSON store (file for local, memory for tests) with a cross-process lock
mcp/ server, tools, confirmations, responses
bin/cli.ts stdio / http / login / status / logout
skills/yoto-cards/SKILL.md + references, served over MCP
Verified against the live Yoto API (2026-11-27)
Every tool was run against a real account. Behaviour the docs don't spell out, confirmed live:
- Scopes must be requested by name. A token with only
user:content:managegets 403 onGET /content/{id};user:content:viewhas to be in the sign-in request, even though the dashboard says it is "included automatically".account_statusflags this. - Dashboard scopes must be ticked on the app, or sign-in fails with "scopes that have not been pre-approved".
metadata.languagesaccepts onlyen, en-gb, en-us, fr, fr-fr, es, es-es, es-419, de, it, nl, zh_Hans. Other languages (e.g. Hebrew) are rejected; leave the field out. Titles in any language work.- Icon uploads must be raw bytes with
Content-Type: image/png; multipart is refused. Covers are raw bytes too, and the returnedmediaUrlgoes inmetadata.cover.imageL. - Tracks with
icon16x16: nulland stream tracks withoutduration/fileSizeare accepted. - Audio upload (PUT with the sniffed MIME type), transcoding, and SHA-256 dedupe work.
- Refresh tokens rotate on every refresh, and the session renews automatically.
- Emoji and hand-drawn 16x16 PNG icons upload and display; preview sheets match what is uploaded.
- Animated 16x16 GIF icons upload with
autoConvert=falseand Yoto keeps every frame (served back asGIF89a, though labelledimage/png). read_feedhandles real feeds (440-episode show, Apple Podcasts link lookup), and episode links from podcast analytics services chain about six redirects before the audio, so up to 10 are followed, each re-checked by the network guard.- YouTube audio (2026-11-28, yt-dlp 2026.11.23): a Creative Commons video's stereo M4A (itag 140) downloads in seconds, uploads and transcodes like any file. yt-dlp older than about 90 days gets HTTP 403 from YouTube, which the server reports as "update yt-dlp".
Privacy
No server of its own, no analytics, no tracking. PRIVACY.md lists what is kept on your computer and what is sent to Yoto, your AI app and other services.
License
Apache License 2.0. See NOTICE. Yoto is a trademark of Yoto Limited; this project is independent and only describes compatibility.
Roadmap
- Hosted mode on Vercel: OAuth for many families, a database store, an upload page so parents can send files from their phone straight to Yoto.
- MCP Tasks for uploads once the SDK ships server support (jobs work in every client today).
- Try player control on a real player.
yoto-cards-mcpnpm install yoto-cards-mcphttps://github.com/haimrait/yoto-cards-mcp/releases/download/v0.2.0/yoto-cards-mcp-0.2.0.mcpb# mcpb: https://github.com/haimrait/yoto-cards-mcp/releases/download/v0.2.0/yoto-cards-mcp-0.2.0.mcpb