The MCP server

Point your AI agent at the Appbricx MCP server and it can do everything a developer does on the platform: create the project, write the code, try the app as each user, verify it, deploy it, roll it back and run it, from the chat you already work in. 55 tools, and run_script to do many of them in one call.

Connect

https://appbricx.com/api/mcp

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

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

# Claude (claude.ai and Desktop)
Settings → Connectors → Add custom connector → https://appbricx.com/api/mcp

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

# Codex: ~/.codex/config.toml, then codex mcp login appbricx
[mcp_servers.appbricx]
url = "https://appbricx.com/api/mcp"

Claude can also add Appbricx from its listing in Claude's connectors directory. Step-by-step setup for each client is in the agent quickstart.

How sign-in works

The server follows the MCP authorization spec (OAuth 2.1), so any compliant client signs in without Appbricx-specific setup:

  1. A request without a token gets 401 with a WWW-Authenticate header naming the protected-resource document (RFC 9728) at /.well-known/oauth-protected-resource.
  2. That names the authorization server, whose metadata is at /.well-known/oauth-authorization-server (RFC 8414).
  3. The client registers itself (RFC 7591), opens the authorize page with a PKCE challenge (S256), and exchanges the code for tokens. Revocation is RFC 7009.
  • Scopes: read, apply, deploy. You choose them on the authorize page; a workspace viewer's client gets read only.
  • Access tokens last one hour; refresh tokens last 90 days and rotate on every use, and reusing an old one revokes the authorization.
  • Every authorized client is listed in Workspace settings, Coding agents with a Revoke button.

Tokens instead (CI)

Where no browser can open, send a personal access token as Authorization: Bearer apx_pat_…. See access tokens.

Pin a project

Add ?project=<id> to the URL (or send x-appbricx-project). project_id becomes optional, the agent can't reach your other projects, and table, workflow and role arguments become lists of the project's real names, so the agent can't misspell them.

The tools, by task

Each tool calls the same operation as the matching developer API route, with the same scopes and answers. Input schemas, scopes and examples are in the MCP reference.

Find your way

Who you are, the guide and the docs.

ToolWhat it does
whoamiWho you are signed in as, the token's scopes and workspaces.
get_guideThe guide: a quickstart and an index of sections, one section, or where one export is defined.
search_docsSearch every guide section and tool description by words.
script_apiThe TypeScript declarations of every tool, for run_script.

Projects

Create, rename, copy, share and delete projects.

ToolWhat it does
list_projectsThe projects you can reach.
create_projectA new, empty project.
get_projectWhether it is built, and the last failed apply.
update_projectRename, re-describe, archive or unarchive a project.
duplicate_projectCopy a project, optionally with its dev data.
collaboratorsShare a project with people outside the workspace.
delete_projectDelete a project; you confirm with its name, and the site goes dark first.

Write the code

The dev draft: routes, components, actions, workflows, SQL, templates, packages and images.

ToolWhat it does
codeRead, create and edit each part of the app by what it is: a route by its URL, a component, an action, a workflow, a table, a policy, a query, a seed, a template, an icon, the config. Edits are exact replacements; then: check or apply.
project_filesThe same draft by path: list, read, write, move, delete, diff, reset, check, apply.
packagesAdd or remove npm packages; package.json and the lockfile are written for you.
assetsUpload images, logos and fonts, served at /assets/<name>.
check_contractCheck the draft: errors at file and line, and the database plan with plan: true.
apply_contractBuild dev from the draft: migrate, seed, bundle, arm workflows.
get_contractThe project's files and settings, its dev and prod URLs, and its webhook URLs.
check_codeFast feedback on one component, function or rule, with a dry run.
check_componentOne component through the static, type, compile and render gates.

Start from a template

Apps to start a project from, and your workspace's own.

ToolWhat it does
search_templatesFind an app to start from.
get_templateOne template's README, params and what it adds.
use_templateStart a project from an app template (dry_run first).
save_templateSave a project as a private template of your workspace.

Try it as your users

Call the running app, look at it, run workflows without side effects, and ask why.

ToolWhat it does
call_appOne request to the running app as a visitor, any role or the server key: a data read, an action, a topic message, a webhook, a page's HTML.
screenshotA page in a real browser at phone size, as any role, after clicks and typing.
workflowsWhat is armed and when it runs next; pause and resume; dry_run runs a workflow once and lists every email and write, sending nothing.
runRun a workflow or action now, read a run's steps, cancel, replay dead letters.
message_previewsEvery email, SMS, notification and prompt rendered with its sample.
rolesEach role's pages, sign-up and members, and every table's policies.
explainWhy: why a role may or may not read or write a row, why a request failed, what an error code means.
verifyEvery role against every table, page and action, with evidence and a fix for each failure.
jobRead a long tool's run from anywhere.

Data and files

Read and change rows, run SQL, move data in and out, and manage the project's stored files.

ToolWhat it does
query_dataRead rows as the admin or as any user, with filters, cursors and aggregates.
sql_queryRead-only SQL, as the admin or as a user under row-level security; it never writes, so clients run it without asking.
sqlAny SQL, as the admin or as a user under row-level security; explain and dry_run.
edit_rowsChange rows through the app's own data path, so policies, triggers and workflows behave as in the app.
describe_schemaThe real schema of dev or prod.
data_transferExport to CSV or JSON, import rows, copy one environment's database to the other.
snapshotsList, take, restore and download database snapshots.
migrationsThe schema journal, the next plan, and rolling a migration back.
storageThe project's files, assets, backups and exports: list, read, upload, move, folders and per-file permissions. Never the bucket or its keys.

Ship and roll back

Production releases, versions, addresses and domains.

ToolWhat it does
deployPublish to production; dry_run reads the plan first.
deploysReleases, one-call rollback (with the data if you want), take the site down.
versionsEvery applied version: list, diff (per file, with the schema plan), label, restore.
routingThe dev URL and the production subdomain: check, move, rename.
domainsCustom domains: the DNS records to set, verify, remove.

Operate

Logs, numbers, accounts, sign-in, secrets and integrations of the running app.

ToolWhat it does
logsRecent runs with their log lines, and notifications.
tailRecent change events, requests, errors and the email outbox.
statsRequests, errors, latency, workflows and database numbers over 24 h, 7 d or 30 d.
app_usersThe app's accounts: invite, change a role, disable, reset a password, sign out.
sign_in_providersGoogle and GitHub sign-in, and whether sign-up is open.
secretsConfig values and secrets per environment (never answered back).
integrationsThe integrations catalog, connections, and calling one action to test it.

Many steps in one call

A TypeScript script that calls the other tools.

ToolWhat it does
run_scriptOne TypeScript script that calls the other tools, with loops and Promise.all.

Many steps in one call: run_script

An agent that checks, applies and then tries five things as three roles spends most of its time on round trips. run_script runs one TypeScript script that calls the tools as async functions, in loops and in parallel, and answers only what the script returns.

run_script {
  "project_id": "3b7e…",
  "code": "
    const check = await tools.project_files({ action: 'check' });
    if (!check.report.ok) return check.report.errors;
    await tools.project_files({ action: 'apply' });
    const read = (as) => tools.call_app({ path: '/__appbricx/api/v1/booking', as });
    const [guest, hr, ops] = await Promise.all([
      read({ kind: 'visitor' }), read({ kind: 'user', role: 'hr' }), read({ kind: 'user', role: 'ops' }),
    ]);
    return { guest: guest.json?.rowCount, hr: hr.json?.rowCount, ops: ops.json?.rowCount };
  "
}
  • Each call runs as you, with your token's scopes, and every write is audited with the script's id.
  • Tools that deploy, roll back, restore, delete or write production are refused unless the script names them in allow ("allow": ["deploy"]). dry_run: true allows only tools that read, check or plan.
  • 60 seconds by default (up to 300), 200 tool calls, 4 at once; no network and no files. script_api gives the agent the typed declarations of every tool.
  • A script saved as scripts/<name>.ts in the project runs with { "name": "<name>" }, versioned with the app.

Long tools

deploy, verify, use_template, snapshot restores and rollbacks take minutes. After a wait they answer { "status": "running", "job_id": "…" }; calling the same tool again joins the same run instead of starting a second one, and job reads it from anywhere. A client that sends a progress token gets progress notifications.

Good to know

  • Production writes (sql, edit_rows, imports) take a database snapshot first and answer its id.
  • Every write an agent makes is in the workspace's audit log as agent.<tool>, with the token that made it.
  • The whole guide is also the MCP resource appbricx://docs/guide.

Related