top of page

Scripting Set-Up

Last Updated 9/23/25

The Script API (previously known as the GameTest Framework) opens up a whole new world of possibilities for creators. It lets you bring your ideas to life using JavaScript right inside the behaviour pack folder—no hacks, just pure scripting magic.

Most of it isn’t even experimental anymore, which means it’s stable and ready to use.

This section will walk you through the core 80% of Minecraft’s Creator API—the stuff you’ll actually use day-to-day to build cool, interactive experiences in your world.

The Manifest

At the moment, scripts can only be run from behaviour packs.

To get started, you'll need to add a script module to your manifest.json and define an entry point, this tells Minecraft where your script begins.

To use any type of scripting, you'll need to declare them as dependencies in your manifest.json. You must specify by using the module_name and version.

This example shows the @minecraft/server being used.

If you need to use other module to run the code, add the other dependencies following the format above.

There are two types of API modulesStable and Beta. Below will show you the list of the available versions, including the latest stable and latest beta. 

Stable API modules: these do not require the Beta APIs Experiment to be turned on. Most features are included in stable APIs and will not break or be changed when Minecraft is updated.

*Please note that the Server Script updated to 2.0.0, which made major changes. It isn't required to update it from 1.19.0 to have it work but will need to be updated to use any of the new features.*

  • @minecraft/server-ui:

Beta API modules: Requires the Beta APIs Experiment to be turned on in the world's settings and adds many of experimental features in the API. These APIs can be changed, removed, or added to with very little warning, and are prone to breaking. Be warned!

  • @minecraft/server-net:

    • 1.0.0-beta(Bedrock Dedicated Server module only, must be enable in permission.json as it is not enabled by default)

  • @minecraft/server-admin:

    • 1.0.0-beta (Bedrock Dedicated Server module only)

In order to use the eval() function or Function() constructors within your code, you can add the following in the manifest capabilities:

The entry point file can contain scripts and/or imports to other script files. Only one entry file can be specified.

Writing Scripts with JS

Minecraft's scripting engine only runs JavaScript. Check out Scripting with TypeScript for compiling TS directly to JavaScript.

Reference Documentation

Official documentation are hosted on Minecraft Learn and can be found here:

Official typescript declarations for the latest Beta API modules in Minecraft Preview can be found here:

These allow for enhanced auto-completions and validation when used inside of your editor

  • bridge. v2: Ships with GameTest support built-in

  • Visual Studio Code: Install Node.js and npm, then run the following in command line:

Latest stable API modules

bottom of page