Appbricx
Docs
FeaturesPricingStart free

Get started

OverviewWhat Appbricx isQuickstart with a coding agentQuickstart with the builderCore concepts

Guides

Data and tablesAccess and rolesBusiness rulesSign-inCustom screensRealtime and topicsWorkflows, schedules and webhooksServer functionsAI in your appPaymentsFilesMessagesIntegrationsVerifyPublishing, domains and rollbackOperating your appExport and self-hostSelf-host install

Tutorials

Build a booking app with Claude CodeMulti-user todo listClient portalSlack on new sign-upTemplates

Reference

Reference homeFrontend SDKHTTP APIMCP toolsCLIIntegrations catalogContract formatAI key resolutionRun Appbricx locally

Connect any MCP client

MCP (Model Context Protocol) is the standard way coding agents call outside tools. Point your agent at the Appbricx MCP server and it can create projects, build and test your app as each of your users, look at the screens, read data and logs, deploy, and then operate the running app (SQL, rows, schema, snapshots, rollbacks, workflow runs, logs and secrets), all from the chat you already work in.

When you would use it

  • You work in Claude Code, Cursor or another MCP client and want the agent to build on Appbricx directly. The coding agents quickstart has copy-paste setup.
  • You want the agent to stay focused on one app: pin a project (below) and the agent sees that project's real table, workflow and role names.

The MCP tools do exactly what the developer HTTP API and the CLI do, so you get the same answers whichever way you connect. The server speaks Streamable HTTP.

Endpoint

https://appbricx.com/api/mcp

Sign in with the browser (default)

Add the URL to your client with no token. The first time it connects, it opens a browser window: sign in to Appbricx, check the permissions and the workspace, and click Authorize. The client keeps its tokens and refreshes them by itself.

# Claude Code
claude mcp add --transport http appbricx https://appbricx.com/api/mcp
# then run /mcp, pick appbricx, choose Authenticate

# Cursor: .cursor/mcp.json
{ "mcpServers": { "appbricx": { "url": "https://appbricx.com/api/mcp" } } }

See and revoke authorized clients in Workspace settings, Coding agents. Revoking one stops it on its next request.

How a client discovers sign-in

This follows the MCP authorization spec (OAuth 2.1), so any compliant client works without Appbricx-specific setup:

  1. A request without a token gets 401 with WWW-Authenticate: Bearer resource_metadata="https://appbricx.com/.well-known/oauth-protected-resource/api/mcp".
  2. That document (RFC 9728) names the authorization server https://appbricx.com, whose metadata is at https://appbricx.com/.well-known/oauth-authorization-server (RFC 8414).
  3. The client registers itself at https://appbricx.com/api/oauth/register (RFC 7591), opens https://appbricx.com/oauth/authorize with a PKCE challenge (S256 only), and exchanges the code at https://appbricx.com/api/oauth/token.
  • Scopes: read, apply, deploy (all three by default; a workspace viewer gets read only).
  • Access tokens last one hour. Refresh tokens last 90 days and rotate on every use; reusing an old one revokes the authorization.
  • Redirect URIs must match the registered ones exactly. Plain http is accepted only for loopback (127.0.0.1, [::1], localhost).
  • Revocation (RFC 7009): https://appbricx.com/api/oauth/revoke.

Use a token instead (CI)

Where no browser can open, send a personal access token from Workspace settings, Coding agents. See Access tokens.

POST https://appbricx.com/api/mcp
Authorization: Bearer apx_pat_...
  • A missing, invalid, expired or revoked token gets 401 with code: "UNAUTHENTICATED".
  • Either way, access reaches only projects in the authorized workspace. Anything else answers "Project not found".

Pinning a project

Add ?project=<project-id> to the URL (or send an x-appbricx-project header). Then:

  • project_id becomes optional on every project tool and defaults to the pinned project.
  • The project's current table, workflow and role names appear as enums in the tool schemas (for example the entity of query_data), so the agent picks from what exists. They are re-read on every request, so they follow each apply.
  • A pin to a project the connection can't reach is ignored.
https://appbricx.com/api/mcp?project=3f2c9a10-...

Tools

Read tools work with any valid token. Tools that change something need the scope shown.

ToolWhat it doesScope
whoamiThe signed-in user, the token's scopes and workspaceread
get_guideThe contract guide (markdown). No argument: overview and index. section: one partread
list_projectsProjects this token can reach, newest firstread
create_projectCreate an empty project (name, optional description) in the token's workspaceapply
get_projectWhether the project is built, the last build failure, and its preview pathread
get_contractThe current contract (null before the first apply). Seeds come back as "UNCHANGED"read
check_contractNormalize a contract and report errors, fixes and warnings. No side effectsread
apply_contractBuild the dev environment from a full contract. Optional force overwrites hand-edited compiled files (backed up first)apply
patch_contractApply typed edit ops (1 to 50) to the current contract and rebuild. dry_run reports onlyapply
check_componentRun one custom component through every gate (static, types, compile, server render). No project changeread
verifyStatic → data → browser checks on the dev environment, each failure with evidence and a fixread
screenshotThe dev preview in a real browser, signed in as a role or guest; returns a PNG plus page errors, overflow and visible textread
query_dataRead rows from a dev table (read-only, equality filters, max 200)read
sign_in_providersList or switch the app's social sign-in. Google can run through Appbricx's own client with no setup, or your ownapply
logsRecent workflow runs (status, error, last log lines) and in-app notificationsread
deployPublish to https://<subdomain>.apps.appbricx.com. Pass subdomain to choose a meaningful name. Runs verify first and refuses on red unless skip_verifydeploy
describe_schemaThe real schema of dev or prod: tables, columns, keys, indexes, constraints, triggers, policies, views, functions. Marks which tables the contract managesread
sqlRun SQL like the builder's SQL editor: several statements, DDL and DML, past row-level security. Rows capped at 1000read (reads), apply (dev writes), deploy (prod writes)
edit_rowsInsert, update or delete rows through the app's own rules, RLS and change events, as admin or as a persona roleapply (dev), deploy (prod)
snapshotsList, take or restore database snapshots of dev or prodread (list), apply (create), deploy (restore)
deploysDeploy history, or roll what's live back to an earlier deploymentread (list), deploy (rollback)
runRun a workflow now (result if it finishes within 30s), read a run, list and replay dead lettersread (get_run, dead_letters), apply (dev run, replay), deploy (prod)
tailRecent change events and topic messages, or the app's request log (all requests or errors only)read
secretsList (names only, never values), set or delete the secrets workflows read with ctx.secretsread (list), apply plus workspace owner or admin (set, delete)

Writing tools also need a non-viewer role in the workspace. The server also exposes the whole guide as the resource appbricx://docs/guide.

Tool parameters

ToolParameters
get_guidesection?
create_projectname, description?
get_project, get_contract, verifyproject_id
check_contractproject_id, contract
apply_contractproject_id, contract, force?
patch_contractproject_id, edits, dry_run?, force?
check_componentname (PascalCase), source (the whole TSX file), sample?
screenshotproject_id, route?, as? (persona id, demo login email or "guest"), width? (320 to 1600), height? (480 to 1200), full_page?
query_dataproject_id, entity, where?, order_by? (default created_at), desc? (default true), limit? (1 to 200)
logsproject_id, workflow?, limit? (1 to 200)
deployproject_id, environment? (production | preview), allow_destructive?, skip_verify?
describe_schemaproject_id, env? (dev | prod, default dev)
sqlproject_id, sql, env?
edit_rowsproject_id, table, env?, op (insert | update | delete), rows? (1 to 100), id? or ids?, patch?, as? ("admin" or { role, user_id? })
snapshotsproject_id, action (list | create | restore), env?, id?
deploysproject_id, action (list | rollback), deploymentId?, environment?, limit?
runproject_id, action (workflow | get_run | dead_letters | replay), id?, input?, env?, as? ({ role, user_id? }), runId?, ids?, limit?
tailproject_id, kind (events | requests | errors), env?, since? (15m, 2h, 1d or an ISO time), limit? (1 to 500)
secretsproject_id, action (list | set | delete), name?, value?, env? (dev | prod | all, default all)

Operating the running app

The last eight tools work on the app after it is built, in env: "dev" (the preview, the default) or env: "prod" (the published app).

  • Every prod write (sql, edit_rows) takes a database snapshot first and returns its snapshotId. If the snapshot fails, nothing is written. Undo with snapshots restore.
  • Every write is recorded in the project's admin audit trail with the token, the tool, the environment and a summary.
  • SQL that only reads runs in a rolled-back transaction and needs only the read scope.
  • Hand-tuning: indexes, views, functions, triggers and extra tables or columns you create with sql are kept by contract apply and publish. describe_schema shows them as origin: "hand-made" (tables) or managedByContract: false (columns).
  • The request log behind tail keeps every error and about 10% of other requests for 7 days. It stores paths only: never query strings, request bodies or tokens.

Notes

Stateless

Each request gets a fresh server and transport. There is no MCP session to keep alive, and any API replica can answer any call. The server returns plain JSON responses (no long-lived stream).

get_guide sections

Without arguments it returns the loop and rules, the contract shape, ACCESS and WORKFLOWS, and an index. Pass one of these section ids for the rest:

loop, shape, access, coordinates, seeds, workflows, functions, payments, patch, operate, pages, blocks, components, primitives, icons.

Screenshots are images

screenshot returns MCP image content (a PNG) followed by JSON with url, signedInAs, viewport, errors, overflowX and text. The default viewport is 390×844 (a phone). Before the first apply it answers NOT_BUILT.

Errors

A tool result with an HTTP status of 400 or above is flagged isError and carries the same JSON body the HTTP API sends, for example CONTRACT_INVALID with a report, PROJECT_BUSY, HAND_EDITED_FILES, VERIFY_FAILED or FORBIDDEN_SCOPE. See Developer HTTP API for the full list.

Next

  • Coding agents quickstart: connect Claude Code or Cursor
  • App contract
  • Access tokens
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authPaymentsWorkflows and jobsAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcasePricingFor coding agentsTemplatesPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use