Be the dungeon master. Don’t code every corridor.
Schema. View. Procedure. Trigger. Four atoms from which your world takes shape.
Speak it in plain YAML, and the dungeon wakes—whole, lit from within, and yours to command.
Features · Admin · Get started · Documentation · Examples
Mantle is an embeddable application engine for TypeScript. Define your data, queries, actions, and triggers in a Manifest, then use them through typed APIs, HTTP endpoints, agent tools, and an optional staff console.
Build a publishing site, an internal operations app, or an API for agents. Your application owns its host, storage, and business logic; choose the Mantle modules you need.
- One Manifest, connected interfaces. Schema, View, Procedure, and Trigger describe your data and behavior. The compiled definitions power typed APIs, HTTP routes, MCP tools, and Admin. Manifest features.
- Typed queries and actions. Generate TypeScript bindings for entries, declarative Views, and Procedures. Keep host-only reads private with internal Views. Typed queries.
- Admin that follows your model. Manage live records, publish content, run
reports, and invoke business actions. Configure columns, filters, and actions
with Manifest
uiSchema. Admin customization. - Tools for browser and remote agents. Admin supports WebMCP using the signed-in staff session. Remote MCP clients connect through authenticated endpoints, with authorization checked on each call. MCP and WebMCP.
- Publishing and discovery. Add localized HTML and Markdown, draft/publish
workflows,
llms.txt, sitemaps, and search/social metadata. Publishing example. - Embed in an existing application. Use validation alone, connect Runtime to your storage, or add Web, Admin, and a host adapter. Integration choices.
Give staff a workspace for content, operational records, reports, and actions. In browsers supporting WebMCP, agents can discover and invoke staff tools from Admin, inspect the current page, and navigate alongside the user. Calls use the current staff session and retain server-side authorization and concurrency checks.
Explore your application's Schemas, Views, Procedures, Triggers, and their relationships in the owner-only Developer UI. Its HTTP, MCP, and WebMCP docs show the application's projected routes and tool schemas, with links back to the owning definitions.
Developer UI rendered locally from the intake example. The graph describes compiled declarations; it does not certify runtime or deployment health.
| Interface | Where to explore it | Integration guide |
|---|---|---|
| HTTP | Admin → Developer → API (/admin/dev/docs/api) |
HTTP API |
| Remote MCP | Admin → Developer → MCP (/admin/dev/docs/mcp) |
Endpoints, tools, and authentication |
| Browser WebMCP | Admin → Developer → WebMCP (/admin/dev/docs/webmcp) |
Admin and public-page WebMCP |
An intake application needs request records, a submission action, and a staff inbox. Its staff View can be as small as:
apiVersion: cms.mantle.aotter.net/v1
kind: View
metadata:
name: recent-requests
spec:
title: Recent requests
surface: staff
from: requests
fields: [id, name, email, message, submittedAt]
orderBy:
- { field: submittedAt, direction: desc }
limit: 50Together with the requests Schema, this defines the read used by the staff
report and its MCP tool. A Procedure handles submissions, with Triggers choosing
HTTP and MCP exposure. Read the complete intake example.
For other applications, explore commerce, reservations, and procurement.
Install the Mantle skill to get guided setup for your application and the features you need:
npx skills add aotter/mantleAsk your agent to follow the installed skill and describe what you want to build.
The installer finds the mantle skill by name.
See the agent setup guide for supported
editors, plugins, and project instructions.
Start with the handbook, or follow the runnable minimal Worker. For a staff console, use the local Admin example. The project and CLI guide walks through installation, authoring Manifests, generating typed bindings, and verification.
Using ChatGPT Sites? Follow the Sites integration for content management, sign-in, media, and publishing.
| Start with | Add when you need |
|---|---|
| Spec | Manifest parsing, validation, and introspection in an existing system. |
| Runtime + typed APIs | Queries and actions backed by your storage and handlers. |
| A host adapter | HTTP and other supported transports on your chosen platform. |
| Web | Public HTML, Markdown, localization, and discovery metadata. |
| Admin | A staff API and prebuilt console with Manifest-driven rendering. |
| Auth | Identity, staff roles, and OAuth / MCP authorization. |
Cloudflare is the supported host for the integrated Auth, Admin, and MCP experience. Bun and Vercel adapters are experimental; they support public Views and HTTP Triggers, with authentication and CSRF owned by the host. Compare adapters.
Package reference
| Package | Purpose |
|---|---|
@aotter/mantle |
Core umbrella, CLI, and code generation. |
@aotter/mantle-spec |
Manifest parsing, validation, and introspection. |
@aotter/mantle-runtime |
Runtime execution and storage ports. |
@aotter/mantle-web |
Public rendering and discovery metadata. |
@aotter/mantle-admin |
Admin API and session integration. |
@aotter/mantle-admin-ui |
Prebuilt staff console and Developer UI. |
@aotter/mantle-auth |
Identity, roles, and OAuth authorization. |
@aotter/mantle-indexeddb |
Browser-local storage. |
@aotter/mantle-cloudflare |
Workers, D1, and integrated surfaces. |
@aotter/mantle-bun |
Experimental Bun adapter. |
@aotter/mantle-vercel |
Experimental Vercel adapter. |
- Handbook — concepts, setup, and task guides.
- Manifest feature reference — capabilities and their authoring fields.
- SDK and package API — installation, typed bindings, and optional modules.
- CLI guide — validate, generate, and maintain a project.
- Examples — complete Manifests and runnable hosts.
- Releases — changes and upgrade notes.
See Contributing for development and review, Support for questions and bugs, and Security for private vulnerability reports. Contributors follow the Code of Conduct.
Apache 2.0. See LICENSE.


