Skip to Content
DocumentationDevelopersHeadless · Momen BaaS

Headless · Momen BaaS

In Headless mode, you build the frontend outside the Momen editor—in your own codebase (React, Next.js, Vue, mobile, etc.) or with AI tools like Cursor, Claude Code, and Codex.

Momen provides a managed, Postgres-native backend; AI tools can also connect via the official Plugin or MCP to work on data models, Actionflows, and frontend integration. Everything you configure in the editor is exposed through standard GraphQL APIs.


What the Backend Provides

Every module below is configured visually in the Momen editor and served by the same backend — and automatically exposed as a GraphQL API. There are no separate services to provision or stitch together.

ModuleWhat it providesGraphQL access
DatabasePostgreSQL tables with relations, constraints, indexes, and computed fields, designed visuallyQueries, Mutations, and [table]_aggregate
ActionflowsServer-side business logic — synchronous and asynchronous — with branching, loops, and transactionsSync fz_invoke_action_flow; async task + result Subscription
AI AgentsNative LLM agents with RAG (knowledge bases), tool use, and structured / streaming output, running inside your data contextConversation mutations + streaming Subscription
Third-Party APIs (TPA)Import OpenAPI specs and call external services through the backend as an authenticated relayCallable through GraphQL after import
PaymentsBuilt-in Stripe and Airwallex integration for one-time and subscription paymentsPayment mutations
Accounts & AuthBuilt-in user system with sign-up / login and multiple login methodsJWT session token in the request header
PermissionsRow Level Security (RLS) and role-based access control (RBAC) at the database layerEnforced automatically on every operation
File & Asset StorageBinary and image upload with CDN deliveryPresigned upload URL + file ID stored on your table
Real-timeLive updates as data changesGraphQL Subscriptions over WebSocket

Why Momen as a Backend

Momen is a Postgres-native Backend-as-a-Service (BaaS) — a real managed backend configured visually, not a database widget. These strengths hold whether you build the full app in Momen or use it headless.

PillarWhat you get
Native PostgreSQLA real relational database — indexed queries, real joins, foreign keys, and constraints. Not a JSON-blob / NoSQL abstraction, so your data stays correct.
ACID transactionsComplex logic rolls back cleanly on failure. Actionflows are transactional — essential for payments, fintech, and B2B.
Visual server-side logicActionflows implement business rules (sync and async) without code and without Edge cold-starts. Logic stays visible and traceable, not a black box.
Auto-generated GraphQL APIEvery project becomes a typed API. Fetch exactly what each client needs; self-documenting via introspection.
Single-request cascading loadNested relations resolve server-side, so related tables load in one request instead of N round-trips.
Native AI agentsAI lives inside your data context with RAG, tool use, and structured output — not an external model glued to a separate database.
Database-layer securityRLS and RBAC at the database layer for real multi-tenant isolation, plus SSO and enterprise compliance options.
No lock-inExport your frontend, access data directly, and rely on standard PostgreSQL.
Fully managedAuto-indexing and infrastructure best practices are handled for you — no servers to provision or operate.
Predictable pricingResource-based and forecastable, not opaque per-request billing.

Because the backend is decoupled from Momen’s own frontend, Headless lets you:

  • Keep any frontend — React, mobile, or the output of AI coding tools like Cursor, Claude Code, and Codex.
  • Adopt the backend only — get real auth, data, and logic without learning the full editor.
  • Solve the “stuck at backend” moment — AI can build the UI, but you still need a backend that survives production.

GraphQL API & Credentials

Your external frontend talks to Momen through unified GraphQL endpoints. Replace {projectExId} with your project ID.

HTTP endpoint (Queries and Mutations):

https://villa.momen.app/zero/{projectExId}/api/graphql-v2

WebSocket endpoint (Subscriptions):

wss://villa.momen.app/zero/{projectExId}/api/graphql-subscription

Open Connect Backend in the Momen editor top navigation to copy your endpoints and a high-privilege Admin Token. The modal includes a built-in GraphiQL panel to write and test queries against your live schema.

⚠️

The Admin Token has the highest privileges. Use it only for local development or trusted server environments (e.g. Node.js backends). Never expose or hardcode it in client-side code reachable by end users.

For the full reference, see the Momen Runtime API Reference.


Developing with AI Coding Tools

We provide Plugin, MCP, and Skill to help AI coding tools connect to and develop your Momen backend.

For: Cursor 2.5+, Claude Code, Codex

Capability: MCP + momen-platform Skill + Hook

Setup: Momen no-code Plugin

  • Claude Code (terminal)

    claude plugin marketplace add momen-tech-org/momen-nocode-plugin claude plugin install momen-nocode@momen

    Or inside Claude Code

    /plugin marketplace add momen-tech-org/momen-nocode-plugin /plugin install momen-nocode@momen /reload-plugins
  • Codex

    codex plugin marketplace add momen-tech-org/momen-nocode-plugin codex plugin add momen-nocode@momen codex plugin list | grep momen
  • Cursor

    • Team / org: admin adds the Git repo as a team marketplace; members install momen-nocode

    • Local / development

      ln -s "$PWD/plugin" ~/.cursor/plugins/local/momen-nocode

Requires Node.js 18+. Authenticate with npx -y momen-mcp@latest login

Path B — MCP

For: MCP-compatible tools such as Windsurf, Cline, Claude Desktop, Qoder, and Trae

Capability: Connect to your project — read schema, Actionflows, data bindings, and runtime logs

Setup: Add to your tool’s MCP config:

{ "mcpServers": { "momen": { "command": "npx", "args": ["-y", "momen-mcp@latest", "mcp"] } } }

Requires Node.js 18+. Authenticate with npx -y momen-mcp@latest login

Path C — Skill

For: Any AI coding tool; can be combined with MCP

Capability: GraphQL integration patterns — no project connection; supply endpoints, Admin Token, and schema yourself

Setup:

Please carefully read and install the development skill from the following repository: https://github.com/momen-tech-org/momen-baas-skill
npx skills add https://github.com/momen-tech-org/momen-baas-skill -g
💡

After manual backend changes in the editor, click Sync changes and ask your AI to re-read the schema.


Not Headless?

If you want to build both UI and backend inside Momen — drag-and-drop components, data binding, Mirror preview — that is platform-native development, not Headless. See the Editor Overview and the Hello World tutorial to get started.

Last updated on