simple-fal-mcp
v0.1.2
Published
Model Context Protocol (MCP) server for fal.ai model discovery, execution, and ephemeral local workspaces.
Maintainers
Readme
simple-fal-mcp
Model Context Protocol (MCP) server for Codex and Claude Code with fal model discovery, execution, pricing, request follow-up, temp workspaces, and local media post-process.
Current scope:
- normal fal model endpoints only
- queue and sync execution
- image, video, and audio generation workflows
- local temp workspace management and media finishing
- no realtime/websocket flows in v1

Tools
fal_status: always available; returns config/auth/capability state, setup-web state, media availability, saved cursors, and workspace summary.fal_setup_web: local setup panel controller with actionsstatus,start,stop.fal_model: model discovery tool with actionssearch,next,get,pricing,estimate.fal_cost: pricing/cost tool with actionsprice,estimate,usage,usage_next,request.fal_run: submits one model run, supports local-file uploads, and saves request state in a temp workspace.fal_request: request follow-up tool with actionsstatus,wait,result,materialize,cancel,history,history_next.fal_workspace: local workspace manager with actionslist,get,delete,cleanup.fal_media: local media tool with actionsinspect,open,reveal,image_convert,image_resize,video_convert,video_trim,video_reverse,video_concat,image_sequence_to_video,extract_frame,mux_audio,audio_convert,audio_reverse,audio_concat.
Quick flow examples:
fal_model({ "action": "search", "query": "kling image to video" })fal_model({ "action": "get", "endpointId": "fal-ai/kling-video/o1/standard/image-to-video", "schemaMode": "summary" })fal_run({ "endpointId": "fal-ai/nano-banana-2", "input": { "prompt": "..." } })fal_request({ "action": "wait", "runId": "..." })fal_media({ "action": "image_resize", "workspaceId": "...", "inputPath": "runs/.../artifacts/01-images-0.png", "width": 1280, "height": 720, "fit": "cover" })
Install (npx)
Requirements:
- Node
>= 20.19.0 ffmpegandffprobefor video/audio actions
Codex
codex mcp remove simple-fal
codex mcp add simple-fal -- \
npx -y simple-fal-mcp@latestAsk your agent to run fal_status, call fal_setup_web with action: "start" if needed, and then send you setupWeb.url.
Optional: pass keys via env when adding:
codex mcp add simple-fal -- \
--env FAL_KEY="$FAL_KEY" \
--env FAL_ADMIN_KEY="$FAL_ADMIN_KEY" \
-- npx -y simple-fal-mcp@latestClaude Code
claude mcp remove simple-fal
claude mcp add --transport stdio simple-fal -- \
npx -y simple-fal-mcp@latestAsk Claude Code to run fal_status, call fal_setup_web with action: "start" if needed, and then share setupWeb.url.
Optional: pass keys via env when adding:
claude mcp add --transport stdio \
--env FAL_KEY="$FAL_KEY" \
--env FAL_ADMIN_KEY="$FAL_ADMIN_KEY" \
simple-fal -- \
npx -y simple-fal-mcp@latestHow To Use
Think of simple-fal-mcp as your "fal execution layer":
- discover live models
- inspect schema before spending money
- check price or estimate cost
- run with raw input and optional local-file uploads
- continue by saved
runIdorrequestId - finish outputs locally in a temp workspace
Typical flow
Add the MCP server with the
npxinstall command above.Ask your agent for setup status:
Run fal_status and tell me what is missing.
- If needed, ask for the setup link:
If setup web is not running, call fal_setup_web with action=start and give me setupWeb.url.
Open the link, save the fal key, and optionally save an admin key. In some clients, you may need to restart the agent process after key changes so all tools see refreshed auth cleanly.
Search and inspect before running:
Search fal for a Kling first/last-frame video model.Show me the schema summary and upload pointer hints for this model.Show me the live price and estimate a 5-second run.
- Run the model:
Submit this fal run and return the request id immediately.Wait for that run and fetch the result when it is done.
- Finish locally if needed:
Resize this frame to 1280x720 with cover.Mux this audio onto the video.Open the final file.
- Clean up later:
Show me the last workspace.Clean old fal temp workspaces.
What to ask your agent (examples)
- Setup:
Please configure simple-fal and give me the setup link.
- Discovery:
Find a cheap image-to-video model and show me the schema summary.
- Pricing:
Show me the live price for this endpoint and estimate a 5-second run.
- Execution:
Run this fal endpoint with these local files and save everything to a temp workspace.
- Follow-up:
Wait for my last fal run and fetch the result if it is done.
- Local media:
Resize this image to 1280x720 cover, reverse the final video, and open it.
Copy-Paste For AGENTS.md / CLAUDE.md
You can add explicit usage instructions like this:
If user uses simple-fal-mcp:
1) Setup flow
- Call fal_status.
- If setup is incomplete, call fal_setup_web(action=start) and return setupWeb.url.
- Tell user to open the local setup page and save the key.
- When setup is finished or user asks to close it, call fal_setup_web(action=stop).
2) Discovery and pricing
- Use fal_model(action=search) to find endpoints.
- Use fal_model(action=get, schemaMode=summary) before requesting raw OpenAPI.
- Use fal_cost(action=price) or fal_cost(action=estimate) before expensive runs when useful.
3) Run flow
- Prefer fal_run with wait=submit.
- Use uploadFiles for local files instead of pasting inline data.
- Follow queued runs with fal_request(action=wait|status|result).
- Use fal_request(action=materialize) if the provider run finished but local files are missing.
4) Workspace and media
- Prefer workspace-relative follow-up by runId/workspaceId.
- Use fal_media for local resize/convert/trim/mux/reveal/open steps.
- Keep final files by copying them out of the temp workspace.
5) Safety
- Never expose fal keys, admin keys, or setup tokens in user-visible messages.
- Do not claim realtime/websocket support in v1.Configuration
Default paths:
$XDG_CONFIG_HOME/simple-fal-mcp/config.json$XDG_CONFIG_HOME/simple-fal-mcp/auth.json$XDG_CONFIG_HOME/simple-fal-mcp/state.json- or
~/.config/simple-fal-mcp/...
File roles:
config.json: runtime defaults and workspace settingsauth.json: fal API key and optional admin keystate.json: saved cursors, request history state, usage cursor state, and workspace index
Env precedence:
- CLI args
- environment variables
- config/auth/state files
Supported env vars:
FAL_KEYFAL_ADMIN_KEYFAL_DEFAULT_WAIT_MSFAL_POLL_INTERVAL_MSFAL_MODEL_SEARCH_LIMITFAL_ARTIFACT_DOWNLOAD_LIMITFAL_OBJECT_TTL_SECONDSFAL_DOWNLOAD_OUTPUTSFAL_WORKSPACE_ROOTFAL_WORKSPACE_AUTO_CLEANUP_HOURSFAL_SETUP_WEB_AUTO_STOP_MINUTES
Useful CLI args:
--fal-key--fal-admin-key--config--auth--state--setup-host--setup-port--setup-token
Local Workspace Model
Generated outputs are stored under a local temp root by default:
/tmp/simple-fal-mcp/workspaces/<workspace-id>/Each run gets a directory with:
request.jsonstatus.jsonresponse.jsonartifacts/
These files are temp state, not permanent storage. If you want to keep an output, copy it out of the workspace.
Local Development
bun install
bun run lint
bun run typecheck
bun run build
bun run self-testNotes
- Model discovery and schema inspection use fal’s live APIs instead of a hardcoded local catalog.
fal_rundefaults to queue mode withwait: "submit"and saves request state locally so later tools can recover byrunId.- Local uploads are resolved before submit and recorded in run metadata.
- Provider success and local artifact download are treated separately, so a completed run stays completed even when local mirroring needs a retry.
- The setup page does not expose the stored fal key or admin key back to the browser after either has been saved.
