wa-meta-ai
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
WhatsApp Meta AI (wa-meta-ai)
An open-source REST API, CLI, Python SDK, and MCP server for two-way interaction with Meta AI on WhatsApp Web — send text or reference-image prompts, auto-continue batched replies (15+ images), convert .webp → .png/.jpg, save clean images directly into your project folder, and clear chat history between series using your own WhatsApp account.
Disclaimer: Uses Playwright to automate official WhatsApp Web in Chromium. Use responsibly with built-in cooldown/jitter (
WA_COOLDOWN_SEC,WA_JITTER_SEC) and preferably on a secondary WhatsApp number.
Why This Exists
WhatsApp Web does not index Meta AI generated images into "Media, links, and docs" (
0items) and offers no bulk-select/download UI.Meta AI images are delivered inline as full-resolution (
1600×1600/1920×1280/1184×2096)mmg.whatsapp.net/..._n.encURLs withContent-Type: application/octet-stream— even though the payload is plain browser-decodable WebP.wa-meta-aiautomates the entire loop cleanly: prompt (with optional reference image) → settle detection → magic-byte sniffing → PNG/JPG conversion → clean deduplicated output.
Related MCP server: Agnes MCP Server
Features
Two-Way Prompting (
POST /generate): Send a prompt (plus optionalref_image) to Meta AI, wait for all generated images to settle, and download full-resolution files.Reference Image (
ref_image): Attach a local photo (Photos & videos) along with your prompt for consistent character/style variations.Auto-Continue Batches (
target_count): Automatically sends"continue"across batched Meta AI replies untiltarget_countunique images are saved.Batch Series Runner (
POST /generate/batch): Run a list of scene prompts intoseriessubfolders with optionalclear_after: true.Clean Output (
output_dir): Save directly into any project folder with zero metadata clutter by default (WA_SAVE_MANIFEST=false) and SHA-256 filename deduplication.Async Jobs & Webhooks: Pass
?async=true(orasync_mode: true) for202 Accepted+job_id, pollGET /jobs/{job_id}, or receivewebhook_urlPOST callbacks.OpenAI-Compatible Endpoint (
POST /v1/images/generations): Drop-in backend for tools using OpenAI'simages.generate()(urlorb64_json).Built-in MCP Server (
wa-meta-ai mcp): Exposesauth_status,generate_images,generate_batch,extract_history,clear_chat, andlist_mediato AI agents (Antigravity, Claude Desktop, Cursor, etc.).Self-Serve QR Dashboard (
GET /): Live auto-refreshing QR setup page + Swagger docs at/docs.
Quick Start
1. Install
pip install wa-meta-ai(All Python dependencies install automatically. Uses your existing Google Chrome, or auto-installs Chromium on first launch if needed.)
2. Start the Server
wa-meta-ai serveOpen
http://127.0.0.1:8000/(or the opened Chrome window) and scan the WhatsApp Web QR code once.Your session persists in
wa_profile/(local./wa_profileif present, otherwise~/.wa-meta-ai/profile).Interactive API docs:
http://127.0.0.1:8000/docs
Usage Examples
REST API (POST /generate)
curl -X POST http://127.0.0.1:8000/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "Place this same person in a sunlit European cafe wearing a beige trench coat",
"ref_image": "portrait.png",
"output_dir": "./assets/cafe_series",
"format": "png",
"target_count": 2
}'CLI
wa-meta-ai generate "Generate 4 cyberpunk street scenes" --series cyberpunk --format png
wa-meta-ai generate "Neon rain portrait" --ref portrait.png --target-count 2
wa-meta-ai extract --chat "Meta AI" --scrolls 30 --format png
wa-meta-ai clearOpenAI Python SDK Drop-In
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="unused")
res = client.images.generate(prompt="Cute futuristic robot", n=2)
print(res.data[0].url)MCP Server (mcp_config.json)
Add to Antigravity / Claude Desktop / Cursor:
{
"mcpServers": {
"wa-meta-ai": {
"command": "wa-meta-ai",
"args": ["mcp"]
}
}
}If wa-meta-ai serve is already running, wa-meta-ai mcp automatically proxies calls through it so Chrome's profile is never locked by two processes.
Optional: Docker (Headless Linux / VPS)
docker compose up --build -d
# Open http://127.0.0.1:8000/ to scan the WhatsApp QR codeAPI Endpoints
Method | Endpoint | Description |
|
| Self-serve QR setup & status dashboard |
|
| Service & WhatsApp auth status |
|
|
|
|
| Live PNG screenshot of WhatsApp Web QR code |
|
| Send prompt (+ optional |
|
| Run a list of prompts sequentially ( |
|
| List or poll async generation jobs |
|
| Scroll chat history upward & download inline media |
|
| Clear Meta AI chat between series |
|
| List or fetch saved media |
|
| OpenAI-compatible image generation endpoint |
Configuration (.env)
Copy .env.example to .env — loaded automatically by python-dotenv:
Variable | Default | Description |
|
| Server bind host |
|
| Server port |
|
| Default output folder when |
|
| Write |
|
| Output image format ( |
|
| Minimum delay between prompts |
|
| Random extra delay ( |
|
| Optional |
|
| Run Chromium headless |
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate AI images and videos from your agent: list models, start jobs, and fetch the results.
Generate and edit images, video, voice, lip-sync and 3D models from your AI agent.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate images, video, and audio with Glif's media-generation agent
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate, edit, and analyze images using Google's Gemini image generation models including Nano Banana Pro (gemini-3-pro-image-preview).201 npm18MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to generate images and videos via the Agnes AI API, supporting text-to-image, image-to-image, and video generation.31-
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to generate and edit local PNG images from text prompts or reference images through an OpenAI-compatible Images API, with selectable style templates and offline reference examples.MIT
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to generate and edit images from text prompts, reference images, or saved files through any OpenAI-images-compatible backend, returning each result inline as a downscaled preview (full-res on disk) so the agent can inspect and iterate. Also supports prompt expansion, exact-pixel resizing/recompression, and listing or re-serving saved images.AGPL 3.0