ChatGPT app
Apps/Recipes/ChatGPT app

Build a ChatGPT app

A web app whose actions are tools ChatGPT uses as the person signed in: they add the app's address in ChatGPT, sign in with their account in the app, and allow it. The answers show in the chat as a widget. One placeholder model and two tools to build your own on.

Web, with accountsKind membersRecipe id chatgpt-app

What you'll build

ChatGPTan app at /mcpSign-inthe app's own accountlistItemsas the signed-in personWidgetthe list, in the chat

What it shows: Actions as MCP tools with export const mcp, a sign-in held to the same roles as the app's pages, the account and author taken from caller rather than the model's params, and a widget ChatGPT renders from the tool's answer (MCP Apps).

Before you start

  • The CLI: npm i -g @inferencebureau/apps, then ib-apps login once.
  • ChatGPT, with Developer mode while it's unlisted.
  • Resend, for sign-up and password emails.

Create the app from the recipe

One command creates the app on Inference Bureau and downloads its files into ./my-chatgpt-app. Web is the default platform, so the recipe id is all it takes.

ib-apps create my-chatgpt-app --recipe chatgpt-app

Tour what the recipe loaded

The recipe replaces the starter, keeping the coding-agent guidance. Here's where each piece lives.

WhereWhat's there
settings.ib.tsmcp turns on the server at <app address>/mcp and names it for ChatGPT and the consent page.
item/actions/create.tsAdd an item: its declared params are the tool's input. It only adds, so destructive: false and ChatGPT doesn't ask first.
api/actions/listItems.tsList items, newest first, with a search. readOnly, so a read-only sign-in still gets it.
widgets/items.htmlThe list both tools show in the chat, with an Add field. One self-contained page: no requests of its own, theming from ChatGPT's CSS variables.
accessControl/permissions.ib.tsAn account's members read and add its items, on the pages and through MCP alike.
web/app/connect//connect: the address to add and ChatGPT's steps.
tests/items.test.tsThe tools' actions as a sign-in from ChatGPT calls them, held to the caller's roles and account.
export const run: ActionRun = async ({ params, record, caller }) => {
  if (!caller?.accountId) throw new Error("Sign in to an account first.");
  record.title = String(params.title ?? "").trim().slice(0, 200);
  record.account = caller.accountId; // from who's signed in, never from params
  record.createdBy = caller.userId ?? null;
  await save(record);
};

export const params: ActionParams = {
  title: { type: "string", required: true, description: "A short title." },
  notes: { type: "string", description: "Anything else worth keeping with it." },
};

export const mcp: ActionMcp = {
  title: "Add an item",
  description: "Adds an item to the user's list, shared with the rest of their account.",
  destructive: false,
  widget: "items",
};

Check what it set on the app

Nothing to do here: this is what the recipe configured, so you know where to look in Settings later.

PlatformWeb, with accounts
MCP server<app address>/mcp, signed in as the app's users
IntegrationsResend

Finish setup

  1. Open the app and create an account
  2. Turn on Developer mode in ChatGPT, then open /connect and add the address it shows
  3. Sign in when ChatGPT asks and choose Allow, then rename item and add your own tools

Development has its own address, so ib-apps dev is enough to try it. In ChatGPT, turn on Developer mode under Settings → Apps → Advanced settings, then Create app with the address /connect shows and OAuth.

Run it

ib-apps dev syncs both ways while you work and runs the development server.

cd my-chatgpt-app
ib-apps dev

Try it end to end

0 of 3 checked

Make it yours

Your model

Rename item and give it your fields; keep account so each account sees its own.

More tools

Any action with export const mcp is a tool. See Claude and ChatGPT apps.

Ship it

ib-apps test runs its tests, then ib-apps deploy sends development to production. See Deploys.