Skip to content
Work Expertise Services CV Portfolio Integrations Laravel packages Blog Sign in Get in touch

An assistant allowed into your application

What is interesting about an assistant is not that it writes text, but that it can do something in a system that is yours. For that it needs a door, and you decide on that door: what may pass through it, with which key, and where it stops.

What MCP is

MCP stands for Model Context Protocol: an agreement on how an assistant gets to know and use tools from outside. Your server states which operations exist, what data each of them expects and what it returns; on that basis the assistant chooses what to call. The difference with an ordinary api is that the protocol was made to be described: the assistant reads the description and does not have to be programmed for your system in advance.

In practice that means: build it once and it works with every assistant that speaks the protocol, instead of having to make something different per provider. And it means your old rest api does not have to go. In this project they sit side by side and both run through the same code, so there are never quietly two versions of the same rules.

What I built on it

Six pieces between an assistant and an application that stays yours.

An MCP server on the application itself

This site has one: an assistant can read and describe the blog with it, and submit an article. MCP is the protocol through which an assistant gets to know tools from outside, and it saves you a separate integration per assistant.

The same operation along three channels

An article can arrive through the form in the admin, through the rest api or through the MCP server. All three run past the same writer in the code, so there is one set of rules and not three that slowly drift apart.

A key per assistant, not per person

Every assistant gets its own key, created in the admin and visible only at that one moment. The database holds a sha256 fingerprint, so whoever reads the table still has nothing. Revoking is a button.

Rights that overrule the request

A key without the right to publish gets nothing online, whatever the request says. What arrives stays a draft until a person checks it. The limit sits in the key and not in the promise of the assistant.

A text version of every page

Besides llms.txt, which summarises the site, every public page has a .md variant at the same url with .md after it. It is derived from the same html, so the text version cannot drift away from what a visitor sees.

A helpdesk an assistant can operate

For FreeScout I wrote an MCP server, so an assistant can look up and answer conversations within the limits the key allows, instead of having someone copy and paste out of a screen.

How it fits together

Five rules that decide whether you can let this run quietly or have to look at it every day.

Treat an assistant as an outside party

Not as a colleague with an account, and not as a piece of your own code. Its own key, its own rights, its own brake on the number of requests, and a log of what it did. That is exactly what you would do for an integration with another company, and for the same reasons.

What arrives is a proposal, not a fact

An assistant that publishes, mails or invoices directly is an assistant that on a bad day publishes, mails or invoices a mistake directly. Put a state in between: draft, queue, awaiting approval. That costs a click and it saves the day it goes wrong.

An api is not a screen

What a person infers from a screen has to be stated explicitly in the response for an assistant: which fields exist, what is required, what an error means and what the next step is. An api that does not say so leaves the assistant guessing, and guessing looks like certainty in text.

A brake belongs to it

An assistant that ends up in a loop sends hundreds of requests before anyone notices. A counter per key, a clear 429 and a response that says how long waiting takes is enough to keep that an inconvenience instead of an outage.

The text you supply is input, not instruction

What comes out of a model, or what a visitor typed into a field that is read by a model, is data. It should never determine what your application does. You draw that line in the code, and not in the wording of the prompt.

What it is not

This is not about a chat window on your website. That is a different kind of project, with different risks, and it is usually not where the gain is. The gain sits in the work that now happens by copying and pasting between two screens: a summary someone retypes, a ticket someone moves across, a text someone enters again somewhere else.

And it is not about trusting the assistant. The whole set-up is aimed precisely at not having to: the limit sits in the key, in the rights and in the state the work arrives in. If the assistant does well, that saves time. If it does badly once, there is a draft you throw away.

Would you like such a door on your own system

Usually that starts with a question that has nothing to do with AI: which operations in your application are worth being able to call from outside. Once that is clear, the rest is construction. Send a message.

The documentation of this site api is at llms.txt, and anyone who wants to think about the key side of it will find that under identity and access.