The product tier above a website: a gateway that owns the database and every credential, plus a Claude plugin the client runs the business through.
The full walkthrough — the whole build, start to finish (22:45).youtube.com/watch?v=XYvLwnGpbcw
One key travels left to right. Nothing travels back except compact JSON the model turns into a sentence.
| The gateway owns | The skill owns |
|---|---|
| the schema, every credential, every write | the judgment: classify this document, read it, decide what it is |
| an MCP endpoint, a tool layer, auth, a credential vault, cron jobs, the dashboards | a routing agent, the skills themselves, and one key |
| Next.js on Vercel, Postgres behind it. Boring on purpose. | Markdown. The client can open it and read what the thing does. |
The mistake worth skipping: one of mine runs past four hundred lines, and almost none of it is instructions for calling tools. It is the rules for telling an invoice from a statement of account, and what to do when the document is neither.
Next.js on Vercel, Postgres behind it. Nothing exotic, and that is deliberate — you want boring here. The MCP route itself is about twenty lines: it starts the handler, registers the tools, and stops. Thin by design, not by accident. Everything interesting lives one level down, in the tools.
Same order, every time. When a tool does not fit that shape, it is usually two tools.
This is the design call most people get wrong.
| The biggest supplier | The tiny stuff |
|---|---|
| About half the money — and about twenty invoices a month. | Cash receipts, the odd delivery. Small money, and somebody touches it every single day. |
Optimise for dollars and you build a beautiful importer for one supplier and leave the daily grind alone. That is why the daily entry screen is the most-used surface in the system — and why it is phone-first, not a desktop table with a mobile fallback. The person filling it in is standing up, holding paper, in the middle of a shift. If it needs a laptop, it does not get done.
The queue matters more than it sounds. It is the difference between a system that forgets and a system that can tell you it forgot. Anything still sitting there shows on the dashboard — fourteen of them, oldest one nine days old. Nobody has to remember to check.
The connection is five lines of JSON: a name and a URL. One setting the client fills in — the key, marked sensitive — rides along on every call. Inside, a routing agent reads the request and picks a skill.
The gateway owns the data. The skill owns the judgment. That is the split.
The mailbox poller queues every attachment it finds. It has no idea what any of them are. An invoice and a statement of account look similar and mean completely different things — and it is not the database that tells them apart.
The tell is the shape, not the title. Item lines under one invoice number is an invoice, even if somebody typed Statement across the top.
| State | What it means |
|---|---|
| filed | The only success. Everything else is a decision, recorded. |
| not a money document | With a reason. The mailbox is shared, so a price list or a receipt is routine, not an edge case. |
| failed | With a reason. A scan too dark to read is still an invoice — that is failed, not not-an-invoice. |
| deliberately pending | Statements wait for month end on purpose. That is the queue working, not a backlog. |
Prose is not a state. Saying it in the summary is not the same as closing it. Leave one document open and it blocks the month close for every outlet, because nobody knows yet which one it belongs to. A helpful paragraph in the report changes nothing — the agent has to write the state down.
The first live run filed a statement as an invoice. The damage went past untidy: reconciliation never re-checks what a document was filed as, so the junk row got reconciled anyway and invented a variance that did not exist. One bad row, and the owner spends an afternoon chasing a supplier about money that was never missing. That is what a skill is for.
If it needs something, it asks the gateway. Which also means the client can read the skills — they are markdown. An owner who wants to know what the thing does can open the file and find out. On the other build the skills drive a browser under the client's own login: no shared passwords, nothing scraped. They already pay for that data; the system just uses the seat they have, the way a staff member would. That one detail has closed more conversations than any feature.
gw_live_… one key, switchable, per client
Every client has the same worry underneath the questions: what if it does something stupid while I am asleep? The gate is the answer, and you sell it as a feature. The system does the boring ninety percent and stops at the part with consequences. Nothing that matters happens without a person saying yes.
Log in as one of their managers, in front of them, on their own data. Let them watch the other outlets disappear. Telling them about row-level security does nothing. Watching their own numbers vanish does all of it.
The gateway had nowhere to keep them yet, so every call carried the client's whole keyring and the plugin had to be trusted with all of it. It worked, it shipped, and it was wrong. Same behaviour today — a fraction of the blast radius.
A diagram in my own doc showed three things where there were only two. It built the third, confidently, and reported an empty column every month. When you build from a written spec with AI, a mistake in the spec ships fast, and without argument. I read my own diagrams like a stranger wrote them now.
Writing the code stopped being the bottleneck a while ago. Knowing whether it does what you think it does is the bottleneck now.
Nobody hands a stranger fifteen thousand dollars for a system they cannot picture yet. This one came through a free build: seven days, no invoice, no contract. Two agents — two skills in a plugin, one job each, done properly.
By the time we spoke about anything bigger, they had already watched something I built do real work in their business for a month. Deliver value so high, so early, that the upsell is not a pitch — it is the obvious next step.
Then the real objection: they wanted to stay on Google Sheets. Fair — it was free, familiar, and the whole team could already use it. Arguing about databases would have gone nowhere; nobody wins that with a list of reasons. So I built a preview instead, with their actual numbers and their actual outlets, backfilled with their real history. One screen showing what month end looks like when it is already done. That is what changed their mind. Not me talking.
An edge is anywhere the system touches something that is not yours. Screens are predictable — you can build a screen on a Tuesday. Edges are where the surprises live, and they are the only thing that has ever blown a timeline.
| Count these | Not these |
|---|---|
| a mailbox · a point-of-sale · a data provider they already pay for · their accounting software | features · screens · nights you spent on it |
An edge is not code. It is somebody else's login, somebody else's rate limit, and a format that changes without telling you.
“Where does this number come from today?” Keep asking until nobody says oh, and there’s also…. That sentence is the one that costs you a fortnight. Then write down what is out, on paper, before anybody signs. That list is the reason these projects finish — without it you do not have a project, you have a subscription to somebody's ideas.
Same architecture and the same two repos both times. The difference between a ten and a fifteen was how many systems it had to talk to — not hours spent. It is not a formula anybody can hand you, because your rate is not mine, but the shape holds: count the edges, and the number moves with that.
And the second build was much faster than the first. Same bones, a different business on top. That is the moment it stops being a favour you did once and starts being a product you sell.
Build the gateway first. Own the data and the credentials before anything else. The plugin is the easy half, and it is the half that changes — the gateway is the part you will still be running in two years.
Who built it — and how to have one built for you.
“We used to spend hours every week on content and reporting. Now it just happens — and the quality is better than what we were doing manually. It’s like having a full marketing team that never sleeps.”
— Director, NPC Office · Jakarta, IndonesiaDone-for-you Claude AI agents surface and pre-screen the opportunities that fit your criteria, so you spend your time closing, not chasing. Live in days, not months.
“The right opportunities land in front of us automatically, already screened, and we just decide what to pursue.”
— Charles Lintakoon, Co-founder, Adana Capital