<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lorenzo Corpita</title>
    <description>The latest articles on DEV Community by Lorenzo Corpita (@cirrela).</description>
    <link>https://dev.to/cirrela</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245772%2Fda94555c-8574-4982-bcc8-c8e27332b35f.png</url>
      <title>DEV Community: Lorenzo Corpita</title>
      <link>https://dev.to/cirrela</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cirrela"/>
    <language>en</language>
    <item>
      <title>Give Claude a video studio over MCP, and make it say the price before it renders</title>
      <dc:creator>Lorenzo Corpita</dc:creator>
      <pubDate>Sun, 15 Nov 2026 10:39:06 +0000</pubDate>
      <link>https://dev.to/cirrela/give-claude-a-video-studio-over-mcp-and-make-it-say-the-price-before-it-renders-23nk</link>
      <guid>https://dev.to/cirrela/give-claude-a-video-studio-over-mcp-and-make-it-say-the-price-before-it-renders-23nk</guid>
      <description>&lt;p&gt;I run Cirrela, a small AI video generator built in France. This post is about the MCP server we built for it, and the one rule that shaped it: an assistant working alone must never spend more than you expected. Disclosure: it's our product, and this post was written with AI help, then checked by me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with "make me a video" from an agent
&lt;/h2&gt;

&lt;p&gt;Video models are expensive per second, and the same 5-second clip costs very different amounts from one model to the next. When a person clicks "Generate", they see the price. When an agent calls a tool in a loop, nobody does. The complaint we read most about AI video tools is credits that vanish without warning, so we designed the tools around that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the server exposes
&lt;/h2&gt;

&lt;p&gt;One URL, Streamable HTTP, JSON answers, no session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cirrela.com/api/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;list_models&lt;/code&gt;: the models you can use (Kling, Wan, Grok Imagine, Gemini and others), with formats, durations, sound, and what your plan allows.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;estimate_cost&lt;/code&gt;: the exact credit price of a request, your balance, and whether you can afford it. Nothing is written.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;create_video&lt;/code&gt; / &lt;code&gt;create_image&lt;/code&gt;: start a render. Accepts &lt;code&gt;max_credits&lt;/code&gt;: if the render would cost more, it is refused instead of run.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_generation&lt;/code&gt;: status, progress, the file when it's done, and &lt;code&gt;refunded: true&lt;/code&gt; if the model failed (failed renders are refunded automatically).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_balance&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every tool declares &lt;code&gt;readOnlyHint&lt;/code&gt;, &lt;code&gt;destructiveHint&lt;/code&gt; and &lt;code&gt;openWorldHint&lt;/code&gt;, so clients can ask before the ones that spend credits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add it to Claude Code
&lt;/h2&gt;

&lt;p&gt;With an API key (Studio plan):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http cirrela https://cirrela.com/api/mcp \
  --header &lt;span class="s2"&gt;"Authorization: Bearer cir_live_your_key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In claude.ai or the desktop app, no key: Settings, Connectors, Add custom connector, paste the URL, then Connect. A Cirrela page asks you to sign in and allow Claude (OAuth). That works on every paid plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern that keeps an agent from burning credits
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Call &lt;code&gt;estimate_cost&lt;/code&gt; with the same body you will send to &lt;code&gt;create_video&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Show the price to the user, or compare it with a budget.&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;create_video&lt;/code&gt; with &lt;code&gt;max_credits&lt;/code&gt; set to that estimate.&lt;/li&gt;
&lt;li&gt;Poll &lt;code&gt;get_generation&lt;/code&gt; until &lt;code&gt;completed&lt;/code&gt;, or read &lt;code&gt;refunded&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3 matters: if the agent changes a parameter between the estimate and the render (a longer duration, a higher resolution), the server refuses rather than charging more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things the API refuses on purpose
&lt;/h2&gt;

&lt;p&gt;The studio quietly fixes impossible settings for people. The API doesn't: an unknown field (&lt;code&gt;colour&lt;/code&gt;) or a duration the model can't do returns &lt;code&gt;422&lt;/code&gt; with the field and what the model accepts ("renders 4, 5, 6, 8, 10, 15 seconds"). For an agent, a loud error beats a silent change.&lt;/p&gt;

&lt;p&gt;Every file carries "AI-generated" metadata, and nothing made through the MCP tools is ever public.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docs with a &lt;code&gt;curl&lt;/code&gt; for each route: &lt;a href="https://cirrela.com/developers?utm_source=devto" rel="noopener noreferrer"&gt;https://cirrela.com/developers?utm_source=devto&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Plans: &lt;a href="https://cirrela.com/pricing?utm_source=devto" rel="noopener noreferrer"&gt;https://cirrela.com/pricing?utm_source=devto&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions about the design (why no sessions, why refuse instead of clamp) are welcome in the comments; I'll answer them myself.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>claude</category>
      <category>video</category>
    </item>
  </channel>
</rss>
