@mentra/miniapp). You write a bundle, the user installs it
from the Mentra Miniapp Store, and it runs on their device.
Building a mobile app that connects directly to glasses over Bluetooth? Use the
Bluetooth SDK docs instead.
Looking for the
@mentra/sdk cloud SDK? Apps used to be cloud-hosted
servers built with @mentra/sdk. They’re now built on-device with the Mentra
Miniapp SDK (@mentra/miniapp), which these docs cover. The older cloud SDK
docs live at mentraglass.com/legacy.How a miniapp is built
Every miniapp has two layers:- Background: an always-on JavaScript context (no DOM) that owns all the
glasses logic: subscribing to the microphone, drawing to the display, reacting
to button presses. It holds your
session. - UI: an on-demand WebView (React + your styles) that opens when the user taps your miniapp’s tile, and is torn down when they leave. It has no direct hardware access; it talks to the background layer over a typed message bus.
Hello world
This background entry shows text on the glasses when the user presses a button:src/background/index.ts
new a server or call start(). The host evaluates your background
bundle and hands you a session. Everything you do with the glasses goes through
session.
The toolchain
Three npm packages, but you only ever invoke one of them directly:create-mentra-miniapp writes a package.json that already pins the other two,
so a single bun install brings everything down.
What you could build
- Live captions that show spoken words on the HUD
- Real-time translation for conversations
- Hands-free note-taking triggered by a button or your voice
- Navigation prompts on supported glasses
- Teleprompters, fitness coaches, inspection checklists, and more
Next steps
Quickstart
Scaffold, run, and load a miniapp on your phone in minutes.
Two-layer architecture
How the background and UI layers work and talk to each other.
The session
The object that connects you to the glasses.
Mobile Bluetooth apps
Connecting to glasses directly over BLE instead.

