What I changed when AI agents became users of my two products

What I changed when AI agents became users of my two products

2026-11-29

This year I added an MCP server to both of my products, FadeHost and EditClips. Customers can now connect an AI assistant and have it do things they used to click through: start a game server, read its console, deploy a Discord bot from a repository, or run a video through an editing tool.

MCP, the Model Context Protocol, is how AI clients discover and call tools on a server. EditClips got its server in March. It exposes five MCP tools, and through them an agent can run any of the site's 170+ editing tools as a job. FadeHost got one in August, and it has grown to 39 MCP tools covering game servers, bots, apps, backups and VPS.

The protocol was the easy part, because the SDKs handle it in a few dozen lines. What took the time was that an agent doesn't behave like a person. It retries, it calls the same tool in a loop, and it reads every error message and acts on it. It also does whatever its token allows, so most of this post is about tokens, limits and error messages.

Discovery has to work without a key

My first version of the FadeHost server put the whole endpoint behind a token, like the rest of the API. That broke in a way I didn't expect. Directory scanners, such as the official MCP registry and other listing sites, call initialize and tools/list without credentials to see what a server offers. Worse, a 401 is how the MCP spec tells a client to start an OAuth sign-in. My servers only took API keys, so gateways that follow the spec sat in a sign-in flow that could never finish.

So both servers now answer the discovery methods (initialize, ping, tools/list and the other list calls) without a key, and require a token for anything that touches an account. Two smaller things came out of the same work:

  • Both accept the key as X-API-Key as well as Authorization: Bearer, because some directories keep the Authorization header for themselves.
  • FadeHost served its tool list in pages of 15. Scanners only read the first page, so the VPS tools were missing from the listings. Every tool is on one page now.

Both servers started with API keys only. A key can be revoked from one page, and on FadeHost it is scoped and named after the assistant that holds it. That was enough to get real clients connected, but it left out every client that only speaks OAuth, which is the authorization the MCP spec describes.

So FadeHost now has a sign-in as well. A tool call without a token gets a 401 that points at it, the owner approves the assistant in the panel and picks read only or read and manage, and the client receives an ordinary AI access token that expires and is refreshed. The same scope rules judge it as a token made by hand, and revoking it on the AI access page ends the connection. A replayed code or a reused refresh token ends it too. EditClips still takes API keys only.

An agent hits the same wall as a person

This is the rule I care about most. On FadeHost, the MCP tools that change something don't contain any logic of their own. Each one sends an internal request through the real panel route, with the caller's own token. That route already checks the subscription, the RAM pool, the disk quota and the permissions, so an assistant gets exactly the answer a person would get from the button. A tool call can never do more than the panel can.

It sounds obvious, but the easy way is to call the service layer directly, and then every rule the panel route adds later is a rule the agent skips. Going through the route means a new rule in the panel applies to agents the day it ships, without anyone remembering to copy it.

EditClips follows the same idea. A job created over MCP goes through the same recipe rules and content checks as the website and the REST API, and it counts against the same per-key rate limit as REST, so splitting traffic between the two doesn't double anyone's allowance. The paid plan is checked on every call, not when the key is made, so a key stops working the moment its plan lapses.

Scoped tokens that every route checks

On FadeHost you create an AI access token on its own page, with either a read scope or a manage scope. The scope only works if every route checks it, and that is where most of the security work went.

I audited every kind of token against every route, and the rule now is default deny: a limited token is refused anywhere a route doesn't name the abilities it accepts. Creating, listing and revoking AI tokens needs the panel's own session or a token with every ability, so a scoped token can never mint a broader one. The tests call the routes with each kind of token, minted the way production mints them, and they run before every deploy.

From the command line, connecting an assistant uses the same device-code approval as the CLI's own login, since a scoped CLI token can't mint tokens by design. You run fadehost mcp install, approve the code in the panel, and the token is named after the assistant and the machine, so the AI access page shows which assistant holds which token.

Two more rules came from looking at what an assistant needs:

  • Secrets go in but never come out. An app's environment variables are bot tokens, API keys and database passwords. The tools work with their names only, never their values, in either direction. Writing a variable reads back the names to confirm it took, rather than echoing what was sent.
  • Console output is untrusted data. A game server's console log contains whatever players typed into chat. An agent reading that log is reading text from strangers, so the tool marks it as data, not instructions.

Long jobs: create, then poll

Video jobs on EditClips take anywhere from seconds to many minutes, and an MCP call shouldn't hang for that long. So the tools follow the same shape as the REST API: create_job checks everything up front and returns a job ID, get_job reports progress and hands back a download link when it's done, and the Pro and Business plans can pass a webhook instead of polling.

Everything that can be refused is refused before the job is queued, because an agent will happily queue work that was never going to finish:

  • input files and webhooks must be public addresses, so nobody can point a job at something inside my network;
  • each account has a limit on how many jobs can run at once;
  • an AI job whose estimated cost is more than the remaining credit balance is refused with both numbers in the error.

The server is stateless: every request gets a fresh server instance, with no session to remember. Any instance can answer any request, and a deploy that swaps the web server doesn't strand anyone halfway through.

Error messages an agent can act on

People skim error messages. An agent reads the whole message and acts on it, so every error now says what to do next:

  • an unknown editing tool says to call list_tools, the MCP tool that lists them;
  • a missing key says where to create one and which header to send it in;
  • a short balance says what the result should cost, what the balance is, and where to top up;
  • a finished result that can't be paid for yet says to top up and then call get_job again, which picks up the new balance.

Money needed the most care, because an agent retries and cancels without a second thought. Nothing is charged when a job is created, only when a result is ready. A cancelled job costs nothing. And cancelling has to be safe to call twice: an early version of cancel_job didn't treat an already cancelled job as finished, so a second call would have refunded the same job again.

Schemas, annotations and tests

Both servers describe every tool with a title, an output schema and hints for read-only, destructive and safe to repeat, so a client can ask before running something that deletes.

Those schemas can break quietly. A change in the validation library I use made one EditClips schema invalid, and every tools/list call crashed while the rest of the site worked fine. Both servers now have tests that list the tools and check who may call them, and FadeHost's tests pin the tool count, so one can't appear or vanish unnoticed.

The limits, in numbers

  • Both servers allow 60 requests a minute. On EditClips that is per key and shared with the REST API.
  • EditClips runs at most two jobs at once per account over MCP, and a finished download link is valid for one hour.
  • A FadeHost account can hold 10 AI access tokens made by hand. Assistants that sign in are counted separately.
  • FadeHost's server has 39 tools and about 50 tests of its own, plus 16 for the default-deny rule and 30 for the sign-in. EditClips has 9 end-to-end tests of its server.

What I'd do first next time

If I added an MCP server to another product tomorrow, this is the order I'd do it in:

  1. Public discovery, authenticated execution.
  2. Every action through the same code path as the UI, with the caller's own credentials.
  3. Scoped tokens checked on every route, with a test per route and scope.
  4. Errors that tell the agent its next step.
  5. Long work as jobs, with everything refusable refused before the job starts.

None of this is specific to AI. A public API needs all of it anyway. An agent just reaches the gaps sooner than a person would, because it keeps retrying until something answers.