Build an app with your AI agent
Your colleagues can let an AI agent such as Claude Code build an app and put it live on your sota Enterprise account through the sota MCP server. The MCP server gives the agent the rules on this page itself: the tool get-account returns them together with your company label and limits, and the prompt enterprise-app-checklist holds the same checklist. This page states them word for word, so people and agents read the same thing.
Connect the agent
| Where the agent runs | How to connect | Deploys from |
|---|---|---|
| Claude Code, Cursor and other local agents | The local server npx @sota-io/mcp with an API key in SOTA_API_KEY. The owner creates the key in the dashboard under API keys; give each colleague their own named key | a folder on the computer (honours .sotaignore, see the upload rule below), a public git repository or inline files |
| claude.ai and Claude Desktop | The hosted connector https://mcp.sota.io/mcp; sign in as the account owner when asked | inline files only, at most 200 files and 10 MB |
Ask the agent to call get-account first. If it does not say "sota Enterprise account" with your company label, it is connected to the wrong account.
Every sota app
- One project runs one container with one web process. There is no second service, no worker container and no persistent disk: files written inside the container are lost on every deploy, so keep state in the database.
- Build: a
Dockerfilein the project root wins. Without one, sota accepts Node.js (apackage.json; Next.js when there is anext.config.*) and Python (requirements.txtorpyproject.toml) and builds them with railpack. Any other language needs aDockerfile. - Listen on
0.0.0.0and the port in thePORTenvironment variable: 8080 for detected frameworks, theEXPOSEport of a Dockerfile. - Health gate: after the build, sota calls
GET /healthinside the container, andGET /when/healthanswers 404, without any identity headers. It must answer 2xx or 3xx within 60 seconds, or the deploy fails and the previous version keeps running. - Database: the first deploy creates a PostgreSQL 17 database and injects
DATABASE_URLplusPGHOST,PGPORT,PGUSER,PGPASSWORDandPGDATABASE.DATABASE_URLgoes through PgBouncer in transaction mode: noLISTEN/NOTIFY, no session state (SET, session advisory locks, temporary tables) and no named prepared statements (Prisma: add?pgbouncer=true). Run migrations at start, make them safe to run twice and keep them backwards compatible: during a deploy the previous version keeps serving on the same database until the new one passes the health gate. - Settings and secrets:
set-env, then deploy again. They are only available at runtime, never at build time. Public build-time values such asNEXT_PUBLIC_*belong in.env.production; secrets never go into an uploaded file. - Uploads from a folder (local MCP server):
.git,node_modules,.DS_Store,.sota.json,__pycache__,.venv,*.logand the local env files.env,.env.local,.env.*.localand.envrcare always left out. A.sotaignorein the root is used when it exists (an empty one uploads everything else); otherwise the.gitignoreis used, but.env.productionand.env.exampleare uploaded even when it lists them. Add a.sotaignorebefore deploying a folder that holds notes, credentials or data that must not leave the machine. Agit_urldeploy uploads the tracked files and reads only a.sotaignore. The hosted connector takes inline files only: at most 200 files and 10 MB. - Logs:
get-logsshows the build and deploy log; when a deploy fails,get-statusshows the reason. Logs of the running app are not available yet.
On a sota Enterprise account
- Address: a project named
appgets the slug<label>-appand the one URLhttps://app.<label>.sota.io. There is no<slug>.sota.ioaddress. - Sign-in: sota Access signs people in with the company's Microsoft 365 on every path before a request reaches the app. Do not build a login, sign-up, password reset or session handling.
- Identity: every signed-in request carries
X-Sota-Access-User-Id(a stable UUID: use it as the user key),X-Sota-Access-Email(lower-case it before comparing; it can be the tenant sign-in name such asname@company.onmicrosoft.cominstead of the mailbox) andX-Sota-Access-Name(display only). The headers carry no role: keep roles in the app's own database. - Fail closed: every route that shows or changes data answers 401 when
X-Sota-Access-User-Idis missing. OnlyGET /healthandGET /answer without it, and they show no data. - Health without identity: the health gate and the edge's check of
GET /(every 30 seconds, redirects not followed) send no identity headers.GET /healthmust answer 200 andGET /2xx or 3xx without them, for example a short "not signed in" page or a redirect. An app that answers 401 on/is marked down and nobody can open it. - Sign out: link to
/.sota/access/logout. Paths under/.sota/belong to sota Access. - No public paths yet: webhooks, API clients and scripts without a browser cannot reach the app, and
POST,PUT,PATCHorDELETErequests from other websites are refused. - Apps of the same account run on the same server. A direct call from one app to another skips the sign-in, and the caller can set any identity header: never treat such a call as a signed-in user, and authenticate app-to-app calls with your own shared secret.
- Local development: the headers are missing on your machine. Use a fixed test user behind a development-only switch that is off in the deployed app.
After the deploy: who can open the app
- Nobody can open a new app yet, the owner included.
- The person opens the app URL once and signs in with Microsoft 365. This creates an access request.
- The account owner signs in to the sota dashboard, opens Users & access, approves the person and ticks this app.
- The person reloads the app. People approved earlier also need this app ticked.
- API keys and MCP cannot approve people or change grants: tell the human what to do instead.
The agent cannot approve people or change grants: API keys and MCP connections are refused there on purpose, so a leaked key or a misled agent cannot give anyone access to company data. The owner does it in the dashboard under Users & access.
What the agent cannot do yet
- Create, inspect or restore databases beyond the automatic one per app.
- Read logs of the running app (only build and deploy logs).
- Open paths to the internet without sign-in (webhooks, API clients).
- Upload more than 200 files or 10 MB from claude.ai; use the local server or the CLI for larger apps.
Read on: identity headers, known limits, MCP tools.