Build with your coding agent
Appbricx is the backend, runtime and hosting your coding agent builds on. Your agent writes the app's contract. Appbricx turns it into a real Postgres database with row-level security, sign-in, workflows, a UI and a preview URL, checks it, and deploys it.
How it works
The contract is one JSON document. It describes tables, roles (personas), who may read and write which rows, before-write rules, workflows, seed data, pages, custom React components, a brand colour and an optional custom sign-in screen. Your agent sends it to Appbricx through one of three doors. All three call the same code and return the same answers.
| Door | Address | Use it for |
|---|---|---|
| Remote MCP server | https://appbricx.com/api/mcp | Claude Code, Cursor, any MCP client |
| Developer CLI | appbricx (run from the repo for now) | Terminals, scripts, CI, agents with a shell |
| Developer HTTP API | https://appbricx.com/api/dev/v1 | Anything that can send HTTP |
The loop
- Write the contract. Start from
get_contract(null for a new project). Readget_guideonce first. - Check.
check_contractnormalizes it and reportserrors(must be empty),fixesandwarnings. No side effects. - Apply.
apply_contractbuilds the dev environment: database created or evolved additively (rows kept), pages compiled, workflows armed. The reply lists a demo sign-in for every role. - Verify.
verifyruns three stages: static (contract, reachability, type check), data (demo sign-ins, a role × table permission matrix with rolled-back writes, signed-out access, workflows armed) and browser (a walk through the pages signed in as each role). Every failing check has evidence and a fix. - Screenshot.
screenshotopens the dev preview in a real browser, signed in as a role or as a guest, and returns the PNG plus page errors, horizontal overflow and the visible text. Your agent looks at its own UI. - Fix. Change the contract (or send small
patch_contractops), apply, verify again until the status ispass. - Deploy.
deployruns verify first and refuses on red.
5-minute quickstart
1. Create an access token
In the web app open Workspace settings → Coding agents. Create a token (it starts with apx_pat_). It is shown once, so copy it now. The default scopes are read and apply; add deploy if the agent should publish. The same screen shows ready-to-paste config for Claude Code and Cursor. See Access tokens.
export APPBRICX_TOKEN=apx_pat_...
export APPBRICX_API=https://appbricx.com/api2a. Connect Claude Code (plugin)
The plugin adds the MCP server and an appbricx skill that teaches Claude the loop and includes a worked example contract. Inside Claude Code:
/plugin marketplace add Naveenbhargav-m/appbricx
/plugin install appbricx@appbricxAPPBRICX_API, APPBRICX_TOKEN and the optional APPBRICX_PROJECT from your environment. If APPBRICX_API is not set it falls back to http://localhost:4000 (a local install). Export APPBRICX_API=https://appbricx.com/api before you start claude.2b. Connect Claude Code (without the plugin)
claude mcp add --transport http appbricx https://appbricx.com/api/mcp \
--header "Authorization: Bearer apx_pat_..."Add ?project=<project-id> to the URL to pin one project. You get the tools but not the skill.
2c. Connect Cursor
Put this in .cursor/mcp.json (it matches integrations/cursor/mcp.json in the repo) and set the three environment variables before starting Cursor:
{
"mcpServers": {
"appbricx": {
"url": "${env:APPBRICX_API}/mcp?project=${env:APPBRICX_PROJECT}",
"headers": { "Authorization": "Bearer ${env:APPBRICX_TOKEN}" }
}
}
}APPBRICX_PROJECT may be empty; the agent then picks or creates a project itself.
3. Give your agent a first prompt
Use appbricx. Create a project called "Field Desk": dispatchers create
and assign jobs at customer sites; technicians see and update only the
jobs assigned to them. Notify the technician when a job is assigned.
Seed two technicians, two sites and a couple of jobs. Check, apply,
screenshot every screen as each role, and verify until it passes.
Don't deploy yet.4. What you get back
- A project in your workspace with a dev environment: Postgres with row-level security per role, sign-in, armed workflows and compiled pages.
- A preview at
https://usercontent.appbricx.com/preview/<project-id>/. - Demo sign-ins for every role, listed in the apply reply.
- A verify report, stage by stage. Ask your agent to paste it.
- The contract stays in the project. A later session (or the built-in builder) reads it with
get_contractand continues.
Who does what
| Your agent | Appbricx |
|---|---|
| Writes and edits the contract | Normalizes it and reports errors, fixes and warnings |
| Decides tables, roles and who may access which rows | Creates the Postgres schema and row-level security policies, evolves the schema additively |
| Writes before-write rules and workflows | Runs rules in a sandbox before every write; arms workflows |
| Writes pages and custom React components | Type-checks, compiles and server-renders components; compiles pages; hosts the preview |
| Reads screenshots and the verify report, then fixes | Takes the screenshots, runs verify (static, data, browser) |
| Asks to deploy | Runs verify again and publishes only on green |
Your agent never writes SQL, auth, RLS policies or webhook plumbing.
A measured example
On production, a Claude Code session with the Appbricx skill and MCP tools took a live dating app and added a custom sign-in screen, an exact brand colour, a server-side "women message first" rule and a Sign out button. It took 12 min 27 s and cost $2.98 in model usage. It took 18 screenshots along the way, fixed what it saw (a font fallback, a stray strip under the tab bar), and verify passed.
Cost
Your agent's model usage is billed by your model provider (for example Anthropic for Claude Code), not by Appbricx. Your Appbricx plan covers the runtime and hosting: the databases, builds, verify runs, previews and deployments.
Next
- MCP server reference — every tool and its scope
- App contract — the JSON your agent writes
- Custom components & branding
- Before-write rules
- Developer CLI and Developer HTTP API
- Access tokens