The backend for apps you build in ChatGPT and Claude
Your agent writes the screens and the code only your app has. Fóir deploys it to foir.build and runs sign-in, organisations, data, payments and the steps between.
Free for one project and 1,000 records.
This week
Start in the AI you already use
Your ChatGPT, Claude or Cursor subscription does the building. Fóir has no build credits and never charges per prompt.
Connect Fóir to your agent
Add Fóir as a connector in ChatGPT or Claude, or as an MCP server in Claude Code, Codex or Cursor. The starter tells your agent how to build on it.
$ claude mcp add --transport http foir https://mcp.foir.dev/mcp $ npm create foir ✓ created timetable ✓ added the Fóir skill and AGENTS.md
Your agent writes only the code that's yours
Anything Fóir doesn't already do, like how a studio prices a class, is an operation in TypeScript, Python or Rust. Fóir signs every call to it and the SDK checks the signature, so there's no endpoint to secure.
export const price = operation('bookings.price', { input: t.object({ classId: t.id(), member: t.id() }), output: t.object({ amount: t.number() }),}, async ({ input }) => { // Your studio's own rules: intro offers, off-peak prices const amount = await studioPrice(input.classId, input.member); return { amount };});
$ foir push ✓ web deployed to b-4f2a9c1e07d3--timetable.foir.build ✓ 2 operations found: bookings.price, waitlist.offer ✓ logic bookings.reserve pushed as data, 8 steps ✓ release proposed
Try it, then publish
Your agent proposes a release with everything it changed. You try the preview and publish, and a rollback is a new release, so nothing newer is ever overwritten.
proposed by your agent · 5 items
$ claude mcp add --transport http foir https://mcp.foir.dev/mcp $ npm create foir ✓ created timetable ✓ added the Fóir skill and AGENTS.md
export const price = operation('bookings.price', { input: t.object({ classId: t.id(), member: t.id() }), output: t.object({ amount: t.number() }),}, async ({ input }) => { // Your studio's own rules: intro offers, off-peak prices const amount = await studioPrice(input.classId, input.member); return { amount };});
$ foir push ✓ web deployed to b-4f2a9c1e07d3--timetable.foir.build ✓ 2 operations found: bookings.price, waitlist.offer ✓ logic bookings.reserve pushed as data, 8 steps ✓ release proposed
proposed by your agent · 5 items
Workflows that survive a deploy
Every process in your app is Logic: steps, waits, triggers and undo steps your agent declares in config and pushes as data. Fóir runs them, saves each result, and retries from the step that failed.
import { defineLogic, rule, t } from '@foir/cli/configs'; export const reserve = defineLogic({ key: 'bookings.reserve', kind: 'action', input: t.object({ bookingId: t.id(), member: t.ref('customer') }), steps: ({ input, step, output }) => { const id = input.bookingId; // Hold the place. If the run is cancelled, undo frees it. const hold = step.write('hold', 'records.update', { id, data: { status: 'held' }, }, { undo: () => step.write('free', 'records.update', { id, data: { status: 'open' } }), }); // Paid, cancelled or 15 minutes: whichever comes first. const pay = step.first('pay', { paid: step.waitForEvent('paid', 'booking.paid', { match: id }), cancelled: step.waitForEvent('cancel', 'booking.cancelled', { match: id }), expired: step.sleep('timeout', '15m'), }, { after: [hold] }); const confirm = step.write('confirm', 'records.update', { id, data: { status: 'booked' }, }, { when: rule(pay.winner).eq('paid') }); const offer = step.operation('offer', 'waitlist.offer', { bookingId: id }, { when: rule(confirm.skipped).eq(true) }); return output({ outcome: pay.winner }, { after: [confirm, offer] }); }, triggers: { on: { event: 'record.created', model: 'booking', input: (e) => ({ bookingId: e.record.id, member: e.record.member }) } },});
- holdwrite · records.updateheld
- payfirst · 3 brancheswaiting
- paidbooking.paidwaiting
- cancelledbooking.cancelledwaiting
- timeoutsleep · 15m12m left
- confirmwrite · records.updateif paid
- offeroperation · waitlist.offerif not
- freeundo of holdif cancelled
Never worry about leaked data again.
Each of your customers is an organisation, nested as deep as your app needs: a chain, its studios, their teams. Postgres checks every read against the caller's organisation and role, under your code, so one customer's data never reaches another.
Hosted sign-in on your own domain
Passkeys, email codes, Apple, Google, Microsoft and GitHub, on your login domain and in your brand.
Any customer organisation can bring its own SAML connection, and SCIM maps its groups to your roles. That's the enterprise sign-in teams usually buy from WorkOS, already in your backend.
Agent sandboxes, created instantly
Each agent run gets a sandbox with everything your backend has: data, sign-in, files and Logic. There's no infrastructure to set up.
It reads production through its role, writes only inside the sandbox, and is cleared when the run completes. The agent holds no copy, so what it may not see stays in production.
- Writes only here
- Visible to Lane Pilates' admin
- Cleared when the run completes
Show each audience its own version
Any record, field or item in a list can have variants, each for an audience you define once by country, device, language, time, sign-in or your own values. Fóir picks one on the server for every read.
foir.io works this way: AI agents get a plain page and people get this one, from one home page record with two variants.
Banana bread
Bake at 180°C for 55 minutes
- 250 g plain flour
- 3 ripe bananas
- 100 g butter, melted
Your app on the web, on iPhone and in ChatGPT
Each one uses the same SDK and API under the same roles, so a class booked in ChatGPT is on the member's iPhone straight away.
Web app on foir.build
Each pull request gets a preview where sign-in works, and publishing promotes the tested build to your own domain.
iOS app
The same API from Swift, with push, Sign in with Apple and App Store subscriptions through RevenueCat.
Your app inside ChatGPT and Claude
Fóir generates an MCP server for your project, or one per organisation for a multi-tenant SaaS, and your pages open inside the chat as an MCP app.
Your app's pages in the console
Add your front end as a page and it signs you in from the console. Impersonate a user to debug, and every write records both of you.
Email from your own domain
Receipts, reminders and anything built from your data go out from your domain, sent by a step in Logic. Each studio's mail can carry its own name and reply address, and bounces come back as events.
What Fóir replaces
Each row is a service your agent would otherwise sign up for, connect and keep in step with the rest, on every app. In Fóir it's a line of config.
Free for one project, then from £0.99 a month
Hosting and sign-in come with every plan, Free included. AI inside your app runs on your own Anthropic or OpenAI key, or on Fóir credits.
View included limits
- Projects
- Agreed
- Team members
- Agreed
- Records
- Agreed
- Media
- Agreed
- Signed-in end users
- Agreed
- AI credits
- Agreed
- API requests
- Agreed
- Video streaming
- Included
- Web research
- Included
Prices exclude VAT. Every number is for the whole workspace, however many projects you split it across, and you can cap an individual project below it so one client cannot use the lot. Where a row shows a rate you can grow past the included amount and pay for what you use. Where it does not, the number is the ceiling.
Questions
Do I need to understand Fóir to build on it?
No. Your agent reads the Fóir skill and works through the MCP server and CLI. You describe the app, try the preview and approve what it asks you to.
Does my agent still write code?
Yes: the screens, and operations for whatever only your app does, in TypeScript, Python or Rust. Fóir finds them when it deploys the app and calls each one as a step in Logic, with a signed request the SDK checks for you.
Do I pay for AI credits to build?
No. Your agent builds on the ChatGPT, Claude or Cursor plan you already have. Fóir credits pay only for AI inside your app, and you can bring your own Anthropic or OpenAI key instead.
Which sign-in methods are there?
Passwords, email codes and passkeys, plus Apple, Google, Microsoft, GitHub and any OpenID provider. Each customer organisation can add its own SAML connection, with SCIM.
Can my app use its own domain?
Yes, from Entry up. Your app and its sign-in pages both run on your domain, and every plan starts on foir.build.
Start building for free
Production-ready from the first preview.