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/mcpStreamable 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:
- A request without a token gets
401with aWWW-Authenticateheader naming the protected-resource document (RFC 9728) at/.well-known/oauth-protected-resource. - That names the authorization server, whose metadata is at
/.well-known/oauth-authorization-server(RFC 8414). - 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 getsreadonly. - 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.
| Tool | What it does |
|---|---|
whoami | Who you are signed in as, the token's scopes and workspaces. |
get_guide | The guide: a quickstart and an index of sections, one section, or where one export is defined. |
search_docs | Search every guide section and tool description by words. |
script_api | The TypeScript declarations of every tool, for run_script. |
Projects
Create, rename, copy, share and delete projects.
| Tool | What it does |
|---|---|
list_projects | The projects you can reach. |
create_project | A new, empty project. |
get_project | Whether it is built, and the last failed apply. |
update_project | Rename, re-describe, archive or unarchive a project. |
duplicate_project | Copy a project, optionally with its dev data. |
collaborators | Share a project with people outside the workspace. |
delete_project | Delete 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.
| Tool | What it does |
|---|---|
code | Read, 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_files | The same draft by path: list, read, write, move, delete, diff, reset, check, apply. |
packages | Add or remove npm packages; package.json and the lockfile are written for you. |
assets | Upload images, logos and fonts, served at /assets/<name>. |
check_contract | Check the draft: errors at file and line, and the database plan with plan: true. |
apply_contract | Build dev from the draft: migrate, seed, bundle, arm workflows. |
get_contract | The project's files and settings, its dev and prod URLs, and its webhook URLs. |
check_code | Fast feedback on one component, function or rule, with a dry run. |
check_component | One component through the static, type, compile and render gates. |
Start from a template
Apps to start a project from, and your workspace's own.
| Tool | What it does |
|---|---|
search_templates | Find an app to start from. |
get_template | One template's README, params and what it adds. |
use_template | Start a project from an app template (dry_run first). |
save_template | Save 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.
| Tool | What it does |
|---|---|
call_app | One 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. |
screenshot | A page in a real browser at phone size, as any role, after clicks and typing. |
workflows | What is armed and when it runs next; pause and resume; dry_run runs a workflow once and lists every email and write, sending nothing. |
run | Run a workflow or action now, read a run's steps, cancel, replay dead letters. |
message_previews | Every email, SMS, notification and prompt rendered with its sample. |
roles | Each role's pages, sign-up and members, and every table's policies. |
explain | Why: why a role may or may not read or write a row, why a request failed, what an error code means. |
verify | Every role against every table, page and action, with evidence and a fix for each failure. |
job | Read 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.
| Tool | What it does |
|---|---|
query_data | Read rows as the admin or as any user, with filters, cursors and aggregates. |
sql_query | Read-only SQL, as the admin or as a user under row-level security; it never writes, so clients run it without asking. |
sql | Any SQL, as the admin or as a user under row-level security; explain and dry_run. |
edit_rows | Change rows through the app's own data path, so policies, triggers and workflows behave as in the app. |
describe_schema | The real schema of dev or prod. |
data_transfer | Export to CSV or JSON, import rows, copy one environment's database to the other. |
snapshots | List, take, restore and download database snapshots. |
migrations | The schema journal, the next plan, and rolling a migration back. |
storage | The 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.
| Tool | What it does |
|---|---|
deploy | Publish to production; dry_run reads the plan first. |
deploys | Releases, one-call rollback (with the data if you want), take the site down. |
versions | Every applied version: list, diff (per file, with the schema plan), label, restore. |
routing | The dev URL and the production subdomain: check, move, rename. |
domains | Custom domains: the DNS records to set, verify, remove. |
Operate
Logs, numbers, accounts, sign-in, secrets and integrations of the running app.
| Tool | What it does |
|---|---|
logs | Recent runs with their log lines, and notifications. |
tail | Recent change events, requests, errors and the email outbox. |
stats | Requests, errors, latency, workflows and database numbers over 24 h, 7 d or 30 d. |
app_users | The app's accounts: invite, change a role, disable, reset a password, sign out. |
sign_in_providers | Google and GitHub sign-in, and whether sign-up is open. |
secrets | Config values and secrets per environment (never answered back). |
integrations | The integrations catalog, connections, and calling one action to test it. |
Many steps in one call
A TypeScript script that calls the other tools.
| Tool | What it does |
|---|---|
run_script | One 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: trueallows 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_apigives the agent the typed declarations of every tool. - A script saved as
scripts/<name>.tsin 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.