fal-ai-mcp-server

NusratJahanShawon/fal-ai-mcp-server

3.2

If you are the rightful owner of fal-ai-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The fal.ai Image Modifier MCP Server is an HTTP server that provides AI-powered image modification services via fal.ai, with optional integration for posting images to Slack. It is designed to be deployed on Railway and can be used as a custom MCP server in Runbear.

Tools
4
Resources
0
Prompts
0

fal.ai Image Modifier MCP Server

MCP HTTP server exposing AI image modification via fal.ai, with optional Slack posting. Deployable to Railway and consumable by Runbear as a custom MCP server.

Quick Start

  1. Install
npm install
  1. Set environment variables (create a local .env):
  • FAL_API_KEY: fal.ai API key
  • SLACK_BOT_TOKEN: Slack bot token
  • PORT: optional; defaults to 3000
  1. Run locally
# PowerShell example
$env:FAL_API_KEY="..."; $env:SLACK_BOT_TOKEN="..."; $env:PORT="3000"; npm start

Health: http://localhost:3000/health MCP SSE: http://localhost:3000/sse

Tools

  • modify_image: Modify an image using a text prompt; returns a URL.
  • send_to_slack: Post an image URL to a Slack channel.
  • modify_and_send_to_slack: Modify then post to Slack.
  • modify_slack_file_and_send: Provide a Slack file_id or url_private, plus prompt and channel_id. The server downloads the Slack file using your bot token, converts it to a data URL, modifies it via fal.ai, and posts the result back to Slack.

Example: modify a Slack file and send back

Call the tool with one of file_id or url_private:

{
  "name": "modify_slack_file_and_send",
  "arguments": {
    "channel_id": "C01234567",
    "prompt": "make it anime style",
    "file_id": "F06ABC123",
    "model": "flux-pro-kontext"
  }
}

or

{
  "name": "modify_slack_file_and_send",
  "arguments": {
    "channel_id": "C01234567",
    "prompt": "add a sunset background",
    "url_private": "https://files.slack.com/files-pri/Txxx-Fxxx/download/file.png",
    "model": "flux-dev"
  }
}

Deploy to Railway

  • Commit and push this repo to GitHub.
  • On Railway: New Project → Deploy from GitHub → select repo.
  • Add variables: FAL_API_KEY, SLACK_BOT_TOKEN, optional DEFAULT_SLACK_CHANNEL_ID (Railway injects PORT).
  • After deploy, your MCP endpoint is: https://<your-app>.railway.app/sse.

Use in Runbear

  • Add a custom MCP server in Runbear:
    • Name: fal-image-modifier
    • URL: https://<your-app>.railway.app/sse

Slack Setup

  • Create a Slack app with a Bot Token (xoxb-...).
  • Scopes needed: chat:write, files:read (for Slack file downloads), plus any channel read scopes required by your workspace policy.
  • Invite the bot to your target channel.

Notes

  • Requires Node 18+.
  • Set FAL_API_KEY and SLACK_BOT_TOKEN for production.