Skip to content
Limited timeStarter is now $9 a month instead of $20.See plans
charmotion

How to Generate Rive Animations in VS Code Copilot Agent Mode Using MCP

By the Charmotion team · Updated · How we write guides

Cover illustration for the guide: How to Generate Rive Animations in VS Code Copilot Agent Mode Using MCP, with Charmotion demo characters

To use a remote animation MCP server in VS Code GitHub Copilot Agent Mode, add the server's URL under the servers key in .vscode/mcp.json, turn on Agent mode in Copilot Chat, and ask the agent for a character. The result is one .riv file with state machines that an app can play.

Key takeaways

  • Add the server under the servers key in .vscode/mcp.json, then accept the trust prompt and finish any sign-in it asks for.
  • Turn on Agent mode in Copilot Chat before you prompt, because the server's tools are used through that mode.
  • Each prompt in agent mode consumes GitHub AI Credits, so count your prompts while you test.
  • The mood number input drives the states, for example happy is 1, thinking is 3 and sad is 4.

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 a remote animation MCP server do in VS Code?

This guide explains how to use a remote animation MCP server in VS Code GitHub Copilot Agent Mode, from the config file to a checked .riv animation. The short version is in the answer above; the sections below cover each step and the mistakes that cost people the most time.

MCP, the Model Context Protocol, lets an AI client call tools that run somewhere else. VS Code's MCP reference says MCP servers let GitHub Copilot call external tools and data sources from chat, and that the tools are used through Copilot Chat's Agent mode. VS Code also asks you to trust a server before it starts, so that prompt is the moment to check what the server does.

A remote server runs on the provider's side. You connect with a URL. If the server uses OAuth, you sign in through a browser window rather than pasting an API key into a file. A local server works differently: it is a program you start on your own machine, and it needs installing and updating. For character and logo animation, a remote server means nothing to install beyond the VS Code config.

The example in this guide is a server that designs and animates characters and logos. Its tools create a character, build a set of animations you choose, and return the files. For the difference between local and remote transports, read Streamable HTTP OAuth vs local stdio MCP. For a comparison of two Rive-specific setups, read Rive's desktop MCP vs a hosted remote MCP.

How do you add a remote server to .vscode/mcp.json?

VS Code keeps MCP servers in two places. The workspace file .vscode/mcp.json lives in your project, so a team can share it through the repository. The user profile file is personal and applies to every project. In the Command Palette, run MCP: Open Workspace Folder MCP Configuration for the first, or MCP: Open User Configuration for the second.

Add a servers entry with a name that is unique in that file, a transport type and the URL. For the Charmotion server at https://charmotion.app/mcp, the file reads:

{
  "servers": {
    "charmotion": {
      "type": "http",
      "url": "https://charmotion.app/mcp"
    }
  }
}

Three details matter here. The top-level key is servers, which is what VS Code reads from .vscode/mcp.json. The URL must be exact, including https. And this server uses OAuth sign-in, so there is no API key field to fill.

If you prefer the terminal, the code --add-mcp command takes one JSON object with a unique name and the server configuration, and adds the server to your user profile:

code --add-mcp '{"name":"charmotion","type":"http","url":"https://charmotion.app/mcp"}'

Use a current stable VS Code release, because remote MCP and OAuth support depend on it. The VS Code MCP configuration reference is the page to check for the version it expects. Setup notes for other clients are on the MCP server page.

How do you turn on Agent mode and start the server?

Adding a server is not enough on its own. The tools reach Copilot Chat once you are in Agent mode, so open the chat and switch modes:

  1. Click the chat icon in the VS Code title bar to open Copilot Chat.
  2. Open the agent dropdown and select Agent.
  3. Toggle agent mode beside the Copilot Chat input. GitHub's MCP server README describes this as the final step of its install flow, and the server starts once agent mode is on.

When VS Code asks whether to trust the server, read its name and URL and accept only if the server is yours. Then finish any sign-in the server asks for. The server in this example signs in with OAuth, so no key goes into the file.

Agent mode is part of GitHub Copilot's plans. GitHub's plans page lists agent mode in VS Code as included in the Free, Pro and Pro+ plans. Each prompt entered in agent mode consumes GitHub AI Credits, so count your prompts while you test. GitHub's agent mode documentation covers how credits work, and the plans page is the place to check current allowances, because they change over time.

What should you ask the agent to generate?

Ask for the result by name. A prompt that describes the character, the style and the animations you need gives the agent what it needs to call the right tools in one pass. Here is an example prompt:

Using the animation server, design a round blue fox mascot for a budgeting app in a clean flat style. Then create a character set with happy, wave, thinking, sad and loading, and return the download links.

If you already have the art, give the agent the image instead of asking for a design. The server checks the image first. It needs one finished, coloured character that faces the viewer with visible eyes and mouth. Sketches, photos, groups and busy scenes are refused, and a refused image is not charged.

Credits follow a simple rule. A character design costs 1 credit. Each animation costs 1 credit, except idle, which is always included for free. The site preselects launch, happy, wave and loading, so name any others you want. The launch animation lasts 2.6 seconds, plays once and ends on idle. To add animations later, ask for them by name, and only the new ones use credits.

Plan the states your app needs before you prompt. Characters have no one-shot triggers, so there is no success or error animation of their own. Show a success with happy and an error with sad, and let your app switch between them through the mood number described in the next section.

How do you check the .riv file the agent returns?

The agent calls get_character_set to return download links and an AI_README with integration notes for coding assistants. The main file is one Rive (.riv) file with three parts:

  • CharacterViewModelMachine, with a Data Binding number property named mood.
  • CharacterStateMachine, with a number input named mood.
  • LaunchStateMachine, present only when launch was chosen. It plays launch once, then idle.

The mood numbers are fixed, so your code can set them without guessing:

AnimationMood numberLength
idle (always included)04.0 s loop
happy11.6 s
wave23.0 s
thinking32.4 s
sad43.0 s
loading51.2 s
listening63.0 s
talking71.6 s
sleeping84.0 s
attention91.4 s

Moods blend into each other, so a change from happy to thinking does not cut hard. Small accents such as sparkles, thinking dots and the exclamation mark for attention are on by default. A boolean named accents hides them when you want a plain character.

To inspect the file, open it in the Rive editor, where the state machines and data binding are visible. You do not need the editor to ship the file, because apps load a .riv through a Rive runtime. For integration steps, read how to use Rive in React and Next.js or how to use Rive in SwiftUI.

For video, ask for export_videos. It produces MP4 at 1080 by 1080 and 60 fps, GIF, transparent WebM, transparent MOV and a 9:16 launch MP4, usually within about a minute. Exports do not use credits. If you need to export a Rive file yourself, the steps are in how to export a Rive animation to MP4 or GIF.

Keep the plan question separate from the file question. Rive's free plan exports play a Rive splash screen and paid plans export without it, so read is Rive free and the Rive pricing page before you ship a file exported from the editor.

Why is Agent mode or the server missing in VS Code?

  • No Agent option. GitHub's agent mode documentation says an enterprise or organization administrator may have disabled agent mode for the IDE. Ask whoever manages your Copilot seats.
  • The server does not start. Check that you accepted the trust prompt and that agent mode is toggled on beside the chat input.
  • No tools appear. Confirm the entry sits under the servers key in .vscode/mcp.json and that its name is unique. Then complete the sign-in the server asks for.
  • Old VS Code. Update to the current stable release, then reopen the window.
  • Credits run out. Each prompt in agent mode uses GitHub AI Credits, and each animation uses server credits. Check your balance on the pricing page before a large batch.

The Charmotion server is documented on the MCP server page, which lists its tools and sign-in steps.

Disclosure: Charmotion is our product.

How to use a remote animation MCP server in VS Code GitHub Copilot Agent Mode

  1. Add the server to mcp.json. Run MCP: Open Workspace Folder MCP Configuration and add a servers entry with a unique name, the type http and the server URL. Use a current stable VS Code release.
  2. Accept the trust prompt. When VS Code asks you to trust the server, accept it only if the server is yours, then finish any sign-in the server requests.
  3. Turn on Agent mode. Click the chat icon in the title bar, select Agent from the agent dropdown, and toggle agent mode beside the Copilot Chat input so the server starts.
  4. Ask for the character and animations. Describe the character and name the animations you need, such as happy, wave, thinking and sad. Idle is included for free.
  5. Download and check the .riv file. Ask for get_character_set to get the download links, then open the .riv in the Rive editor and check the mood number input in CharacterStateMachine.
  6. Export videos if you need them. Ask for export_videos to get MP4, GIF, transparent WebM and transparent MOV copies. Exports do not use credits.

Frequently asked questions

Can I use the same server in Cursor or Claude Code?

Yes, if the client supports remote MCP servers. Cursor adds remote servers through an HTTP or SSE endpoint URL, and Claude Code declares servers in a JSON file. Each client has its own menus and file locations, so follow that client's documentation for the exact steps.

Which VS Code version does a remote MCP server need?

GitHub's MCP server README asks for VS Code 1.101 or later for remote MCP and OAuth support. Install the current stable release, and check VS Code's MCP configuration reference for the minimum version it documents.

Do I need a Rive account to play the file in an app?

No. Rive's runtimes are open source and play any .riv file, so an app needs only the runtime for its platform. A Rive account or plan matters when you open or edit the file in the Rive editor, and the free plan's exports show a splash screen. Current plan details are on rive.app/pricing.

Sources

Related guides