Deploy & Connect
Alerts, MCP & Scheduled Reports
From Prototype to Production
A marketing intelligence system on localhost is a demo. A marketing intelligence system that sends Slack alerts when competitors change their messaging, generates weekly performance digests automatically, and exposes its knowledge to other AI tools via MCP — that's a product.
This module covers the four pillars of production deployment: infrastructure, integrations, automation, and observability.
Production Deployment
Environment Management
Production requires careful separation of secrets, configuration, and code:
Health Checks
A /api/health endpoint that verifies:
Health checks enable zero-downtime deployments and automated recovery. The load balancer checks health before routing traffic, and monitoring systems alert when health degrades.
Error Tracking
Structured logging with context:
{ level: "error", service: "gateway", node: "brand_check",
query_intent: "content_draft", error: "Brand compliance below threshold",
compliance_score: 42, team: "content", timestamp: "..." }Structured logs enable powerful debugging. Instead of searching through unstructured text, you can filter: "show me all brand_check errors from the content team in the last 24 hours."
Slack Integration
Competitor Change Alerts
The highest-value integration. A scheduled job runs daily (or more frequently):
The alert format is a rich Slack message:
:rotating_light: Competitor Change Detected: Acme Corp
Positioning: "The affordable alternative" → "Enterprise-grade at every scale"
Pricing: Added new Enterprise tier at $25K/year
Features: Added "AI-powered analytics" to feature list
Last checked: 2 days ago
Source: competitor_profiles · 2024-11-15
[View Full Brief] [Acknowledge]This is the "killer feature" for marketing teams. Instead of manually checking competitor websites, the system watches for them and alerts on changes.
Slash Command
A Slack slash command for ad-hoc queries:
/marketing-intel What content themes drove the most engagement last week?The command routes through the full AI Gateway (classify → cache → guardrails → LLM → brand check → format) and returns the response as a Slack message with source citations and confidence indicators.
Weekly Digest
A scheduled message (e.g., every Monday at 9am) summarizing:
The digest is generated by running a structured query through the gateway and formatting the response as a rich Slack message with sections, metrics, and action items.
MCP Server
The Model Context Protocol (MCP) lets other AI tools use your marketing intelligence as a data source. You build an MCP server that exposes:
Tools
analyze_competitor(name) — returns a competitive brief with positioning, strengths, weaknesses, and recent changesget_trends(topic, time_range) — returns trend analysis with temporal datadraft_content(topic, format, audience) — generates brand-compliant contentcampaign_performance(campaign_id?) — returns campaign metrics and analysiscompetitive_brief() — returns a full competitive landscape summaryResources
Why MCP Matters
With MCP, a team member using Claude Desktop can ask "How does our positioning compare to CompetitorX?" and Claude will call your analyze_competitor tool, pulling live data from your marketing intelligence system. Your RAG pipeline becomes a data source for any MCP-compatible AI tool.
This is the difference between a standalone tool and a platform. MCP turns your marketing intelligence into infrastructure that other tools build on.
Scheduled Reports
Daily: Competitor Monitoring
Runs every morning. Checks each competitor profile for changes. If changes are detected, sends Slack alerts. If no changes, logs "no changes detected" (useful for confirming the system is running).
Weekly: Campaign Performance
Runs every Monday. Aggregates campaign metrics from the past week. Generates a performance summary with:
Monthly: Competitive Landscape
Runs on the 1st of each month. Generates a comprehensive report:
Scheduled reports use the same AI Gateway as interactive queries — they benefit from the same caching, guardrails, and brand compliance checks.
Monitoring & Observability
Metrics Dashboard
Track the operational health of the system:
Alerts
Automated notifications when something goes wrong:
ROI Tracking
Marketing leadership wants to know: "Is this system worth it?" Track:
Operations Runbook
Document the common issues and how to resolve them:
What You'll Build
Glossary
| Term | Meaning |
|---|---|
| MCP | Model Context Protocol — a standard for exposing AI tools and resources to other AI systems |
| Competitor change detection | Comparing current vs previous competitor data to identify and alert on changes |
| Scheduled report | An automated, recurring analysis generated and delivered without user intervention |
| Health check | An endpoint that verifies system components are functioning correctly |
| Runbook | Documentation of common issues, their symptoms, and resolution steps |
| Cache hit ratio | Percentage of queries served from cache vs computed fresh |
This is chapter 6 of AI Marketing Intelligence.
Get the full hands-on course for $100 and build the complete system. Your projects become your portfolio.
View course details