Skip to main content

Wafle-Imago — universal MCP server for AI image generation. Free via Cloudflare Workers AI or NVIDIA NIM.

Project description

Wafle-Imago — Universal MCP Server for AI Image Generation

Imago (Latin: image, likeness, representation). From the root of "imagine" and "imagery".

Wafle-Imago turns words into images. A universal MCP server that works with any MCP-compatible client (OpenCode, Claude Desktop, Cursor, Windsurf, etc.). Supports multiple backends with automatic fallback, built-in security, and audit logging.

Quick Start

pip install wafle-imago
wafle-imago --backend cloudflare

Requires Cloudflare or NVIDIA credentials in .env (see Configuration).

Backends

Backend Images Cost Auth Limits
cloudflare FLUX.1 Schnell, SDXL, FLUX.2 Klein $0 CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN 10k neurons/day (~900 images)
nvidia FLUX.1 Dev/Schnell, FLUX.2 Klein $0 NVIDIA_API_KEY 1k req/month
pollinations ❌ Deprecated (HTTP 402)
hf ⚠️ Credits depleted (resets monthly) $0 HF_TOKEN Rate-limited

Configuration

1. Get Free Credentials

Cloudflare Workers AI (recommended — 900 images/day free):

  1. Sign up at https://dash.cloudflare.com/sign-up/workers-and-pages (no credit card)
  2. Go to Workers AI → "Use REST API" → copy Account ID + create API Token
  3. Add to .env:
CLOUDFLARE_ACCOUNT_ID=your_account_id
CLOUDFLARE_API_TOKEN=your_api_token

NVIDIA NIM (alternative — 1k req/month):

  1. Sign up at https://build.nvidia.com (no credit card)
  2. Get API key
  3. Add to .env:
NVIDIA_API_KEY=nvapi-...

2. Add to MCP Client

{
  "mcpServers": {
    "wafle-imago": {
      "command": ["wafle-imago", "--backend", "cloudflare"],
      "description": "AI image generation via Cloudflare Workers AI (free)"
    }
  }
}

CLI Options

wafle-imago                          # MCP stdio mode (default: cloudflare)
wafle-imago --backend nvidia          # Use NVIDIA NIM backend
wafle-imago --http --port 8000       # HTTP SSE mode
wafle-imago --backend cloudflare     # Cloudflare Workers AI
wafle-imago --version                # Show version

MCP Tools

Tool Description
generate_image Generate image from text prompt
generate_video ❌ Not available on free backends
list_models Available models with pricing
get_balance Check auth status / backend mode

Security

  • Prompt validation (NSFW, injection blocking)
  • Rate limiting (configurable)
  • Audit logging (JSONL)
  • safe parameter for content safety

Requirements

  • Python 3.10+
  • Windows, macOS, Linux
  • One free Cloudflare or NVIDIA account

Installation from Source

git clone https://github.com/creandoaldia/wafle-imago.git
cd wafle-imago
pip install -e .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wafle_imago-0.2.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wafle_imago-0.2.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file wafle_imago-0.2.1.tar.gz.

File metadata

  • Download URL: wafle_imago-0.2.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for wafle_imago-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3d217be3d4cc3f97e0ad3e50f4b3d57de9570ae58cad4d60d9f025a82ff2a49b
MD5 c8eabd86db35ac6432fa16a8ddaa154e
BLAKE2b-256 41f18994a8e1733752af53597ff0d760efe625c180b0bee1c73a7f40b1a7bb7a

See more details on using hashes here.

File details

Details for the file wafle_imago-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: wafle_imago-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for wafle_imago-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1038b54a7a0483391819da3c7b7a4bc1cd79fd78422ee2b6be640a451a66fc07
MD5 b08d357c7653685493c538c84db0ed9b
BLAKE2b-256 8fc16e8a7208d1acb01c501fc28c3e198acb3d0f78d70806fc5c50fb4413e9ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page