Skip to main content
Glama

scratch4js

A pnpm monorepo for working with Scratch .sb3 projects from JavaScript — edit them programmatically, drive them from an AI agent, and preview the results live in TurboWarp Desktop.

Packages

Path

Package

What it is

packages/scratch4js

scratch4js

The core library: read/edit .sb3 files with a small, declarative API.

packages/scratch-mcp

scratch-mcp

An MCP server exposing the library's editing surface as tools, plus a TurboWarp live-reload bridge.

userscript

Prebuilt TurboWarp Desktop userscript + userstyle that live-reload the project the MCP server edits.

Related MCP server: tanstack-start-devtools

How they fit together

  AI agent / MCP client
          │  (MCP tools over stdio)
          ▼
   ┌──────────────┐   edits in memory   ┌────────────┐
   │  scratch-mcp │ ──────────────────► │ scratch4js │
   └──────┬───────┘   save → .sb3 file  └────────────┘
          │ socket.io bridge (localhost:9060)
          ▼  "loadSB3" → fetch /get.sb3
   TurboWarp Desktop + userscript  ──►  live preview

An agent edits a project through scratch-mcp; on save the server writes the .sb3 and signals the userscript, which reloads it into TurboWarp Desktop instantly.

Getting started

pnpm install
pnpm build          # build every package (scratch4js → dist/)
pnpm lint
pnpm format

Then:

  1. Install the userscript into TurboWarp Desktop (per-OS paths in its README).

  2. Run the MCP server and point your MCP client at it.

  3. Open .sb3 files, edit, and save_project to see changes live.

Workspace layout

.
├── packages/
│   ├── scratch4js/     # the library (+ example_project fixture)
│   └── scratch-mcp/    # the MCP server + live-reload bridge
├── userscript/         # prebuilt TurboWarp Desktop userscript + userstyle
├── pnpm-workspace.yaml
└── package.json        # workspace root (build/lint/format delegate to -r)
A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
7Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/playforge-coding/scratch4js'

If you have feedback or need assistance with the MCP directory API, please join our Discord server