Editorial

What building an MCP server taught us about agents

2026-11-17

A dark server room at night, one open rack glowing with green and pink lights and a beam of light reaching an empty desk chair

When we started StoryStudio, we thought of the MCP server as a thin layer: take our image and video features, describe them as tools, done. That turned out to be the wrong picture. The user of an MCP server is not a person clicking buttons. It's a model reading your descriptions, calling your tools in a loop, and acting on every word you send back.

Here is what that changed for us.

Agents retry, so every paid call needs a memory

A person clicks "generate" once and waits. An agent that doesn't get an answer fast enough may simply call the tool again. With a free API that's harmless. With a video model that costs credits, it means paying twice for the same clip.

So every generation request on our side is reserved before it reaches a model. If the same request comes back within 90 seconds, the agent gets the job that is already running instead of a new one. And if we sent a job to a provider but lost the reply, we keep that reservation until we know what happened. Time passing is not proof that nothing was created.

None of this shows up in a demo. All of it shows up on an invoice.

Long jobs need a ticket, and the instruction to use it

A video takes minutes. A tool call wants an answer now. Our generation tools therefore return an id and a poll token, and a separate tool, `get_prediction`, follows the job.

What surprised us was how explicit that tool has to be. Its description ends with a plain sentence: never launch a new generation to check status. An agent that wants to know whether a video is ready has an obvious, expensive shortcut, which is to ask for the video again. Tool descriptions aren't documentation for developers. They are instructions the model reads every single time, and they deserve the same care as a system prompt.

Every error message is a prompt

When a human sees "generation failed", they shrug and try later. When an agent sees it, it starts fixing things. Often the prompt. It rewrites your description, swaps the reference image, tries again, and spends credits on a problem it cannot solve.

We learned to classify errors before returning them. If the provider rejects our credentials, the message says so, marks the error as not retryable and states that changing the prompt, the images or the audio will not fix it. We also scrub those messages: URLs, tokens and long identifiers get replaced, because whatever we send back may be read aloud to the user by the agent.

Agents pass whatever they're holding

People upload files. Agents paste things. Quite often that means a whole image encoded inside the request instead of a link. Most video models want a URL.

Rather than reject those calls, the server hosts the pasted image or video and passes the URL along. It's a small piece of plumbing that removes a whole category of "it worked in the chat but the model never saw my picture".

"The one you just made" needs a definition

In conversation, people say "animate that" or "make it wider" without naming a file. A model has to resolve "that". We keep track of the last image a user generated for six hours and the last video for seven days, and tools expose a `use_previous_result` flag so the agent can say when it means the previous image and, just as useful, when it doesn't.

That second half matters. Silent reuse of an old image in a brand new scene is worse than asking.

Some choices belong to the human

The last lesson goes against the usual pitch of agents doing everything for you. For story, film and ad sequences, our server tells the agent that the user must choose the video model before anything is generated. The agent can explain the options. It doesn't pick one quietly.

Model choice changes the look, the length of each shot and the price. Those are creative and money decisions, and an agent guessing them is how people end up with a surprise bill and a clip they didn't want. We wrote more about the models themselves in what MCP video generation is and in our guide to generating AI video in Claude.

What "agent-native" ended up meaning

For us it doesn't mean "has an API" or "has a chat box". It means designing for a reader that is literal, persistent and fast: descriptions written as instructions, errors that say what not to try, defaults that survive a retry, and clear lines where the agent stops and the person decides.

We expect this list to grow. Every new client and every new model will probably find a gap we hadn't thought about.

Want to see how it behaves from your own agent? StoryStudio has a free plan to start, and it works with Claude, Cursor, Codex and any MCP client.

Pricing: Free (5 credits, P-Image only) · Creator €14.99/mo (1,200 credits) · Pro €39.99/mo (3,500 credits) · Recharge €59.99 one-off (5,000 credits, no subscription). See full pricing →