Skip to main content

MCP server

Rolling out

The scoped permissions, spending limits, Connected apps and the full tool set described here are rolling out now. Some may not be live on your account yet.

FunAI runs a remote Model Context Protocol server. It lets an AI assistant generate images, video, audio, 3D and text with FunAI's models, Tools and templates, on your account's credits.

Endpointhttps://mcp.funai.art
TransportStreamable HTTP (one endpoint: POST, DELETE)
Protocol versions2025-11-25, 2025-06-18, 2025-03-26
AuthenticationOAuth 2.1 (recommended), or an API key for scripts
Setup pagefunai.art/mcp

Connect​

Every client below needs the URL only. It finds FunAI's sign-in on its own (RFC 9728 protected-resource metadata). You approve the connection on funai.art and choose a spending limit there. No API key to create or paste.

Claude (claude.ai and Claude Desktop)​

  1. Settings → Connectors → Add custom connector.
  2. Name it FunAI and paste https://mcp.funai.art.
  3. Sign in to FunAI, review the permissions, pick a spending limit, then choose Allow.

Claude Code​

claude mcp add --transport http funai https://mcp.funai.art

Then run /mcp in Claude Code, select funai, and choose Authenticate.

Cursor​

Use Add to Cursor on funai.art/mcp, or add this to ~/.cursor/mcp.json:

{ "mcpServers": { "funai": { "url": "https://mcp.funai.art" } } }

Open Settings → MCP. FunAI shows Needs login: click it and sign in.

VS Code​

Use Install in VS Code on funai.art/mcp, or run MCP: Add Server… with:

{ "servers": { "funai": { "type": "http", "url": "https://mcp.funai.art" } } }

VS Code asks you to authenticate with FunAI the first time the server starts.

Scripts and other clients​

A client with MCP OAuth support needs only the URL. A script that cannot do OAuth sends an API key from developers.funai.art/keys as Authorization: Bearer <key>. Read the key from an environment variable. Never commit it to a repository or put it in a project config file.

curl https://mcp.funai.art \
-H "Authorization: Bearer $FUNAI_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":"my-script","version":"1.0"}}}'

initialize returns an Mcp-Session-Id header. Send it on every later request, and DELETE the endpoint with it when you are done.

Permissions and spending​

When you connect over OAuth you approve these permissions. You can switch off all but read.

ScopeAllows
readBrowse models, prices, Tools and templates; check jobs; list your generations
generateGenerate, run Tools and templates, upload input files: spends credits
editorDrive the FunAI video editor you have open, and render saved projects
account:readSee your credit balance
  • Spending limit. You choose how much one connection may spend every 30 days: $5, $10 (the default), $25 or $50, or no limit after a warning. When the limit is reached, paid calls fail with HTTP 403 spend_cap_exceeded until the window rolls over or you raise the limit. Right after you disconnect a connection, a paid call can also fail with a 403 grant_inactive tool error for up to a minute, before the client is asked to sign in again.
  • Billing. Over OAuth, generations spend your FunAI credits per credit, at studio prices. Plan allowances described as "unlimited" do not apply to MCP. With an API key (created at developers.funai.art/keys), usage bills the prepaid API balance.
  • Lifetime. A connection lasts 90 days, then you approve it again. Refreshing tokens never extends it.
  • Revoke. Studio → Settings → Connected apps lists every connection with its permissions, limit and last use. Disconnect there. It takes effect within a minute.
  • Tokens. The token a client holds works only on mcp.funai.art. It carries an audience, and the FunAI API refuses it. It never carries staff or admin permissions.

Tools​

The live list, with input schemas, is served at https://mcp.funai.art/tools.json and through MCP tools/list.

ToolScopeCostWhat it does
list_modelsreadfreeBrowse FunAI's model catalogue (hundreds of image, video, audio, 3D and text models), with price per run in credits and US dollars, maker, capabilities and limits.
get_model_schemareadfreeEverything a model accepts, as JSON Schema per workflow such as text_to_video or image_to_video.
estimate_costreadfreeEstimate the credit cost of a generation before running it.
get_credit_balanceaccount:readfreeCheck the credit balance of the account this connection authenticates as.
list_toolsreadfreeList FunAI's one-shot Tools (face swap, upscale, background removal, product shots, lip sync, ...).
list_templatesreadfreeList ready-made templates: a look or format with the prompt already written.
upload_filegeneratefreeBring an image, video, audio or 3D file into FunAI to use as a generation input (image-to-video, edits, upscale, face swap, lip sync...).
generate_imagegeneratespends creditsGenerate an image from a text prompt, or edit one (image_url, mask_url, image_urls for references).
generate_videogeneratespends creditsGenerate a video from a text prompt, or animate an image (image_url / start_frame_url, end_frame_url), restyle a video (video_url) or lip-sync to audio (audio_url).
generate_audiogeneratespends creditsGenerate audio (speech, music or sound effects) from a text prompt, or transform audio (audio_url) or add sound to a video (video_url).
generate_3dgeneratespends creditsGenerate a 3D mesh from a text prompt or from an image (image_url / image_urls).
generate_textgeneratespends creditsGenerate text from a prompt using a FunAI-hosted model, optionally about an image, video or audio (captioning, transcription).
run_modelgeneratespends creditsRun any FunAI model with its full set of inputs - every option and media input it accepts, not just a prompt.
run_toolgeneratespends creditsRun one of FunAI's Tools (from list_tools) on your inputs.
apply_templategeneratespends creditsGenerate from a template (from list_templates) by filling its slots.
get_job_statusreadfreeCheck a generation job started by a generate tool.
list_generationsreadfreeList this account's generations, newest first, with status, prompt and a link to each result.
cancel_jobgeneratefreeStop a generation.
editor_sessionseditorfreeList the FunAI video editors the user has open in the browser.
editor_commandseditorfreeThe commands an open editor offers (Editor API v1): clips, captions, transcript, transitions, AI tasks, motion titles, auto edit, history and playback, with their parameters.
editor_runeditorspends creditsRun one Editor API command in the user's open editor, exactly as if they had done it: it lands as one undo entry and the editor saves it.
render_projecteditorspends creditsRender a saved editor project to a video file on the server, with no browser open.
render_statuseditorfreeStatus of a server render started by render_project, with the file URL once it is done.

Media inputs​

The generate tools take image_url, image_urls, start_frame_url, end_frame_url, video_url, audio_url and mask_url. Each must be a public https URL. For a local file, call upload_file. It returns a presigned PUT URL (or takes small files as base64) and gives back a private file_url you can pass to any generation tool.

Any model, with its own parameters​

get_model_schema(model_id) returns a model's inputs as JSON Schema, one per workflow, with its price and an example. run_model(model_id, inputs) runs it with exactly those inputs, so you can reach every model in the catalog, not just the common parameters.

Long jobs and stopping​

Fast jobs finish inside the call. Clients that accept text/event-stream keep the call open while a video renders and receive notifications/progress. After three minutes you get a job_id instead. Check it with get_job_status.

cancel_job is free while a job is queued. Once the provider has started, stopping costs the full price and the result is still delivered. The tool says so and asks the assistant to confirm with you before passing accept_charge: true.

Results​

A result gets a shareable funai.art link that opens without signing in. Pass private: true to keep it private. Images also come back inline.

Resources and prompts​

  • Resources: funai://guide (this page in short), funai://models/{model_id} and funai://jobs/{job_id}.
  • Prompts: product-video, storyboard, edit-photo.

Limits​

LimitValue
Requests per connection240 per minute
Paid tool calls per connection30 per minute
New sessions per connection30 per minute
Request body1 MB (use upload_file for media)
Upload size (presigned PUT)100 MB

Over a limit, you get HTTP 429 with Retry-After. Browser requests must come from an allowed Origin. Desktop apps, CLIs and server-side connectors send none and are unaffected.

Errors​

  • 401 with WWW-Authenticate. Not signed in, or the connection was revoked or expired. The client runs the OAuth flow again. Connections made before November 2026 must reconnect once to choose a spending limit.
  • A tool error with 403 spend_cap_exceeded or grant_inactive. The connection reached its spending limit, or was disconnected less than a minute ago. Raise the limit, or reconnect.
  • 403 insufficient_scope. The connection was not given the permission that tool needs. Reconnect and allow it.
  • A tool result with isError: true. The tool ran and failed. For example, the model does not accept that input, or you have insufficient credits. The text says why, and the assistant can correct its arguments and retry.

Discovery​

  • Protected-resource metadata: https://mcp.funai.art/.well-known/oauth-protected-resource
  • Authorization server: https://api.funai.art/auth (RFC 8414 metadata, Dynamic Client Registration, PKCE S256)
  • Registry entry: https://mcp.funai.art/server.json. Server card: https://mcp.funai.art/.well-known/mcp/server-card.json