Claude Code MCP video generation takes one command to connect. Keeping it from spending more than you meant takes five more minutes, and most setup guides skip that part. This one does both: add a hosted MCP server, prove the connection with a call that costs nothing, then put four limits in place: permission rules, a price check before each paid call, a spend cap on the key, and a prepaid balance that refuses what it cannot cover.
The example server is the one for Aitachyon, the studio I run, because I know exactly what its tools return. Everything about Claude Code itself (scopes, permission rules, output limits) comes from Anthropic's current documentation and applies to any hosted server.
What you are connecting
A hosted MCP server is a URL. The MCP specification (revision 2026-07-28) defines Streamable HTTP as one of its two standard transports: each message is an HTTP POST to a single endpoint, and the reply is a JSON object or an event stream scoped to that request.
The server exposes tools, which the client lists with tools/list and runs with tools/call, Claude filling in the arguments from your request. The tools chapter of the specification says there SHOULD always be a human in the loop able to deny a tool invocation, and that clients should show tool inputs before calling the server. In Claude Code that human is you, through permission prompts and rules, and for a tool that spends money on every call that step matters.
Step 1: create a key with a cap
On the example server, a key is created in the app under API & MCP. It looks like ait_…, is shown once, and works for the MCP server and the HTTP API alike. The account is prepaid from $10, with no subscription.
Create one key per agent or per project, and give it a spend cap per day or per month. A call that would cross the cap is refused, and every key shows what it has spent (MCP setup guide and FAQ). A cap of $10 a day, for example, lets through a batch of ten 5-second Kling v3 clips, 10 × 5 s × $0.168 = $8.40 at the silent rate on 1 November 2026, and stops the loop that tries to run it a second time.
Step 2: add the server and choose a scope
With your key in place of the placeholder:
claude mcp add --transport http aitachyon https://aitachyon.com/api/mcp \
--header "Authorization: Bearer ait_your_token"
It follows the general form in Anthropic's Claude Code MCP documentation: claude mcp add --transport http <name> <url>, with --header for a server that takes a static key. The command saves the configuration without validating the credential, so a typo shows up later as a failed connection. The -s or --scope flag decides where the entry lives:
- local, the default: this project only, stored in
~/.claude.json, private to you.
- project: written to
.mcp.json at the project root, meant to be committed. Claude Code asks for approval before it uses a project-scoped server in an interactive session.
- user: every project on your machine, also in
~/.claude.json.
A literal key belongs in local or user scope. To share the server through .mcp.json, write the header value as Bearer ${AITACHYON_KEY} and let each person set the variable: Claude Code expands ${VAR} in a remote server's URL and headers. The exception is a fixed set of credential variables (Claude Code's own such as ANTHROPIC_API_KEY, your cloud provider's, and others such as NPM_TOKEN), which read as empty there, so a repository cannot send them to a server it names. A name of your own expands normally.
Step 3: check the connection with a free call
From the shell, claude mcp list shows each server with a health status (connected, needs authentication, or failed to connect), and claude mcp get aitachyon prints the failure detail on an Issue line. Inside a session, /mcp shows how many tools each server exposes. Then ask a free question:
What is my Aitachyon balance, and which projects do I have?
That request maps to get_me, a free tool. It answers with the balance (dollars on a prepaid account, credits on a plan), the plan, your projects with their ids, since most generation tools need a projectId, and the cost sheet. A 401 means the key is missing, mistyped or revoked: check that the header reads Authorization: Bearer ait_…, or create a new key and add the server again.
In its default mode, Claude Code prompts on the first use of each tool. A generation tool approved once and forgotten is how a session renders more than you meant, so write the rules yourself, in .claude/settings.json for one project or ~/.claude/settings.json for all of them. The permissions documentation gives the syntax: mcp__aitachyon__* matches every tool of the server, mcp__aitachyon__generate_scene matches one. Rules are evaluated deny first, then ask, then allow, and the first match decides, whatever its specificity.
That order shapes the setup. An ask rule on the whole server would also prompt for the free tools, because an ask match beats an allow. So allow the free tools by name and put the expensive ones under ask:
{
"permissions": {
"allow": [
"mcp__aitachyon__get_me",
"mcp__aitachyon__models_explore",
"mcp__aitachyon__job_status",
"mcp__aitachyon__transactions"
],
"ask": [
"mcp__aitachyon__generate_scene",
"mcp__aitachyon__video_*",
"mcp__aitachyon__avatar_generate"
]
}
}
Ask and deny rules accept a glob in the tool name, so mcp__aitachyon__video_* covers upscale, reframe, lipsync, dubbing, motion control and background removal. Allow rules accept a glob only after the literal mcp__<server>__ prefix, and an unanchored mcp__* allow is skipped. Images cost cents, so I leave images_generate to the default prompt. In a repository where nobody should generate media, a deny on mcp__aitachyon__* removes the server's tools, and mcp__* removes every MCP tool.
One trap: a settings file cannot match a parameter of an MCP tool. Claude Code skips any mcp__ rule written with parentheses when it loads settings, and lists it in the invalid-settings dialog and in claude doctor. A parameter rule works only as a deny rule passed on the command line, for example claude --disallowedTools "mcp__aitachyon__generate_scene(resolution:1080p)" for a session that must never render 1080p. On 1 November 2026, a 10-second Seedance 2.5 clip costs $11.37 at 1080p against $4.62 at 720p.
Step 5: ask for the price before a paid call
Every paid tool on the example server accepts getCost: true: it returns the estimated price and runs nothing. Ask for it in plain words, as in this prompt from the setup guide:
Make a 5 second 720p Seedance 2.5 clip of our product on a kitchen counter, 16:9. Tell me the price before you run it.
The preflight is written in credits, the unit of the tool sheet; on a prepaid account it adds a line saying the job is charged in dollars, at the per-second rate on the model page. On 1 November 2026 that is $0.4624 a second at 720p, so this clip comes to 5 × $0.4624 = $2.31. It is an estimate, and the exact charge comes back with the result. With the ask rules above you approve the preflight, then the real call, and the second prompt is where you compare.
To make the check a habit, add one line to the project's CLAUDE.md: "Before any Aitachyon call that costs money, run it with getCost first and stop to ask me if a batch is over $5."
What comes back from a call
The tools specification lets a result carry text, images, audio, resource links or embedded resources, plus optional structured content, and a failure the model can act on comes back inside the result with isError: true. The example server answers in text with links, not file bytes: images_generate returns the image URL and its id, and generate_scene returns the mp4 URL with the mode, whether it has audio, and what it was charged.
Links matter because Claude Code warns when an MCP tool result passes 10,000 tokens and caps it at 25,000 by default (MAX_MCP_OUTPUT_TOKENS changes the cap); a larger text result is saved to a file and replaced by its path. A video sent as base64 would never fit.
A render still running after about 45 seconds comes back as "rendering" with a status path, and Claude Code follows it with the free job_status tool while the render continues. When the balance cannot pay, the call is refused before it runs, and the tool tells the agent not to retry or quietly switch to a cheaper model, but to read the balance with get_me and report the shortfall. A failed job is refunded to the cent, and the free transactions tool shows each refund linked to its job.
Connect it from claude.ai or ChatGPT
The MCP authorization specification is optional; where a server uses it, it is built on OAuth 2.1, with the token in the Authorization header on every request and never in the query string. Since November 10, 2026 the example server offers an OAuth 2.1 sign-in next to the static key, so the claude.ai and ChatGPT connectors can connect to https://aitachyon.com/api/mcp, as Claude Code, Cursor and Claude Desktop already could.
- On claude.ai: Settings, Connectors, Add custom connector, with the URL https://aitachyon.com/api/mcp. On ChatGPT: Settings, Apps & Connectors, turn on Developer mode, then create a connector with that URL and OAuth authentication.
- Press Connect, sign in to your Aitachyon account in the window that opens, then allow access.
- In a chat, turn the connector on and ask for your balance: the free get_me tool answers.
Per-model rates and whole-batch arithmetic are in AI video generation API pricing, and paying per call versus buying credits is worked through in AI credits vs pay-per-call.