The Moose Runtime is the execution engine for your MooseStack application. It connects your code to your infrastructure by:
This integrated approach provides the best experience for most applications. However, if you only need schema management for ClickHouse (the olap feature), you can use Moose as a library without the full runtime server.
Moose runs in two ways: moose dev and moose prod.
Automatically starts/stops Docker containers for ClickHouse, Redpanda, Temporal, and Redis when you start/stop the local development server.
You bring your own infrastructure. Moose Runtime won't start databases for you in production. It expects services to be running and connects via environment variables.
Includes a file watcher that instantly hot-reloads migrations to your local infrastructure when you save your code changes.
Migrations run once at startup using a `plan` file, rather than watching for code changes.
Includes a Model Context Protocol server so AI assistants can query your data and logs.
Learn moreThe Model Context Protocol server is disabled in production (remote MCP server coming soon).
Even if you are not using the Moose Runtime in production, it is a useful tool for quickly prototyping OLAP models locally. You do not need to have a production environment set up to use the local development server.
The core of the Moose Runtime is the infrastructure map. This is a representation of your infrastructure as it exists in your code. The runtime uses this map to determine exactly what needs to be provisioned, migrated, or destroyed to make your live infrastructure match your code.
Moose Runtime looks at your Root Entrypoint (index.ts for TypeScript or main.py for Python) to figure out what resources to include in the infrastructure map. For MooseStack to manage a resource (like a Table, Stream, or API), it must be declared in or reachable from your root file.
This "strict declaration" rule ensures that your running infrastructure always matches the active code path of your application, preventing "zombie" tables or endpoints from lingering in your environment.
moose.config.toml and feature flags.