How to Generate an Interactive App Mascot Directly from Claude Code
By the Charmotion team · Updated · How we write guides

Connect a character animation MCP server to Claude Code, then have Claude call its tools to design or import your mascot, pick the animations and download an animated app mascot as a Rive file with state machines and exported videos. Generation runs as tool calls, so the mascot is built without leaving the terminal.
Key takeaways
- Claude Code reads MCP servers from a .mcp.json file or from claude mcp add-json, and HTTP servers need a type and a url.
- A character server can create a set of animations and return one Rive file plus download links from the terminal.
- A Rive file responds to app state through a number input, so the mascot can react to real events.
- Masko.ai also offers an MCP server for Claude Code, but it does not document a native .riv export (as of December 2026).
- Check credit costs and output formats before you generate a full set.
Already have a character or logo? See examples in real app screens: splash, onboarding, loading and empty-state screens, with the animation that plays in each.
What does generating an app mascot from Claude Code involve?
This guide shows how to generate an animated app mascot in Claude Code without leaving the terminal, from connecting a server to wiring the finished file into your app. Claude Code does not draw anything itself. It calls tools that an MCP server exposes, and those tools produce the files.
Three parts make up the workflow:
- The server. A remote MCP server with its own tools, such as design, create, list and export.
- The config. A JSON entry that tells Claude Code the server address and how to connect to it.
- The output. Files or download links, usually a Rive (.riv) file for the interactive mascot, plus video copies and integration notes.
Claude Code is useful here because it can read the integration notes and write the app code that uses the mascot in the same session. The mascot file matters most for an interactive app, because a plain video cannot respond to what the user does, while a Rive file can. How to make an animated mascot for your app covers the design choices, and animating a logo or character from Claude, Cursor or VS Code with MCP covers the same idea in other editors.
How do you add an MCP server to Claude Code?
Claude Code reads MCP servers from JSON. The official Claude Code MCP documentation describes two routes: the claude mcp add-json command, and a .mcp.json file at the project root. An HTTP server uses type set to http and a url, with optional headers. The docs also accept streamable-http as an alias for http.
Add a server from the terminal:
claude mcp add-json mascot-server '{"type":"http","url":"https://your-server.example/mcp"}'Or commit the same entry to .mcp.json so teammates get it when they clone the repo:
{"mcpServers":{"mascot-server":{"type":"http","url":"https://your-server.example/mcp"}}}Three details cause most setup problems:
- An entry with a
urlbut notypeis treated as a stdio server and counts as a configuration error. Always set the type. - Claude Code expands environment variables inside
.mcp.json, so a team can share the file and keep keys specific to each machine. - Scope decides where the entry is stored. Third-party guides describe local scope (the default, kept in
~/.claude.jsonunder the current project), project scope (.mcp.jsonat the repo root, shared through version control) and user scope. Check the official MCP page for the current flags before you script them.
Use project scope for anything the whole team needs, and keep personal experiments in local scope so they stay off the shared file. For the server side of the connection, Charmotion's MCP server page lists its endpoint and tools.
Which MCP server generates the mascot, and how do you run it from Claude Code?
Disclosure: Charmotion is our product. Charmotion runs a remote MCP server at https://charmotion.app/mcp. It uses Streamable HTTP and OAuth sign-in, so there is no API key to store in the repo. Add it with the same entry shown above, using that URL, and complete the sign-in when Claude Code asks. Designs, character animations and logo builds draw from your plan's credits. Plans and credit amounts are on the pricing page, and free use without an account includes animated previews and guide search.
The character workflow runs as four tool calls:
- Get a character. Use
design_characterto have the AI designer draw one, or start from your own image. The image must be one finished, coloured character facing the viewer, with visible eyes and mouth. Sketches, photos, groups and busy scenes are refused, and a refused image is not charged. - Create the set.
create_character_settakes the animations you pick. Launch, happy, wave and loading are preselected, and each costs 1 credit. Idle is free and always included, so a character can have up to 11 animations. Add more later withadd_animations, and only the new ones use credits. - Read the result.
get_character_setreturns download links and AI_README integration notes for coding assistants.get_accountshows what is left on your balance. - Export videos.
export_videosmakes an MP4 (1080x1080, 60 fps), a GIF, a transparent WebM (VP9 alpha), a transparent MOV (HEVC alpha) and a 9:16 launch MP4, usually in about a minute. Exports do not use credits.
The main file is one Rive (.riv) with three machines. CharacterViewModelMachine holds a number property named mood. CharacterStateMachine has a number input also named mood. LaunchStateMachine appears only when launch was picked, plays once and then settles into idle. Mood numbers are fixed, and moods blend into each other:
| Mood | Number | Typical use in an app |
|---|---|---|
| idle | 0 | Resting loop, the default state |
| happy | 1 | Success, with sparkles |
| wave | 2 | Greeting on first launch |
| thinking | 3 | Waiting on an AI reply or a search |
| sad | 4 | Error |
| loading | 5 | Long task in progress |
| listening | 6 | Voice or text input |
| talking | 7 | Speaking a reply |
| sleeping | 8 | Inactive or idle timeout |
| attention | 9 | Needs the user to act |
Characters have no one-shot triggers, so show a success with happy and an error with sad. Small accents such as Z z z, thinking dots and the exclamation mark are on by default, and the boolean accents hides them.
Masko.ai is the closest alternative for this route. It offers a web Studio, a REST API and an MCP server that Claude Code can call, and its Masko Code desktop app runs a state machine that hooks into Claude Code. As of December 2026, its Studio lists a single image at $0.125 and a 5-second animation at $1.25, and new accounts start with $2.63 in credits. Its exports are transparent WebM and HEVC .mov, a stacked MP4 for Android and a plain MP4. Its open-source player runs on web, React, Apple devices and Android. Masko does not document a native Rive (.riv) export (as of December 2026), so choose Charmotion's route if a .riv file is the deliverable, and Masko's route if you need talking clips, stickers or a desktop companion.
How do you wire the generated Rive file into the app?
A .riv file is data that a runtime draws. The app needs the Rive runtime for its platform and a way to set the mood number. Rive's runtimes are open source and play any .riv file, and the Rive data binding APIs for web, React Native, Flutter, Apple, Android and Unity all expose the view model that the file defines.
Keep the wiring as a single mapping from app state to mood number, so the code is easy to review and the AI assistant reading AI_README gets it right:
const MOOD = { idle: 0, happy: 1, wave: 2, thinking: 3, sad: 4, loading: 5, listening: 6, talking: 7, sleeping: 8, attention: 9 };
function moodFor(state: string): number {
switch (state) {
case 'saving': return MOOD.loading;
case 'saved': return MOOD.happy;
case 'failed': return MOOD.sad;
default: return MOOD.idle;
}
}Write the result of moodFor(state) into the mood property through your runtime's data binding call whenever the state changes. Do not drive the mascot with timers. Let real events, such as a request finishing or a save failing, decide the mood, and let the file blend between moods.
Use the mapping to answer the question users ask most: what the app is doing right now. A mascot that shows loading during a save, happy after it succeeds and sad when it fails tells the user more than a static icon. For a web setup, adding a Rive mascot to a Lovable app shows the same pattern inside an app builder.
What should you check before you ship a generated mascot?
Generated output is a starting point. Check these items before the mascot reaches users:
- Transparency by browser. Transparent WebM with VP9 alpha displays in Chromium-based browsers and Firefox, while Safari has been reported to ignore its alpha layer. Serve the HEVC .mov alongside it for Safari and iOS.
- Which file the app loads. Load the .riv in the app for interaction. Use video copies for marketing, store pages and fallbacks that cannot run a runtime.
- Credits before a batch. Run the balance check first, then generate. Idle is free, but every other character animation and every AI design uses credits.
- Secrets out of the repo. Keep keys and tokens in environment variables. Commit only the server URL and transport type.
- Re-check the tool list. After any server update, confirm the tool names and parameters before you script them, since integrations break on renamed tools.
- Vertical and social sizes. The 9:16 launch MP4 suits Reels and Shorts. Use the 1080x1080 MP4 for square placements.
Run one character end to end before you batch several. A single mascot that passes these checks in your real app shows you whether the mood mapping and file formats fit the product.
When is a terminal workflow enough, and when do you need a designer?
The terminal route fits a clean character, a standard set of states and a team that already works in Claude Code. You can generate, export and wire a mascot in one session, and the output is files your team can version and review.
Bring in a designer when the source drawing needs rework, when the motion must follow a detailed brand guide, or when the mascot needs bespoke behaviour such as lip-sync to a real voice, a walk cycle or a dance. In those cases the terminal still helps with wiring and exports, but the custom animation is better made in an editor. How to animate a mascot without After Effects compares the options for teams without a motion designer.
For a mascot that also needs to appear in streams and chat, the same video copies can feed other channels. Twitch animated emotes from a mascot animation covers the size and format rules for that case.
Generate an animated app mascot in Claude Code
- Declare the server. Add a remote MCP server entry with type http and its url, using claude mcp add-json or a project .mcp.json file.
- Sign in. Complete the server's OAuth sign-in when Claude Code prompts for it, so no API key is stored in the repository.
- Create the character. Design a character with the server's design tool, or start from one finished image facing the viewer with visible eyes and mouth.
- Pick the animations. Create the character set with the animations the app needs. Idle is included for free, and each other animation uses credits.
- Export and wire. Download the Rive file and integration notes, export the video copies you need, then map app states to the mood number in code.
Frequently asked questions
Do I need an API key to connect an MCP server to Claude Code?
Not for servers that use OAuth sign-in. The remote Streamable HTTP transport uses OAuth 2.1, so a separate authorization server handles login and tokens, while the MCP server checks the tokens it receives. Servers that rely on a key need that key in the config, which is why teams keep it in environment variables rather than in a shared file.
Can the same mascot server work in Claude Desktop, Cursor or VS Code?
It can, if the client supports remote servers. Claude Desktop adds remote servers as connectors from its settings screen, Cursor reads an mcp.json file, and VS Code Copilot Agent Mode reads its MCP configuration. File locations and steps differ between clients, so check each client's current documentation before you copy a config.
Does Masko.ai export a Rive file for Claude Code?
Not as documented. Masko does not document a native Rive (.riv) export (as of December 2026). Its documented outputs are transparent WebM, HEVC .mov, a stacked MP4 for Android and a plain MP4, plus a canvas JSON configuration. Confirm on Masko's own pages before you plan a Rive pipeline around it.
Sources
- Connect Claude Code to tools via MCP, Anthropic
- Claude Code MCP servers, Builder.io
- Masko.ai, Masko
- Masko Studio pricing, Masko
- Animate your mascot (Masko docs), Masko
- Charmotion MCP server, Charmotion
Related guides
- How to Connect a Remote Animation MCP Server to Claude Code
- How to Create Interactive Rive Character Animations in Claude Desktop via MCP
- How to Add New Mood and Animation States to a Rive Character via MCP
- How to Export Transparent WebM, MOV, MP4, and GIF Animations Directly via MCP
- How to Drive Rive Character Mood States (idle, happy, wave, loading) from App State