Build with a coding agent
Point a coding agent at a Startup project with its briefing file, two MCP servers, a scoped test key and the Change loop.
npm create startups writes AGENTS.md and .mcp.json, so a coding Agent works the Startup from its first prompt. The agent edits files, calls Verbs and ships through Changes, never around them.
Prerequisites
- A project from
npm create startups. The examples useleaseline.app, which tracks lease renewals for small property managers at $29 a month. - A coding agent that reads
AGENTS.mdand connects to MCP servers over streamable HTTP.
Steps
Read the
AGENTS.mdthe project ships. It is the agent's whole briefing, and you edit it freely:AGENTS.md # Leaseline This repository defines Leaseline. Its files compile into the running business. ## Before you write - Connect both MCP servers in .mcp.json. - Fetch /$.d.ts from the leaseline server:the types of $, cut to your key. - Read the convention for a file before you change it: https: //startupbuilder.dev/ code/ file-conventions ## While you work - Keep npx startup-builder dev running. Each save previews as a Change. - Print a Verb's input with npx startup-builder schema <Noun.verb> before you call it. - Rehearse every write with --try, or mode "try" in the do tool. ## Never - Never edit generated/ or .sb/ . Name secrets in env.ts; never write a value. - Never call Stripe or any outside API directly. Call the Verb. - Never use --env live. Shipping is Change.review, then the founder's Version.deploy. Check
.mcp.json. It connects two servers: the Startup itself on api.sb, and these docs:.mcp.json { "mcpServers": { "leaseline": { "url": "https://api.sb/ mcp? ns= leaseline.app" }, "startupbuilder-docs": { "url": "https: //startupbuilder.dev/ mcp" } } } The first acts on the business through
search,fetchanddo(MCP). The second reads documentation and needs no key (docs for agents).Give the agent its own test key, scoped to the Verbs it needs and expiring on its own:
npx startup-builder keys create --name coding-agent --scope leaseline.app --verbs Offer.publish,Change.review --expire-in 30d Set it as
STARTUP_BUILDER_API_KEYin the agent's shell. A test key never touches live data or real money (keys).Start the dev server in a second terminal, so every edit compiles and previews:
npx startup-builder devAsk for a change in plain words, such as "add a 60-day notice field to leases". The agent edits
nouns/, the dev server recompiles, and a broken convention fails with the file and line.Lease.mdx When the preview is right, have the agent review the Change. Every test and Evaluator runs on the preview:
Text Review my change.Merge and deploy the Change. Ship my changes shows the calls;
Version.deployasks the founder first, so the agent never ships to customers alone.
Result
The agent edits files, checks each call against the types before it runs, and ships only reviewed Changes. A write over the key's Limit waits pending for an Approval instead of failing.
An agent offers only what these docs document. The founder's words map to guides in /asks.json; anything not documented, the agent does not offer.
Next steps
- Every file convention: what the agent writes, file by file.
- MCP:
search,fetchanddoon a Startup. - Run the CLI in CI: the same checks on every pull request.