drio
Open app

Image Generation Worker Template

Source

Template to easily make an MCP server on Cloudflare

Catalog onlyCatalog onlySTDIO

Overview

This project is a minimal Cloudflare Worker template designed for generating images using the workers-mcp package and Cloudflare’s Workers AI.

To use this template, install the necessary dependencies, run the worker locally for testing, and then deploy it to Cloudflare.

  • Utilizes the flux-1-schnell model for image generation. - Minimal configuration and project structure for ease of use. - Ready for local development with Wrangler.
  1. Quickly set up an image generation service on Cloudflare.
  2. Experiment with different image generation models.
  3. Develop and test Cloudflare Workers locally before deployment.

Add to your AI client

Use these steps to connect Image Generation Worker Template in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "cloudflare-mcp-template-janwilmake": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "cloudflare-mcp-template-janwilmake": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "cloudflare-mcp-template-janwilmake": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "cloudflare-mcp-template-janwilmake": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "cloudflare-mcp-template-janwilmake": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "cloudflare-mcp-template-janwilmake": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-cloudflare-mcp-template-janwilmake"
      ]
    }
  }
}

FAQ

What is the flux-1-schnell model?

It is a model used for generating images, optimized for use with Cloudflare Workers.

How do I deploy the worker?

You can deploy the worker by running the command `npm run deploy` after setting up your project.

Is there any support for this template?

Yes, you can find support and documentation on the GitHub repository.7: