NEW Run MX Script in your browser — no install, no signup. Open playground →

Open source · MIT licensed

Modern scripting
for the web.

MX Script is a tiny, opinionated language for building web apps and APIs. One file. Zero boilerplate. Batteries included — HTTP, JSON, JWT, sessions, SQL, AI tool calling.

No install required for the playground · Live at try.mxscript.com

server { port: 8080 }

let users = [
  { id: 1, name: "Ada Lovelace" },
  { id: 2, name: "Alan Turing"  }
]

get /users/:id {
  let id = num(request.params.id)
  let user = find(users, fn(u) { return u.id == id })
  if (user == null) {
    return status(404, { error: "not found" })
  }
  return json(user)
}

One command. Any platform.

Homebrew $ brew install jlkdevelop/tap/mx
or any platform with Go
Go $ go install github.com/jlkdevelop/mxscript@latest

After installing, run mx --version to confirm. Full docs at github.com/jlkdevelop/mxscript.

HTTP routes

First-class GET / POST / PUT / DELETE / PATCH with path params, query, headers, and JSON body.

Middleware

Compose request pipelines with the use keyword. Auth, logging, CORS — write it once, reuse everywhere.

Sessions + JWT

Signed cookies, JWT (HS256), HMAC, and SHA-256 built in. No npm install dance.

AI built in

ai.complete and ai.embed work out of the box with any OpenAI-compatible endpoint.

File I/O

read_file, write_file, list_files. Static asset serving via the static directive.

Zero deps

One binary. No node_modules. No package.json. No build step. Run a .mx file and ship.

Pick the channel that fits your workflow.

Why MX Script exists.

Most modern web work pays a tax: before you write the thing you actually wanted to build, you assemble a runtime, a framework, a router, a build tool, a deploy story, and twenty config files. The simple case — 'I want a JSON endpoint that does one useful thing' — gets buried under setup.

MX Script collapses that. The language is the framework. Routes, middleware, sessions, JSON, JWT, SQL, and AI tool calling are first-class. There's no npm install, no package.json, no node_modules. One file. mx run app.mx. You're shipping.

It's MIT-licensed, built in the open, and intentionally small — under 134 builtins covering the 80% case for HTTP services. The interpreter is a single Go binary; the language is jlkdevelop/mxscript; this site is itself written in MX Script (view source).

This site is built in MX Script.

Every page, every route, every byte of HTML you're reading was generated by an .mx file. The site grows in parallel with the language — every missing capability becomes the next feature.

Read the source →