Skip to main content
Glama
frankdeno

FLUX Image Generator MCP Server

by frankdeno

quickImage

Generate images from text prompts using the FLUX model with default settings. Provide a description to create and save visual content.

Instructions

Quickly generate an image based on a text prompt with default settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the image to generate
customPathNoCustom path to save the generated image

Implementation Reference

  • The handler logic for the 'quickImage' tool within the CallToolRequestSchema handler. It validates the prompt argument, calls the shared generateImage function with default parameters and a custom filename, then constructs a text response with the image URL and local save path.
    case "quickImage": { // Validate parameters if (typeof args.prompt !== 'string') { throw new Error("Invalid prompt: must be a string"); } // Simple version with just a prompt const result = await generateImage(args.prompt, { saveImage: true, filename: `flux_quick_${Date.now()}.png`, customPath: typeof args.customPath === 'string' ? args.customPath : undefined }); // Return a plain text response with the image URL and save location let textContent = `Image generated\nLink: ${result.image_url}`; // Add information about where the image was saved if (result.local_path) { textContent += `\nImage saved to: ${result.local_path}`; } return { content: [ { type: "text", text: textContent } ], isError: false, }; }
  • The Tool schema definition for 'quickImage', specifying name, description, and input schema requiring a 'prompt' string and optional 'customPath'.
    export const QUICK_IMAGE_TOOL: Tool = { name: "quickImage", description: "Quickly generate an image based on a text prompt with default settings", inputSchema: { type: "object", properties: { prompt: { type: "string", description: "Text description of the image to generate" }, customPath: { type: "string", description: "Custom path to save the generated image" } }, required: ["prompt"] } };
  • src/index.ts:48-54 (registration)
    Registration of the 'quickImage' tool (as QUICK_IMAGE_TOOL) in the listTools request handler, making it available to clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ GENERATE_IMAGE_TOOL, QUICK_IMAGE_TOOL, BATCH_GENERATE_IMAGES_TOOL ], }));
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/frankdeno/flux-image-generator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server