KosmoKrator

ai

fal.ai MCP Integration for OpenAI Agents SDK

Connect fal.ai to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 5 read 2 write API key auth

Connect fal.ai to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

fal.ai MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-fal": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=fal",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=fal --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only fal.ai instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

fal.ai Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the fal.ai integration catalog.

MCP toolSource functionTypeDescription
integration__fal__fal_list_models fal.fal_list_models Read List available fal.ai models. Returns model IDs, descriptions, and capabilities.
integration__fal__fal_submit_request fal.fal_submit_request Write Submit a generation request to a fal.ai model. Returns the request ID for tracking. Poll get_request_status for progress.
integration__fal__fal_get_request_status fal.fal_get_request_status Read Get the status of a submitted fal.ai request. Returns queue position and processing state.
integration__fal__fal_get_result fal.fal_get_result Read Get the result of a completed fal.ai request. Returns generated media URLs and metadata.
integration__fal__fal_list_files fal.fal_list_files Read List files stored in fal.ai storage. Returns file names, URLs, and metadata.
integration__fal__fal_upload_file fal.fal_upload_file Write Upload a file to fal.ai storage for use as model input. Returns the file URL.
integration__fal__fal_get_current_user fal.fal_get_current_user Read Get current fal.ai user profile and account information.

Related fal.ai Pages