Connect your agent over MCP
Claude Code, Codex, Cursor and chat apps such as claude.ai can use Staglight as tools: estimate, generate, poll and download, from the same balance as the studio.
Chat apps in under a minute
claude.ai, Claude Desktop and other chat apps with custom connectors sign in with your Staglight account (OAuth 2.1), so nobody pastes a key. You approve each app once and give it a spending cap.
Claude
- Press the button above, or in Claude open Customize > Connectors > Add custom connector with the name Staglight and the URL
https://mobyvid.com/mcp. - Press Continue, keep Sign in now and press Add, then sign in with your Staglight account, choose what it may do and its spending cap, then Allow. On the Free plan you can add one custom connector; on Team and Enterprise an owner adds it first and you press Connect.
- In a chat, press + > Connectors and switch Staglight on. Attach a product photo and ask: make me an ad for this product.
ChatGPT
- In ChatGPT on the web, open Settings > Plugins and press + > Add custom MCP server. It needs a Business, Enterprise or Edu workspace that allows it; on Pro it can only read.
- Name it Staglight, paste the URL
https://mobyvid.com/mcp, choose OAuth, tick I understand and want to continue, then Create as a plugin. - Sign in with your Staglight account and Allow.
- In a new chat, type @, pick Staglight and ask for your ad.
Every connection is listed in Settings > Connections with its spending cap (any 24 hours); Disconnect ends its access at once. Tools that spend, upload or change things need the Create ads and spend credits permission; a view-only connection can read but not spend.
Server
Create a key with a daily cap in the studio and save it as STAGLIGHT_API_KEY.
export STAGLIGHT_API_KEY="sl_live_..."
Claude Code
One command, for every project on this computer. The shell fills in the key and Claude Code stores it in ~/.claude.json.
claude mcp add --transport http staglight https://mobyvid.com/mcp \
--header "Authorization: Bearer $STAGLIGHT_API_KEY" --scope user
Prefer to sign in instead of using a key? Run the command without the --header part, then type /mcp in Claude Code and pick staglight to sign in with your Staglight account.
Check that it connected:
claude mcp get staglight
To share it with a team in the repo, add .mcp.json. Each person keeps the key in their own STAGLIGHT_API_KEY.
{
"mcpServers": {
"staglight": {
"type": "http",
"url": "https://mobyvid.com/mcp",
"headers": {
"Authorization": "Bearer ${STAGLIGHT_API_KEY}"
},
"timeout": 600000
}
}
}
Name the variable STAGLIGHT_API_KEY. Claude Code leaves some credential variables with reserved names empty in remote headers, so use this one.
Codex
codex mcp add staglight --url https://mobyvid.com/mcp --bearer-token-env-var STAGLIGHT_API_KEY
Or write it by hand in the Codex config:
[mcp_servers.staglight]
url = "https://mobyvid.com/mcp"
bearer_token_env_var = "STAGLIGHT_API_KEY"
startup_timeout_sec = 20
tool_timeout_sec = 120
Codex stops a tool call after 60 s by default. Every tool answers in under 50 s, and get_job waits 50 s at most.
Cursor
In ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one project:
{
"mcpServers": {
"staglight": {
"url": "https://mobyvid.com/mcp",
"headers": {
"Authorization": "Bearer ${env:STAGLIGHT_API_KEY}"
}
}
}
}
Claude Desktop and claude.ai
claude.ai and Claude Desktop connect by signing in with your Staglight account: see Chat apps.
If you'd rather use an API key there, bridge from your computer with the community package mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"staglight": {
"command": "npx",
"args": [
"mcp-remote",
"https://mobyvid.com/mcp",
"--header",
"Authorization:${AUTH_HEADER}",
"--transport",
"http-only"
],
"env": {
"AUTH_HEADER": "Bearer sl_live_..."
}
}
}
}
mcp-remote is a third-party package that runs on your computer with your key. Review it before you use it.
Tools
Paid tools take max_credits and idempotency_key. Every result has a short text, the data as JSON and, for finished files, links to download.
| Tool | What it does | Cost |
|---|---|---|
| get_balance | Balance, the key's daily cap and what is left today. | Free |
| buy_credits_link | Link to buy credits in the studio. | Free |
| list_models | Models and tools with fields and starting price. | Free |
| estimate_cost | Exact price of a call before you make it. | Free |
| upload_from_url | Imports a file from a direct link and returns its media id. | Free |
| upload_file | Stores a photo or short clip attached in the chat (base64, up to 12 MB) and returns its media id. | Free |
| upload_image | Same as upload_file. | Free |
| list_media | Uploads and results with signed links. | Free |
| generate_image | Product images with Nano Banana, GPT Image, Seedream or Flux. | Paid |
| generate_video | Clips with Kling, Veo, Seedance, Hailuo or Wan, plus avatars and motion control. | Paid |
| generate_voice | Voiceover with ElevenLabs. If it fails, one retry with a similar backup voice at no extra cost (no word timings); send allow_fallback: false to get a refund instead. | Paid |
| generate_music | Background music with Suno. | Paid |
| upscale | Upscales an image or a video. | Paid |
| remove_background | Cuts the product out (transparent PNG). | Paid |
| add_captions | Burns word-timed captions into a video. | Paid |
| reburn_captions | Burns captions again with edited lines or a new style, without transcribing. Free, with a daily limit. | Paid |
| merge_videos | Joins clips into one video at one aspect. | Paid |
| clean_export | Copy without location, device, editing or AI model data; keeps an AI-generated note unless you switch it off. | Paid |
| analyze_ad | Grades an ad from a file or a post link and writes new hooks and a script to remake it with your product. | Paid |
| create_job | Runs any op from list_models. | Paid |
| social_download | Downloads a TikTok, Instagram, Facebook or Shorts post into your library. Free, with a daily limit. | Paid |
| list_characters | Lists your saved characters with their pictures and voice, and the character sheet price. | Free |
| get_character | One saved character with its pictures and voice. | Free |
| create_character | Saves a person once (name, 1 to 3 pictures, optional voice) to cast in Script Runner scenes. Needs the likeness confirmation. | Free |
| update_character | Changes a character's name, description, pictures or voice. | Free |
| delete_character | Deletes a saved character. | Free |
| make_character_sheet | Draws front, side and close-up of one person from one picture. Paid, charged once. | Paid |
| parse_script | Reads a script and shows each scene with its cast, model, length and price. Free. | Free |
| edit_scenes | Edits, removes, restores or adds Script Runner scenes before the clips are made. | Paid |
| get_job | Status and results, waits up to 50 s. | Free |
| list_jobs | Jobs, also by idempotency_key after a timeout or by Ad Studio run. | Free |
| cancel_job | Cancels a job that has not started (refunded). | Free |
| list_formats | Ad formats with prices per tier. | Free |
| list_products | Saved products to use in ads. | Free |
| create_product | Saves a product from its name and 1 to 8 photos, to reuse in every ad. | Free |
| get_product | One saved product with its photo links. | Free |
| create_ad | Starts a complete ad from a format. With auto it runs to the end within max_credits. | Paid |
| propose_ad | Proposes a format and price from a written brief. | Paid |
| create_ad_from_brief | Proposes and starts the ad in one call. With auto it finishes on its own within max_credits. | Paid |
| get_ad | State of an ad run, waits up to 50 s. | Free |
| approve_ad_step | Approves a review step and starts the next ones, or hands the rest to auto mode. | Paid |
| redo_ad_step | New take of one item (charged again). | Paid |
| motion_remix | A new version of your own clip per character, product or style: drafts, pick, finish. Replace mode and a person or face as target need likeness: true (since 2026-10-31); the precise swap stops at step mask for your check. | Paid |
| cancel_ad | Stops a run and refunds jobs that have not started. | Free |
| studio_list | Ad Studio studios with their cards, inputs and prices. | Free |
| studio_estimate | Exact price of one Ad Studio click, with the balance. Free. | Free |
| studio_check | Runs a studio's free checks before you pay (Ranking Shorts: every level and the variety between them). | Free |
| studio_run | Makes Ad Studio images: one charged job per image, refunded if it fails. | Paid |
| studio_helper | Runs an Ad Studio helper (a small flat price, see studio_list). link_scan reads one product page and returns its photos as your uploads, the name and a one-line description. | Paid |
| studio_series | A channel's series or a shop's project: what it remembers and its episodes. | Free |
| studio_series_save | Start or change a series: its notes, what the audience asked for next, or go back to an earlier episode. | Free |
| ad_series | A format's series or project: what it remembers and its takes. | Free |
| ad_series_save | Start or change a format's series: its notes, what the audience asked for next, or go back to an earlier take. | Free |
| studio_get_run | State of an Ad Studio click: every job, follow-up steps included, and the finished files. | Free |
Money rules for agents
- Call
estimate_costbefore any paid tool. It's free and can price the exact call:toolplusarguments. - Send
max_creditsand a freshidempotency_keywith every paid call. - Paid tools answer at once with a
job_idorrun_id. Pollget_joborget_adwithwait_seconds=50. - After a timeout, call
list_jobswith the sameidempotency_keybefore paying again. - Failed jobs are refunded automatically. Out of credits,
buy_credits_linkgives the user a link to the studio. No payments go through MCP. - Give every agent its own key with a daily cap. At the cap it gets
daily_limit_reachedand stops. - With
auto: true,create_adandcreate_ad_from_briefapprove each review step on their own while the whole run stays withinmax_credits. If the next step would go over, the run waits at that step withauto_stoppedand nothing more is charged.
Errors
Tool errors come back as a result with isError: true and the same codes as the REST API. Out of credits includes needed, balance and topup_url. A missing or wrong key is HTTP 401 with WWW-Authenticate.
{
"content": [
{
"type": "text",
"text": "Error insufficient_credits: This needs 63 credits and the balance is 10. ..."
}
],
"structuredContent": {
"error": {
"code": "insufficient_credits",
"message": "This needs 63 credits and the balance is 10. Buy credits to continue.",
"status": 402,
"needed": 63,
"balance": 10,
"charged": false,
"topup_url": "https://mobyvid.com/app/creditos?need=53"
}
},
"isError": true
}
Test with curl
The server answers plain JSON over POST, with no sessions, so curl works:
curl -s https://mobyvid.com/mcp \
-H "Authorization: Bearer $STAGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1.0"}}}'
curl -s https://mobyvid.com/mcp \
-H "Authorization: Bearer $STAGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "get_balance", "arguments": {}}}'