Model Context Protocol (MCP) Server for WhatsApp Automation
Connect WhatsApp Business Cloud API to AI assistants like Claude Desktop, Cursor, Windsurf, Antigravity, and autonomous LLM agents using SMSPort's official Model Context Protocol (MCP) server.
- Production MCP Endpoint:
https://mcp.smsport.in/mcp - Transport: JSON-RPC 2.0 over Stream / HTTP POST & SSE
- Authentication: Bearer API Key (
Authorization: Bearer sk_live_...) - Available Tools: 31 enterprise-grade tools across 5 operational modules
Architecture & Hierarchy Overview
The SMSPort MCP Server acts as an intelligent orchestration bridge between AI models and your Meta WhatsApp Business infrastructure:
graph TD
subgraph Level1["1. CLIENT RUNTIMES (Natural Language Prompts)"]
C1["Claude Desktop"]
C2["Cursor & Windsurf IDE"]
C3["Antigravity & Custom LLM Agents"]
end
subgraph Level2["2. SMSPORT MCP SECURITY GATEWAY"]
G1["Tenant Isolation Guard"]
G2["Deterministic PII Sanitizer (+91XX.. / a***@)"]
G3["Zod Parameter Validation"]
end
subgraph Level3["3. 31 SPECIALIZED MCP TOOL ENGINES"]
T1["Intelligence (5 Tools)
• Unreplied Leads
• Intent & Temp
• Safe Replies"]
T2["Campaigns (10 Tools)
• Link Attribution
• ROAS & Spend
• Control Runs"]
T3["Forms & Flows (6 Tools)
• Drop-off Funnels
• Resume OCR
• Lead Sources"]
T4["Live Inbox (5 Tools)
• Queue Health
• Thread History
• Tagging & Triage"]
T5["CRM & Health (5 Tools)
• 360 Profiles
• Sender Quality
• Macro Analytics"]
end
subgraph Level4["4. EXECUTION & DATA PLANE"]
DB[("PostgreSQL Multi-Tenant DB")]
WA["Meta WhatsApp Cloud API"]
end
Level1 -->|"JSON-RPC 2.0 (Bearer sk_live_...)"| Level2
Level2 --> Level3
Level3 --> Level42-Minute Quick Setup
Generate an API key with live environment access from Setup → API Integration (or /developer), then add the configuration below to your AI client:
1. Claude Desktop (`claude_desktop_config.json`)
{
"mcpServers": {
"smsport": {
"command": "npx",
"args": [
"-y",
"mcp-remote-client",
"https://mcp.smsport.in/mcp",
"--header",
"Authorization=Bearer sk_live_YOUR_API_KEY_HERE"
]
}
}
}2. Cursor / Windsurf IDE
Navigate to Settings → MCP → Add New MCP Server:
- Name:
smsport - Type:
Remote HTTP / SSE - URL:
https://mcp.smsport.in/mcp - Headers:
Authorization: Bearer sk_live_YOUR_API_KEY_HERE
3. Direct JSON-RPC Call
curl -X POST https://mcp.smsport.in/mcp \
-H "Authorization: Bearer sk_live_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "audit_unreplied_leads",
"arguments": {
"minWaitHours": 2,
"temperature": "hot",
"industryProfile": "recruitment"
}
}
}'PII Masking & Data Safety Standards
To ensure strict enterprise compliance when integrating with third-party LLMs:
- Phone Number Sanitization: Customer phone numbers in overview listings and previews are masked to
+91XXXXXXXX83format. - Text Preview & Summary Sanitization: Raw 10-15 digit phone numbers and email addresses (
s***@domain.com) in message previews and summaries are sanitized via regex before delivery. - No Inference-Based Mutations: State-changing operations (such as pausing campaign runs or saving drafts) require explicit parameters and exact UUIDs.
Complete Directory of All 31 Tools
1. Conversation & Lead Intelligence (5 Tools)
audit_unreplied_leads: Triages unanswered customer conversations. Ranks leads by wait time, urgency, and temperature (Hot/Warm/Cold) with PII-masked previews.analyze_conversation_thread: Deep intelligence on a single thread. Classifies intent (status_inquiry,purchase,recruitment,complaint,opt_out), sentiment, and generates an SLA-compliant draft reply.get_lead_intelligence: 360-degree customer profile: conversation sentiment, past form submissions, tags, and campaign attribution.search_conversations_by_intent: Filters chats across status inquiries, purchase interest, negative sentiment complaints, or keywords.get_campaign_conversation_insights: Aggregates sentiment, positive replies, and opt-out rates for leads originating from a specific campaign broadcast.
2. WhatsApp Campaigns Engine (10 Tools)
get_campaign_link_attribution: Button clicks, destination URL conversions, revenue, and Meta Flow / Form submissions with unique submitter rates.campaign_summary: Executive delivery and read metrics for a broadcast run.list_campaigns: Lists campaign runs with status, recipient count, and delivery rates.list_campaign_drafts: Lists scheduled or unlaunched campaign drafts.save_campaign_draft: Creates or updates a draft campaign with target audience lists.control_campaign_run: Pause, resume, or abort an active campaign run.campaign_comparison: Head-to-head comparison between two campaigns.campaign_spend: Meta conversation charges and total broadcast spend.campaign_hourly_latency: Sending throughput and message delivery lag per hour.campaign_builder_context: Available verified sender numbers, templates, and contact lists.
3. Interactive Forms & Flows Analytics (6 Tools)
list_forms: Lists active interactive forms and Meta Flows.query_form_submissions: Search form answers (e.g., location, years of experience, budget).get_form_funnel: Drop-off analysis from initial impression to final submission.get_form_lead_sources: Attribution breakdown (Campaign broadcast vs QR code vs Inbound WhatsApp).read_form_file_text: Extracts text from candidate resume attachments (PDF/DOCX).segment_form_leads: Isolates abandoned leads who started filling the form but dropped off.
4. Live Inbox & CRM Governance (10 Tools)
inbox_queue_status: Unassigned queue backlog, average wait time, and SLA breaches.list_inbox_conversations: Open, closed, and unread customer conversation threads.inbox_thread: Chronological chat messages with delivery and read receipt status.tag_inbox_conversation: Add or remove tags ('VIP', 'Escalated', 'Candidate').resolve_inbox_conversation: Mark conversation resolved or re-open closed tickets.sender_health: Meta phone number quality rating (GREEN/YELLOW/RED) and Tier limits.workspace_capabilities: Enabled channels, webhooks, and payment integrations.workspace_macro_analytics: 30/60/90 days messaging metrics and platform ROI.get_contacts_overview: Audience size, opt-in statistics, and contact list growth.get_contact_details: Detailed timeline and custom attributes for a single contact.
Frequently Asked Questions
Can AI agents automatically send replies?
Tools like audit_unreplied_leads and analyze_conversation_thread generate safe, context-aware proposed draft replies. You can review the draft or integrate it into an automated human-in-the-loop workflow.
Does the MCP server work with official WhatsApp Cloud API numbers?
Yes. SMSPort connects directly to Meta's official WhatsApp Business Cloud API. All message dispatches, template broadcasts, and Flow events follow Meta's compliance policies.
