AI-Multimodal-Campaign-Architect
Enables to plan, write, illustrate, and voice a full marketing campaign through an MCP pipeline that generates copy, moodboards, voiceovers, and images with automated guardrails and budget controls.
README
AI Multimodal Campaign Architect
Agentic Workflow · Model Context Protocol
An agentic MCP workflow that plans, writes, illustrates, and voices a full marketing campaign — with a human checkpoint before the expensive part. <p align="center"> <img src="public/pipeline.png" width="800"> </p>
Give it one prompt — "Launch a bold sneaker line targeting Gen Z" — and it runs an agentic pipeline of MCP tools that generates copy, a moodboard, a voiceover, a presentation pitch, and a final campaign image, with automated guardrails and a hard budget cap along the way.
See how it works : https://ai-multimodal-campaign-architect-gl808c9v7-nibha-dongre.vercel.app/
What it does
- Generate copy — Gemini produces a headline, body copy, target audience, core message, a detailed visual concept, and a ~15s voiceover script from a single campaign prompt.
- Fan out in parallel (
asyncio.gather, bounded by the slowest call, not their sum):- Build a moodboard from Unsplash to validate visual direction cheaply, before spending on image generation
- Synthesize a voiceover from the script (gTTS)
- Draft a presentation pitch — target audience, core message, CTA, design rationale
- Run guardrail checks — a rule-based pass (banned terms, length limits) and an LLM-based pass (unverifiable claims, tone alignment)
- Human-in-the-loop checkpoint — a person reviews the moodboard and confirms (or overrides) the visual direction before the pipeline spends anything on image generation.
- Generate the final image via Pollinations.ai, using the confirmed visual concept.
- Bounded auto-critique — any field that fails a guardrail check gets exactly one automated rewrite pass. No retry loops, no runaway cost — failures are logged for manual follow-up instead.
Pipeline
RECEIVE BRAND REQUIREMENT ──▶ GENERATE COPY ──┬──▶ BUILD MOODBOARD ─────┐
├──▶ GENERATE AUDIO ──────┤
├──▶ CREATE PITCH ────────┼──▶ HUMAN IN THE LOOP ──▶ GENERATE IMAGE
└──▶ RUN GUARDRAILS ──────┘
(parallel batch — asyncio.gather)
Tech stack
| Layer | Stack |
|---|---|
| MCP server | Python, FastMCP, Pydantic (typed tool schemas) |
| Copy / pitch / guardrails | Gemini API (gemini-flash-lite-latest) |
| Moodboard | Unsplash API |
| Image generation | Pollinations.ai (free, no key required) |
| Voiceover | gTTS |
| Frontend | Next.js (App Router), TypeScript, Tailwind CSS |
Only Gemini and Unsplash calls cost anything — both have generous free tiers, and a per-session budget cap enforces a hard ceiling regardless (see Cost & budget controls).
Project structure
.
├── server.py # MCP server — exposes each pipeline step as a typed tool
├── client.py # MCP transport client
├── orchestrator.py # Pipeline DAG: sequencing, parallel fan-out, budget enforcement
├── run_demo.py # Runs the 4 showcase campaigns end-to-end, writes campaign_outputs/
├── requirements.txt
├── .env.example
│
├── app/ # Next.js app router pages
├── components/ # DemoGrid, DemoModal, PipelineDiagram, ByokPanel, etc.
├── data/
│ ├── demos.ts # Auto-generated by scripts/build-demo-data.mjs — do not hand-edit
│ └── features.ts
├── public/
│ ├── demo.gif
│ └── demos/ # Campaign assets copied in at build time
├── scripts/
│ └── build-demo-data.mjs # Reads campaign_outputs/, populates data/demos.ts + public/demos/
└── package.json
Adjust this tree if your repo splits the Python backend and Next.js frontend into separate subfolders rather than a shared root.
MCP tools exposed
| Tool | Purpose | Cost |
|---|---|---|
generate_copy |
Headline, body copy, visual concept, voiceover script — the context source every other tool depends on | Gemini (small) |
generate_moodboard |
Unsplash search for reference imagery — a cheap way to validate direction before paid image generation | Free |
generate_image |
Final campaign image from a confirmed visual concept | Free (Pollinations.ai) |
generate_audio_asset |
Text-to-speech voiceover from the campaign script | Free (gTTS) |
create_presentation_pitch |
Target audience, core message, CTA, design rationale | Gemini (small) |
refine_content |
Regenerates a single field (headline / body copy / audio script) in isolation, keeping everything else fixed | Gemini (small) |
run_guardrail_check |
Rule-based screening: banned terms, headline/script length limits | Free |
run_llm_guardrail_check |
Model-based screening: unverifiable claims, tone alignment against brand context | Gemini (small) |
retrieve_brand_context |
RAG-style retrieval of brand voice/guidelines to ground copy generation | Free (stub — real embedding search is a planned extension) |
Cost & budget controls
CampaignOrchestrator tracks real, reported cost per call and enforces a hard per-session cap (budget_cap_usd, default $0.50). Once the cap is reached, further paid calls are refused outright — the pipeline doesn't crash, it just stops spending. Free tools (moodboard, audio, rule-based guardrails) are never blocked by the cap.
Getting started
Prerequisites
1. Generate campaign data (Python backend)
git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git
cd YOUR_REPO
pip install -r requirements.txt
cp .env.example .env
# fill in GEMINI_API_KEY and UNSPLASH_ACCESS_KEY in .env
In one terminal, start the MCP server:
python server.py
In another, run the demo campaigns:
python run_demo.py # all campaigns
python run_demo.py --campaign 1 # just one
This writes each campaign's output to campaign_outputs/campaign_N/.
2. Build and run the frontend
npm install
npm run build:demo-data # reads campaign_outputs/, populates data/demos.ts + public/demos/
npm run dev
Open http://localhost:3000.
Running the pipeline (BYOK)
The deployed site ships with pre-generated demo campaigns baked in at build time — no backend runs in production. Anyone can clone this repo and run the same pipeline against their own API keys following the steps above; no paid account, credit card, or approval process is required for either key.
Deployment
Only the Next.js frontend needs deploying — the Python backend is a local generation tool, not a runtime dependency of the deployed site. See components/ByokPanel.tsx for the in-app version of the run-it-yourself instructions.
Deployed on Vercel: import the repo, framework auto-detects as Next.js, no environment variables required for the frontend build.
License
Author
Built by Nibha S Dongre — an agentic MCP pipeline, end to end.
[View on GitHub →
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。