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.
An entire JSON API. One file.
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)
}
Install
One command. Any platform.
$ brew install jlkdevelop/tap/mx
$ go install github.com/jlkdevelop/mxscript@latest
After installing, run mx --version to confirm. Full docs at github.com/jlkdevelop/mxscript.
What's in the box
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.
Available everywhere
Pick the channel that fits your workflow.
Homebrew tap
brew install jlkdevelop/tap/mx — auto-bumped on every release.
→VS Code Marketplace
Syntax highlighting, snippets, and language server. Search 'MX Script' in extensions.
→GitHub Action
uses: jlkdevelop/setup-mx@v1 — drops the mx CLI onto Linux/macOS/Windows runners.
→Vercel
mx build --vercel emits a ready-to-deploy Go project. First-class Vercel support.
→About
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).
Meta moment
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 →