generate_campaign_reportLABSCO SUMMARY
A narrow contract, and it says so out loud.
The blocked-response contract is the part worth copying: when a live dependency is missing, the tool returns a structured refusal instead of a plausible number, which is exactly the failure mode you want from a reporting tool. The demo mode makes it testable end to end before any ad account is connected.
What it is
A Python MCP server for campaign work that is unusually explicit about its own boundaries. Four tools are the supported surface; other modules in the tree are marked as internal and not to be treated as features. Every response carries a status of ok or blocked, the mode it ran in, and a reason when it is blocked — so a missing credential returns a structured refusal rather than invented numbers.
What you get
generate_campaign_report— deterministic campaign reporting, with live runs able to persist normalised campaign snapshots for replayoptimize_campaign_budget— provider-backed budget optimisation, with decision history retained on live runscreate_campaign_copy— ad copy generation through the configured AI provideranalyze_audience_segments— audience segmentation, demo-only today- A demo mode toggled with
DEMO_MODE=truethat returns deterministic sample data, which makes contract testing and demos possible with no platform credentials at all
Requirements
In demo mode, nothing. For live runs, DEMO_MODE=false plus platform credentials, and for copy generation an AI provider — AI_PROVIDER=openai with OPENAI_API_KEY and AI_OPENAI_MODEL, or the Anthropic and Gemini equivalents through ANTHROPIC_API_KEY or GEMINI_API_KEY. Set SECRET_KEY and ENCRYPTION_KEY for stable live behaviour; without ENCRYPTION_KEY the process disables API-key encryption and logs a warning. Python 3.12 or 3.13 with uv sync; the documented client entry runs uv run python -m src.server. stdio is the only supported transport.
Setup effort
Build from source — git clone https://github.com/Mohit4022-cloud/Marketing-Automation-MCP-Server.git && cd Marketing-Automation-MCP-Server
USE CASES
Producing a campaign report you can re-run
Generate the report and get the same structure every time, with a snapshot persisted for replay on live runs.
Reallocating spend across campaigns
Run the optimisation and read the recommendation together with the decision history it recorded.
Drafting ad copy against the configured model
Generate copy through your own provider key rather than a fixed vendor.
Demonstrating the flow with no ad account
Run everything in demo mode to get deterministic sample data for a walkthrough or a contract test.
4 tools
Listed in project docs. Your client may show a different list.
optimize_campaign_budgetcreate_campaign_copyanalyze_audience_segmentsBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
- uv on PATH
- Python 3.12 or 3.13
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/Mohit4022-cloud/Marketing-Automation-MCP-Server.git && cd Marketing-Automation-MCP-Server
uv sync --python 3.13 --extra dev
cp .env.example .envIn .env, set DEMO_MODE=true to run with no credentials at all. For live mode set DEMO_MODE=false, AI_PROVIDER and that one provider's key (for example OPENAI_API_KEY), plus at least one ad-platform credential set for reports and optimisation.
MCP Clients
Claude Desktop
{
"mcpServers": {
"marketing-automation": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_MARKETING_AUTOMATION_MCP_SERVER>",
"run",
"python",
"-m",
"src.server"
]
}
}
}