ScratchJr Desktop MCP Server
You can use this MCP server to drive and inspect a real ScratchJr Desktop app, from discovery and project creation through editing, testing, saving, backup, and screenshots.
Check or establish a local ScratchJr connection, optionally launching the app.
List installed characters, backgrounds, sounds, and available block/argument reference.
List saved projects and read project data, object IDs, revision, and unsaved editor state.
Create complete native projects with up to four pages, backgrounds, characters, text, and block scripts (motion, speech, sounds, loops, events, messages, page transitions).
Batch-edit projects with revision checks: rename, add pages/backgrounds/characters/text, replace characters, set scripts, and remove objects.
Open, save, run green-flag scripts, stop/reset, and trigger character clicks for interactive testing.
Add custom SVG characters/backgrounds and get the md5 asset name for use in projects.
Make database backups, export project JSON/media backups, and take screenshots for visual verification.
Limitations: ScratchJr supports up to four pages and lacks Scratch 3 features like variables, keyboard controls, scores, and arithmetic; exports are not tablet .sjr archives, and there is no arbitrary JavaScript/SQL execution.
Provides tools for creating, editing, running, inspecting, and saving ScratchJr Desktop projects, including pages, characters, backgrounds, text, sounds, SVG assets, block scripts, screenshots, and database backups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ScratchJr Desktop MCP Server create a new project with a cat character and a "hello" speech bubble"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Title: ScratchJr Desktop MCP Server
Description:
Create, edit, run, and inspect real ScratchJr Desktop projects through an MCP client such as Claude, Codex, Cursor, or Google Antigravity. This server controls the installed application through a local Electron connection and saves through ScratchJr's own database interface.
Use natural-language requests to build interactive stories, animations, and simple games with characters, backgrounds, text, sounds, and programming blocks. The server also provides screenshots, custom SVG artwork, and automatic database backups.
Already set up on this PC: Scratch.JR [ AI-Assisted ] v1.0.4 is built and installed, and the server dependencies are in place. The scratchjr entry is registered with Claude Desktop, Claude Code, and Codex, all three pointing at C:\Users\SkieHackerYT\Documents\Gitlab\ScratchJR-MCP\src\server.js. Google Antigravity is registered too, in %USERPROFILE%\.gemini\config\mcp_config.json. Restart Claude, start a new Codex session, and refresh Antigravity's MCP server list to load the tools. Cursor is not installed on this PC; section 5 covers it when it is. The installation steps below are for setting up another PC or reinstalling this project.
Related MCP server: scratch-mcp
Requirements:
Requirement | Details |
Operating system | Windows with PowerShell; this integration was tested on Windows |
ScratchJr | Either the bundled build in |
Node.js and npm | Node.js 22 or newer; tested with Node 24. npm is used to install server dependencies |
AI client | Claude Desktop, Claude Code, Codex, Cursor, or Google Antigravity with local MCP support; run the client on the same Windows PC as ScratchJr |
CLI registration | Install the Claude Code or Codex CLI and make it available on PATH if you want the setup script to register that client automatically. Claude Desktop setup does not require these CLIs |
Project files | This repository, including |
Internet access | Needed to download software, install npm dependencies, and use your AI client |
Local storage | Write access to ScratchJr's Documents folder and this server's |
Disk space for the bundled build | Around 1 GB once built: 0.4 GB of dependencies under |
This integration controls ScratchJr Desktop. The tablet version and Scratch 3 use different integrations.
Bundled desktop app: Scratch.JR [ AI-Assisted ] v1.0.4
desktop/ holds a full copy of the ScratchJr Desktop community port with the MCP bridge built into it. The stock app only exposes the local connection this server needs when the server launches the app itself, so a window that a child already had open could not be driven, and the server had to ask for the app to be closed and reopened. The modified build opens that connection on 127.0.0.1:9223 as it starts, so the server attaches to whichever window is already running.
The build also reports its identity through scratchjr_status, which returns build and buildVersion alongside the ScratchJr data version.
It installs to %LOCALAPPDATA%\ScratchJR-AI-Assisted\app-1.0.4\ScratchJr.exe. Projects still live in Documents\ScratchJR\scratchjr.sqllite, the same file the stock app uses, so existing projects carry over untouched.
See Installation Setup below for how to build and install it. desktop/UPSTREAM.md records the upstream commit this copy came from and every modification made to it, so the changes can be re-applied to a newer upstream release.
Saving and loading projects on the computer
ScratchJr keeps every project inside its own database, so on its own there is no file to copy to a USB stick, hand in to a teacher, or keep as a backup. The File menu adds two entries for that:
Menu entry | Shortcut | What it does |
Save Project to Computer... | Ctrl+S | Saves the project that is open in the editor, then asks where to put it as a |
Load Project from Computer... | Ctrl+O | Asks for a |
A .sjr file is the archive ScratchJr's tablet apps use for sharing. It holds the project and any characters, backgrounds and recorded sounds made for it; built-in characters and backgrounds are left out, because every copy of ScratchJr already has them.
Loading never overwrites anything. A project whose name is already taken is numbered, so loading
Park Friendstwice givesPark Friends 2andPark Friends 3.Loading from inside the editor saves the open project first, then goes to My Projects to show the new one.
Save needs a project open in the editor. The sample projects on the help page cannot be saved this way.
A file that is not a ScratchJr project, or is damaged, is refused with a message, and nothing is added.
Both dialogs start in the folder used last, or in Documents the first time.
Using the stock app instead
The server still works with an unmodified ScratchJr Desktop installation. It looks for the modified build first and falls back to %LOCALAPPDATA%\ScratchJr\app-*\ScratchJr.exe, so nothing needs to be uninstalled. With the stock app, the server must launch ScratchJr itself; if the app is already open, it will ask you to save and close it first.
Renaming the build
Product name, version, installer name, and debug port live in desktop/src/branding.js, and nothing else hardcodes them. Note that MIT's trademark policy, in desktop/TRADEMARKS, expects a build with added features to drop the ScratchJr marks and use its own name; that matters if you publish the installer rather than build it for yourself.
Web version for a classroom network
web_version/ runs the same ScratchJr in the browser, served from one PC to the rest of the room. Students open the server's address, such as http://192.168.9.1, create an account or log in, and see only their own projects. Work saves to the server as they go, and the account button in the corner has Save project to computer, Load project from computer and Log out. Projects are kept per student with Prisma and SQLite.
cd web_version
npm install
npm run setup
npm run build
npm startThe build takes ScratchJr from desktop/src/app, so the two stay the same program. See web_version/README.md for settings, HTTPS (needed for recording sounds and the camera), password resets and backups.
Built-in assistant
The app has its own chat panel beside the editor, so a child can ask for a story without Claude Desktop, Codex or any other editor installed. You supply the model - a hosted one with your own API key, or LM Studio or Ollama running on the same computer; the app supplies the tools.
+---------------------------+---------------+
| Scratch.JR editor | Assistant | <- AI-Assist tab
| | chat | on the edge
+---------------------------+---------------+The panel is a side bar on the right, like the chat panel in a code editor. The AI-Assist tab on the right-hand edge folds it away and brings it back, and the editor takes the whole window whenever it is shut. The border between the two can be dragged to set the width.
Opening the panel widens the window by the panel's width and closing it gives that width back, so the editor is never the one that pays for the chat. ScratchJr's own layout stops working below 766px wide, so the window will not let itself be made small enough to reach that; a maximised window is left where it is. Which side the panel was left on, and how wide, is remembered between runs.
The panel drives the same MCP tools an external editor would. Internally it starts the server in src/server.js as a child process and that server drives the editor back through the debugging port, so one implementation of every tool serves both routes and they cannot drift apart.
Choosing a provider
Open File > Settings. Four providers are offered, all speaking the OpenAI chat completions shape. Two are hosted and need an account; two run on this computer and need neither key nor internet connection:
Provider | Endpoint | Needs | Where to get it |
DeepSeek |
| An API key, paid per message | |
OpenRouter |
| An API key, paid per message | |
LM Studio |
| The app running, with its local server started | |
Ollama |
| The app installed; it serves in the background |
A key, a model and a server address are remembered separately for each provider, so switching between them does not disturb the settings of the one left behind.
The hosted providers
Model is a drop-down of the models worth picking, with the id the provider actually accepts:
Provider | Choice | Model id |
DeepSeek | Flash - fast, everyday chat |
|
DeepSeek | V4 Pro - thinks before answering |
|
OpenRouter | DeepSeek Flash (latest) |
|
OpenRouter | DeepSeek Pro (latest) |
|
OpenRouter | V4.1 Flash / V4 Pro, pinned |
|
The OpenRouter latest slugs follow DeepSeek as new versions land, so they do not need changing here. The last entry in the drop-down, Something else, opens a box for any other id the provider accepts, such as openai/gpt-4o-mini on OpenRouter.
Picking a thinking model turns the thinking on in the request, and the panel shows that thinking in a folded block of its own while it arrives.
LM Studio and Ollama
Nothing leaves the computer and nothing is charged, but the model has to be running first:
LM Studio - open it, go to the Developer tab and start the local server.
Ollama - install it and pull a model, for example
ollama pull qwen3:8b. It then serves in the background.
Model is not a written list here, because it is whatever has been downloaded. Refresh asks the server what it has and fills the drop-down; Test says whether the server is answering at all. If neither reaches it, Server address takes another port, or the address of another machine on the same network.
The assistant builds projects by calling tools, so pick a model that supports tool use - Ollama tags those at ollama.com/search?c=tools. A model that cannot call tools will talk about the story without building it. Smaller models also run out of room in a long conversation sooner; New chat clears it.
A local thinking model, such as one of the qwen3 or r1 family, writes its thinking into the reply between <think> tags rather than sending it separately. The panel pulls that back out and shows it in the same folded block the hosted providers use, so the reply reads the same either way.
Settings are stored in ai-settings.json inside the app's userData folder, which survives updates. API keys are written there in plain text, so treat that file the way you would treat the keys themselves.
Logs
Everything the app does is written to a plain text file: startup, the window, every message sent, every tool call and how long it took, every error, and what was installed. One file per day, in a Logs folder beside the app itself:
%LOCALAPPDATA%\ScratchJR-AI-Assisted\Logs\9-23-2026_Log.txtLines read:
[ 9-23-2026 08:58:24 ] [ INFO ] - Starting the MCP tool server {"node":"node.exe","server":"...\mcp\src\server.js"}
[ 9-23-2026 08:58:28 ] [ INFO ] - Tool call finished {"tool":"scratchjr_status","ms":3225,"isError":false}
[ 9-23-2026 08:59:02 ] [ WARN ] - No usable Node.js found {"needs":22}Status is INFO, WARN or ERROR. The folder sits next to the app rather than inside the versioned folder, so an update does not take the logs with it; if that folder cannot be written - an install somewhere locked down - the app falls back to a Logs folder in its userData directory instead of failing. The API key is never written, in any line, including inside error text. Logs older than 30 days are deleted at startup.
When something is missing
The assistant needs Node.js 22 or newer for its tool server. If there is none, or the one installed is too old, the app asks before doing anything about it:
Something is missing - The assistant needs Node.js to run the ScratchJr tools, and it is not installed on this computer. Install a copy for this app only? [ Install now ] [ Not now ]
Not now installs nothing and says so in the panel; the question comes back next time a message is sent. Install now downloads about 36 MB into the app's own folder, which needs no administrator rights and leaves any other Node.js alone.
If the tool server itself cannot be found, the app says which setting points at it rather than failing halfway through a story.
Cost and the round limit
Every message is a paid request on your own account, and a single story usually costs several requests because the assistant calls tools and reads the results. Tool rounds per message under Advanced caps how many times it may do that before it has to stop and report back. Twelve suits most stories; lower it to spend less, raise it for longer builds.
Node.js installs itself
The assistant runs the tool server with Node 22 or newer. You do not have to install it: the first time you send a message, the app checks for a suitable Node and, finding none, downloads one.
It takes the portable zip rather than the official installer, and unpacks it into the app's own folder under userData. That means no administrator rights, no UAC prompt, no change to the machine's PATH, and no interference with any Node already installed for other work. Uninstalling the app removes it too. The download is about 36 MB and happens once.
A Node that is already installed and new enough is used as it is and never replaced. One that is too old is left alone as well; the app fetches its own copy alongside it.
Advanced > Node.js path shows which Node will be used and offers an Install now button to do the download before you need it. Leave the box blank to keep detecting automatically, or point it at a specific node.exe.
The editor itself works without Node; only the assistant needs it.
What the panel shows
Replies stream in as they are written, so there is something to watch from the first second rather than a blank panel until the whole answer lands. While a message is running, a strip under the heading says what is happening now - waiting for the model, thinking, writing the reply, or which tool is running - with the seconds counted and the round out of the tool budget.
A thinking model's working arrives in a folded Thinking block, which closes itself once the answer starts.
Each tool call appears as a collapsible row with how long it took: click it to see the arguments and the result the model received. Screenshots taken by scratchjr_screenshot are shown inline. A failed call opens itself and is marked in red, so a wrong turn is visible rather than buried.
New chat clears the conversation and starts the model fresh. Stop interrupts a run that is going nowhere; it takes effect after the tool call in flight finishes.
Attaching a document
The paperclip beside the message box takes a .md, .txt or .pdf file, and files can be dropped onto the panel instead. A PDF's text is pulled out on this machine; nothing is uploaded and nothing is sent anywhere until the message it is attached to is sent.
Each attached file shows as a chip with how much text it holds and an x to take it off again. A document longer than 20,000 characters is cut there, and both the panel and the model are told it was cut, so a long plan costs a bounded amount. Attachments go with one message: after that they are part of the conversation and do not need attaching again.
Only those three kinds are accepted. Anything else, including a scanned PDF with no text layer, is refused with a line saying why.
About
File > About lists the credits:
jfo8000 — ported version of ScratchJr
SkieAdminYT — MCP and AI integration
MIT Media Lab — original ScratchJr
Installation Setup:
There are two ways to install. Both finish with the same MCP registration, so the client sections further down apply either way.
Path | What you get | When to use it |
One-click | Builds and installs | The normal choice. The app opens the MCP connection by itself, so nothing has to be closed and reopened |
Manual | Uses a stock ScratchJr Desktop download and sets the server up step by step | You want the unmodified app, or the one-click build failed and you are working through it |
Paths in this document are for this PC, where the project lives at C:\Users\SkieHackerYT\Documents\Gitlab\ScratchJR-MCP. On another machine, replace that folder and the Windows account name throughout.
One-click install
Double-click install.cmd in the project folder, or run:
Set-Location 'C:\Users\SkieHackerYT\Documents\Gitlab\ScratchJR-MCP'
npm.cmd run one-clickIt runs these steps in order and stops at the first failure with a message naming the step:
Installs this server's dependencies.
Installs the desktop app's dependencies in
desktop\— around 900 packages, and the slowest step.Downloads the Electron 1.8.2 runtime. npm 11 defers that package's install script, so it is fetched explicitly.
Builds
desktop\out\make\squirrel.windows\x64\Scratch.JR [ AI-Assisted ]-1.0.4 Setup.exe.Runs that installer, which installs to
%LOCALAPPDATA%\ScratchJR-AI-Assisted\app-1.0.4\and starts the app.Registers the server with Claude Desktop, Claude Code, and Codex.
Expect fifteen to twenty minutes the first time, most of it in steps 2 and 4. Windows SmartScreen may warn about the installer: it is unsigned because it is built on your machine rather than downloaded from a signed release.
Afterwards, restart Claude and start a new Codex session. Cursor and Antigravity still need the manual configuration in sections 5 and 6.
To repeat a single stage instead of the whole run:
npm.cmd run app:install # desktop app dependencies only
npm.cmd run app:make # build the installer only
npm.cmd run app:start # run the app from source without installing it
npm.cmd run setup # client registration only1. Install and initialize ScratchJr Desktop
Skip this if you used the one-click install, which already put an app in place.
Open the ScratchJr Desktop download page and select the Windows installer. This is the community desktop port.
Run the installer, then launch ScratchJr Desktop.
Create a small project, return to the project library to save it, and close ScratchJr.
Confirm the database exists at
C:\Users\SkieHackerYT\Documents\ScratchJR\scratchjr.sqllite. On another PC, replaceSkieHackerYTwith that Windows account's name. The desktop port stores its projects in this Documents folder. See the desktop project's storage documentation.
The server looks for the modified build first, at %LOCALAPPDATA%\ScratchJR-AI-Assisted\app-*\ScratchJr.exe, and falls back to a stock install at %LOCALAPPDATA%\ScratchJr\app-*\ScratchJr.exe. Both can be installed at the same time. For a custom installation or a redirected Documents folder, set SCRATCHJR_EXE or SCRATCHJR_DATABASE as described below.
Both builds read and write the same scratchjr.sqllite. Run only one of them at a time: each holds the database in memory and writes its copy back when it closes, so whichever closes last overwrites the other's work.
2. Prepare the local assets folder
Use this folder to organize custom source artwork:
C:\Users\SkieHackerYT\Documents\ScratchJr\_AssetsCreate it if it does not already exist:
New-Item -ItemType Directory -Path 'C:\Users\SkieHackerYT\Documents\ScratchJr\_Assets' -ForceKeep custom SVG characters and backgrounds here. This is a source-artwork folder: the MCP server does not automatically scan or import its files. To use an SVG, read it using the AI client's file-access tools, or paste its contents into the chat, and ask the assistant to register it with scratchjr_add_svg_asset. That tool accepts SVG markup, a name, a kind (character or background), width, and height. Use static SVG geometry; backgrounds should be 480 by 360 pixels. Use the returned md5 filename when creating a character or choosing a background.
Registered artwork is saved inside ScratchJr's database and can be discovered with scratchjr_list_assets. Simply placing PNG, JPG, audio, or SVG files in _Assets does not make them available to ScratchJr.
3. Install the MCP server dependencies
Install Node.js 22 or newer with npm, then open PowerShell and verify both commands:
node --version
npm.cmd --versionOpen this project's folder and install the locked dependencies:
Set-Location 'C:\Users\SkieHackerYT\Documents\Gitlab\ScratchJR-MCP'
npm.cmd ci4. Register the server with Claude Desktop, Claude Code, and Codex
From the same project folder, run:
npm.cmd run setupSetup writes the scratchjr entry into Claude Desktop's configuration file and registers a user-level server with Claude Code and Codex through their CLIs. Every file it touches is backed up next to the original first. It is safe to run repeatedly: an entry that already points at this folder is left alone.
If a scratchjr entry exists but points somewhere else — most often because the project was moved, leaving the old path holding some other server — setup replaces it and prints the path it replaced. This is worth knowing, because a stale entry shows up as a connection error rather than as a missing server, which is easy to misread as the tools themselves being broken.
Client | Where the entry goes | How to verify |
Claude Desktop |
| Fully quit and reopen Claude Desktop, then look for |
Claude Code | User scope, in |
|
Codex |
|
|
Setup also writes ready-made snippets into config/:
config/claude-desktop.json — the
mcpServersentry, which suits Cursor and Antigravity as well.config/codex.toml — the
[mcp_servers.scratchjr]section, including the timeouts.
If the Codex CLI is not installed, setup cannot reach Codex and says so. Open %USERPROFILE%\.codex\config.toml, replace any existing [mcp_servers.scratchjr] section with the contents of config/codex.toml, and leave every other section as it is:
[mcp_servers.scratchjr]
command = "C:\\Program Files\\nodejs\\node.exe"
args = ["C:\\Users\\SkieHackerYT\\Documents\\Gitlab\\ScratchJR-MCP\\src\\server.js"]
startup_timeout_sec = 30
tool_timeout_sec = 120The timeouts matter. Building a project and taking a screenshot can take longer than Codex's default tool timeout allows.
The same applies to the Claude Code CLI. Without it, Claude Desktop is still configured, and Claude Code can be registered by hand:
claude.cmd mcp add --scope user scratchjr -- 'C:\Program Files\nodejs\node.exe' 'C:\Users\SkieHackerYT\Documents\Gitlab\ScratchJR-MCP\src\server.js'Keep the project folder where it is after registering. Moving it breaks every entry, and setup has to be run again from the new location.
5. Add the server to Cursor
Complete steps 1–3 first. npm.cmd run setup configures Claude and Codex; Cursor and Antigravity require the manual configuration below.
Open your project in Cursor.
Create or open one of these configuration files. Choose the global file to use ScratchJr across all projects, or the project file for this workspace only.
Scope | Configuration file on this PC |
Global |
|
Project |
|
Add the configuration below. If the file already contains servers, merge only the
scratchjrentry into its existingmcpServersobject.
{
"mcpServers": {
"scratchjr": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": [
"C:\\Users\\SkieHackerYT\\Documents\\Gitlab\\ScratchJR-MCP\\src\\server.js"
]
}
}
}Save the file and restart Cursor. Open Customize > MCPs and enable
scratchjrif needed.Start an Agent chat and ask it to call
scratchjr_connect, thenscratchjr_list_projects.
Cursor supports both configuration locations; a project entry takes precedence over a global entry with the same name. See the official Cursor MCP instructions.
The JSON uses this PC's paths. On another machine, adjust the Node executable and the server path. Keep the doubled backslashes required by JSON. You can also copy this entry from config/claude-desktop.json, which setup regenerates with the current path on every run.
6. Add the server to Google Antigravity
Open Antigravity IDE and its Agent side panel.
Click … > MCP Servers > Manage MCP Servers > View raw config.
In the opened
mcp_config.json, merge the samescratchjrconfiguration shown above intomcpServers. Preserve any other server entries.Save the file, then refresh the MCP server list or restart Antigravity. Ensure
scratchjris enabled.Start a new Agent conversation and ask it to call
scratchjr_connect, thenscratchjr_list_projects.
Current Antigravity documentation lists these configuration locations:
Scope | Configuration file on this PC |
Global |
|
Workspace |
|
Prefer the file opened by View raw config for your installed IDE version. Antigravity 2.0 exposes server management under Settings > Customizations > Installed MCP Servers. See the official Antigravity MCP instructions.
Both editors launch src/server.js directly using Node and stdio. No MCP URL or separate npm start terminal is needed. Port 9223 is the app's internal debugging connection, not an HTTP MCP endpoint.
7. Verify the ScratchJr connection
Run the built-in check from the project folder:
npm.cmd run doctorIt reports the executable and database the server chose, along with the projects ScratchJr currently holds. With the modified build this works against a window that is already open. If nothing is running, use npm.cmd run doctor -- --launch to start the app first. With a stock install, save and close any ScratchJr window opened from its ordinary shortcut before using --launch.
A healthy result names the executable and lists your projects:
{
"config": {
"executable": "C:\\Users\\SkieHackerYT\\AppData\\Local\\ScratchJR-AI-Assisted\\app-1.0.4\\ScratchJr.exe",
"database": "C:\\Users\\SkieHackerYT\\Documents\\ScratchJR\\scratchjr.sqllite"
},
"app": { "ready": true, "projects": [ { "ID": 1, "NAME": "Project 1" } ] }
}Then, in any registered client, try:
Use the scratchjr tools to create a dancing dog in a park. Build the project, run it, inspect a screenshot, then stop, reset, and save it.
scratchjr_status reports which build answered, as build and buildVersion. That is the quickest way to tell the modified app from a stock one.
If the tools do not appear:
Check that
scratchjris enabled in the client and that its JSON or TOML is valid.Confirm both absolute paths in the entry exist, especially after moving the project folder. Rerun
npm.cmd run setupto repair them.Confirm
npm.cmd cicompleted in the server folder, then restart the client and start a new Agent chat.In Cursor, connection details are under Output > MCP Logs; in Antigravity, inspect the server entry in Manage MCP Servers.
Follow the client's tool-approval prompts when shown.
Procedure:
Open Claude Desktop, Claude Code, Codex, Cursor, or Antigravity and start a new Agent conversation after registration.
Ask the assistant to call
scratchjr_connectand checkscratchjr_status.Describe the story, animation, or game you want. Include characters, scenes, dialogue, and what should happen when a character is clicked.
Have the assistant inspect available assets and blocks, create the project, run it, and check a screenshot. For custom artwork, register the SVG from
_Assetsbefore using it in the project.Test the project in ScratchJr using the green flag and character clicks.
Ask for any changes, then stop/reset and save the project. It remains available in ScratchJr's project library.
Example request:
Use ScratchJr to create an interactive ocean adventure with three characters and two scenes. Make the characters talk and move when clicked. Build it, run it, check a screenshot, and save it.
Example custom-artwork request, after providing the SVG contents or granting the client access to the file:
Register my star SVG from C:\Users\SkieHackerYT\Documents\ScratchJr_Assets as a character. Create a space scene where clicking the star makes it spin. Test and save it.
On this PC, MCP Demo - Park Friends (Ready) is already in the ScratchJr library. Press the green flag to animate Tic and the dog. Click the dog to visit the stars; click the star to return. To edit it, try:
Open MCP Demo - Park Friends (Ready). Make the dog hop three times when I click it, then switch to the space scene. Test and save the changes.
Connection behavior
The configured MCP client starts src/server.js using MCP's standard stdio transport. No API keys or model subscriptions are embedded in the server; the connected assistant interprets your request and calls the tools.
The first application tool connects to ScratchJr on 127.0.0.1:9223, or automatically launches the installed app with that local debugging port. It does not modify the installed application.
If ScratchJr is already running from its ordinary shortcut without the connection enabled, save your work and close it once. Then ask the assistant to connect again. The server does not force-close an existing editor session. You can normally leave the connected app open while using either client. Avoid simultaneous manual edits while an assistant is changing a project.
With the build in desktop/, that close-and-reopen step is not needed: the app opens the connection itself as it starts, so the server attaches to a window that is already on screen.
A freshly started ScratchJr sits on the splash screen, which waits for a child to press Start and has none of the project code loaded yet. Connecting moves the app to its project library so the first tool call succeeds. If a child is looking at the splash screen when an assistant connects, that is why the screen changes.
Tool reference
Tool | Action |
| Connect, launch, or inspect connection status |
| Discover installed characters, backgrounds, and sounds |
| Read block names, allowed arguments, and units |
| Find projects and inspect their actual data |
| Build a complete project with pages, characters, text, and scripts |
| Batch edits while preserving unrelated objects |
| Open and persist projects |
| Start green-flag scripts, stop, or reset |
| Exercise click interactions |
| Create a custom character or background from static SVG geometry |
| Return an actual editor screenshot to the assistant |
| Back up the database or export project JSON and media |
Also includes the scratchjr://guide resource and create-scratchjr-project prompt.
ScratchJr supports up to four pages, motion, speech, sounds, repeat loops, click/collision events, colored messages, and page transitions. It does not support Scratch 3 features such as variables, keyboard controls, scores, or arithmetic. The assistant should implement your idea using those available blocks and explain any remaining limitations.
Development checks
npm.cmd test # Six automated model/protocol tests; does not launch the app
npm.cmd run doctor # Inspect connection and list projects
npm.cmd run doctor -- --launch
npm.cmd run test:live # Creates a new demo in the real ScratchJr library
npm.cmd run test:extended # Adds a custom star and second page to the latest test demonpm start runs the MCP protocol server and waits for client input; it is not a web page. Clients use the absolute Node executable and server path, so their current directory does not matter.
Optional environment settings
Variable | Default |
| Auto-detected versioned ScratchJr executable |
|
|
|
|
| This server's |
| This server's |
The modified desktop app in desktop/ reads two more, which only affect the app itself:
Variable | Effect |
| Port the app opens for the MCP connection. Set it to |
| Overrides the Documents root the app reads and writes. Useful for trying a build without touching real projects |
| Set to |
If you customize settings, use the same values in every client. In the Cursor and Antigravity JSON, place environment settings in an env object alongside command and args within the scratchjr entry. If Windows Documents is redirected, set SCRATCHJR_DATABASE to the app's actual database path.
Project input
examples/park-friends.json is a complete scratchjr_create_project argument. Character asset and page background values must be exact filenames returned by scratchjr_list_assets.
Coordinates use a 480×360 stage with the origin at the top left. One motion step is 24 pixels. wait: 10 means one second. right and left rotate; forward and back move horizontally. Each script is an array of {op, value?, body?} objects; a repeat block holds its enclosed blocks in body.
To change existing work, call get_project, then edit_project with its revision, page/object IDs, and a batch of operations. set_scripts changes only code. set_character replaces that entire character's configuration. The server rejects a stale revision so two assistants do not silently overwrite one another's changes.
Persistence and recovery
Project writes use the running application's in-memory database, then explicitly flush to disk. Creating, editing, and adding artwork make timestamped full database backups first. Cross-process locking serializes tool operations between Claude and Codex. There is no arbitrary JavaScript or SQL execution tool.
backups/ contains complete .sqllite snapshots. To restore manually, save and close ScratchJr, preserve a copy of the current database, replace Documents\ScratchJR\scratchjr.sqllite with the selected snapshot, and reopen ScratchJr. Restoring a full database restores all projects to that snapshot's state.
artifacts/ contains screenshots, JSON exports, and live-test-result.json. The JSON export includes referenced custom media and is intended for inspection/backup; it is not a tablet-importable .sjr archive; for that, use File > Save Project to Computer in the bundled app. Automated import and recorded-audio creation are not implemented. Existing recorded sounds can be used in scripts.
Tested against ScratchJr Desktop 1.3.2 on Windows, Node 24, MCP SDK 1.30.0, the installed Codex CLI, and Claude Code. Claude Desktop's configuration is installed, but its UI was not used for testing. Cursor and Antigravity instructions follow their official MCP documentation; connections from those editors have not been tested here. Other desktop builds may need an adapter.
Verification completed on this PC: stdio handshake and tool/resource/prompt discovery; native project creation; visible rendering; measured movement after green-flag execution; edits and stale-revision rejection; custom SVG rendering; click-driven navigation between two pages; screenshots; disk persistence; and SQLite integrity. Original Project 1 was compared with the pre-test backup and was unchanged.
Implementation references: ScratchJr Desktop source, MCP TypeScript SDK, and Claude Desktop MCP configuration. Codex and Claude Code registration use their installed CLI commands. This is an independent integration, not an official ScratchJr release.
Created by: Kerneil Rommel S. Gocotano
Available Tools
17 toolsscratchjr_add_svg_assetA
Add a custom character or background using static SVG geometry. Use SVG with a matching viewBox; backgrounds should be 480×360. Returns an md5 asset name usable in projects.
Inputs: svg (required), kind (required), name (required), width (required), +1 more.
scratchjr_backupA
Save current work and make a full timestamped database backup.
Inputs: no named parameters.
scratchjr_block_referenceBRead-only
Get supported blocks, values, units and ScratchJr project-building guidance.
Inputs: no named parameters.
scratchjr_click_characterA
Trigger a character click event to test an interactive project. Character must be on the current page.
Inputs: objectId (required).
scratchjr_connectA
Connect to ScratchJr Desktop or launch it with a localhost-only control port. Does not force-close existing sessions.
Inputs: no named parameters.
scratchjr_create_projectA
Create, persist and open a complete native ScratchJr project with up to four pages. Characters, backgrounds, text and block scripts are built automatically. Returns the new ID and data.
Inputs: project (required).
scratchjr_edit_projectA
Apply a batch of edits to an existing project and reopen it. Supply the revision from get_project. set_character replaces the whole character; use set_scripts to change only code.
Inputs: projectId (required), operations (required), expectedRevision (required).
scratchjr_export_projectARead-only
Export a JSON backup of a project and referenced custom media. This is not the tablet .sjr sharing format.
Inputs: projectId (required).
scratchjr_get_projectARead-only
Read project data, page/object IDs and revision. Includes unsaved editor state when open. Call before editing.
Inputs: projectId (required).
scratchjr_list_assetsARead-only
List real installed character, background and sound assets. Use exact md5 filenames in projects.
Inputs: kind, search.
scratchjr_list_projectsARead-only
List saved ScratchJr projects.
Inputs: no named parameters.
scratchjr_open_projectB
Save the current project and open the requested project in the real editor.
Inputs: projectId (required).
scratchjr_run_projectA
Run green-flag scripts in the current project, optionally opening a specified project.
Inputs: projectId.
scratchjr_save_projectA
Save the open project, regenerate its thumbnail and flush all data to disk.
Inputs: no named parameters.
scratchjr_screenshotARead-only
Capture the real ScratchJr window and return an image for visual verification, plus its saved file path.
Inputs: no named parameters.
scratchjr_statusARead-only
Check the live ScratchJr connection without launching the app.
Inputs: no named parameters.
scratchjr_stop_projectA
Stop scripts; optionally reset characters to their starting positions.
Inputs: reset.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a distinct operation: connection status, launching, asset listing, block documentation, project listing, screenshot, project CRUD, execution control, event triggering, backup, export, and SVG import. There is no overlap between tools; even get_project, open_project, and save_project serve clearly separate read, open, and persist functions.
Most tools follow the verb_noun pattern (list_assets, get_project, create_project, edit_project, run_project, stop_project, click_character, export_project, add_svg_asset). A few deviations exist (status, connect, block_reference, screenshot, backup) that are still intuitive but break the strict convention. Overall the pattern is recognizable and readable.
With 17 tools, the server is slightly above the typical well-scoped range of 3–15, but each tool covers a distinct functional area of the ScratchJr desktop integration. The count feels justified given the breadth of operations (asset management, project lifecycle, execution control, backup/export, custom assets).
The tool surface covers the full project lifecycle: create, read, edit, open, save, run, stop, and backup, plus asset listing and import. Minor gaps include no explicit delete-project operation and no direct asset removal, but these are rarely needed for typical automation and agents can work around them. Overall the surface is comprehensive for the intended use case.
Maintenance
Related MCP Connectors
Let your coding agent read your GameSalad projects, and edit them live in Creator on Pro and Edu.
Create and edit PlayableMaker playable ads from chat and download them as projects.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Create AI images and videos, manage projects and credits, and use workspace campaign context.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to programmatically edit Scratch .sb3 projects and preview changes live in TurboWarp Desktop via MCP tools and a live-reload bridge.3Mozilla Public 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to create, compile, and run Scratch projects by editing plain text and using a live editor loop.1-
- AlicenseAqualityDmaintenanceConnects AI assistants to live Purl Studio projects, enabling reading objects, modifying scripts, and setting properties.26MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly manage Roblox Studio projects by creating, reading, updating, and deleting scripts, listing instances, executing Luau code, and inspecting properties. It works through natural language, making Studio operations accessible to AI.-