MCP fal.ai 图像服务器让您能无痛地使用文本提示生成图像。它结合了 fal.ai 和模型上下文协议(MCP),并且可以直接与 AI IDE(如 Cursor 和 Windsurf)集成,为图像生成带来极大便利。
需要安装 Node.js 18+,并获取 fal.ai API Key。
{
"mcpServers": {
"fal-ai-image": {
"command": "npx",
"args": ["-y", "mcp-fal-ai-image"],
"env": {
"FAL_KEY": "YOUR-FAL-AI-API-KEY"
}
}
}
}
从 IDE 使用 generate-image 工具即可开始生成图像。
💡 典型工作流程: 描述您想要的图像(例如,“生成一个红色苹果”,“使用模型 fal-ai/kolors 生成一个红色苹果”),并立即在 IDE 中获得结果。
此工具的安装主要通过配置 MCP 完成,具体配置步骤见上文“快速开始”部分。
以下是一些示例提示:
generate an image of a red applegenerate an image of a red apple using model fal-ai/kolorsgenerate 3 images of a glowing red apple in a futuristic city using model fal-ai/recraft-v3, square_hd, 40 inference steps, guidance scale 4.0, safety checker on支持的参数:提示词、模型 ID(任何 fal.ai 模型)、生成图像数量、图像尺寸、推理步骤、指导比例、安全检查器。
图像会保存到本地,文件路径在响应中显示。有关模型 ID,请访问 fal.ai/models。
此工具专为以下用户设计:
./generated-images/
image_.png 。Error: Authentication failed with fal.ai API
解决方法:
FAL_KEY 是否正确设置。Error: Failed to connect to fal.ai server
解决方法:
https://api.fal.ai 可访问。Error: Invalid input parameters
解决方法:
MIT License © 2025 Madhusudan Kulkarni