Files
conversation-history/product-incubation/communications-infrastructure-plan.md
T

457 lines
19 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Communications Infrastructure Plan
> SquareMCP + FetcherPay + WhatsApp Business
> Created: 2026-05-15 | Updated: 2026-05-15 (v3 — SMS Removed) | Status: Draft for Analysis
---
## Scope Decision
**SMS is explicitly out of scope.** Channels in scope: voice (inbound/outbound) and WhatsApp Business API only.
---
## Context & Trigger
Two active business identities (squaremcp.com, fetcherpay.com), one operator. Need:
1. A business phone line per brand (voice only)
2. A WhatsApp Business number for customer/partner communication
3. Integration with Hermes MCP WhatsApp tooling (already built)
4. Minimal operational overhead — solo operator, no IT resources
---
## First Principles Decomposition
| Job To Be Done | Minimum Viable Solution |
|---|---|
| Appear credible as a business | Any non-personal number with voicemail greeting |
| Separate identity per brand | 2 distinct numbers OR 1 number with per-brand auto-attendant |
| WhatsApp reachability | A number registered to WhatsApp Business API |
| Programmatic messaging (Hermes MCP) | WhatsApp Business **API** — not just the App |
| Low ops burden | Managed cloud service, not self-hosted PBX |
| Clear upgrade path | Solution should scale to small team without re-architecture |
**First-principles conclusion:** Cloud telephony platform only. No self-hosted PBX. WhatsApp API required for Hermes MCP integration.
---
## Options Analysis
### Option A: OpenPhone + Physical SIM for WhatsApp
**Cost:** ~$23/mo (OpenPhone 2 numbers) + ~$5–10/mo SIM = ~$28–33/mo
**Pros:**
- Best-in-class calling UX — polished mobile/web app
- Quickest setup (~1 hr total)
- Reliable number approval for calls
**Cons:**
- Two completely separate systems — no unified dashboard
- WhatsApp Business App = no API access → Hermes MCP WhatsApp tools become useless
- SIM requires a physical device or forwarding hack
- Can't automate WhatsApp workflows
- Doesn't scale to team without migrating off WhatsApp App → API anyway
**Verdict:** Good for pure calling simplicity. Strategically incoherent given Hermes MCP investment.
---
### Option B: Google Voice for Business (Workspace)
**Cost:** ~$10/mo per number on top of Workspace = ~$20+ for 2 numbers
**Pros:**
- Integrated with Gmail/Calendar
- Simple, reliable, low friction
**Cons:**
- 1 number per user — workarounds required for 2 brands
- Google Voice numbers are **blocked by WhatsApp** registration — hard blocker
- No programmatic automation
**Verdict:** Eliminated. WhatsApp incompatibility is a binary blocker.
---
### Option C: Vonage (Ericsson) Business
**Cost:** ~$19.99+/mo per line + WhatsApp API usage fees
**Pros:**
- Official Meta WhatsApp Business API partner
- Unified voice + messaging platform
**Cons:**
- Enterprise-oriented pricing — overkill for solo operator
- Developer experience significantly worse than Twilio
- Smaller ecosystem, weaker documentation
**Verdict:** Technically viable. Twilio wins on DX.
---
### Option D: 3CX (Free Tier) + Twilio SIP Trunk
**Cost:** 3CX free (up to 10 users) + Twilio numbers/usage (~$5–10/mo)
**Pros:**
- More PBX features if needed later
- Twilio still handles WhatsApp API
**Cons:**
- Two systems to configure and maintain
- 3CX had a significant supply chain security incident (2023)
- Zero current benefit for a solo operator
**Verdict:** Worth revisiting at 5+ users. Not now.
---
### Option E: Twilio (Recommended) ✅
**What it is:** Twilio as unified cloud telephony + WhatsApp Business API platform. Two numbers — one per brand for voice, with SquareMCP number doubling as WhatsApp Business API.
**Cost Model (voice + WhatsApp only, SMS removed):**
| Item | Cost |
|---|---|
| 2 phone numbers | ~$2.30/mo ($1.15 each) |
| Inbound voice (per min) | $0.0085 |
| Outbound voice (per min) | $0.014 |
| CNAM registration | ~$0.50/mo (both numbers) |
| WhatsApp — Service conversations | Free (first 1,000/mo), then ~$0.005–0.02 |
| WhatsApp — Utility conversations | ~$0.01–0.03 each |
| WhatsApp — Marketing conversations | ~$0.025–0.08 each |
| WhatsApp — Authentication | ~$0.01–0.02 each |
| **Estimated total (low volume)** | **~$5–12/mo all-in** |
> ⚠️ **WhatsApp pricing (2024 model):** Conversation-based, not per-message. A "conversation" is a 24-hour window. First 1,000 service conversations/month are free — very favorable for early-stage usage.
**Pros:**
- Official Meta WhatsApp Business API partner → numbers pre-approved
- One account, one dashboard, one bill
- Hermes MCP tools (`whatsapp_send_message`, `whatsapp_send_template`, `whatsapp_list_templates`) connect directly — zero additional integration work
- Twilio Studio: drag-and-drop call flow builder (~1–2 hrs)
- TwiML Bins: call forwarding to cell in minutes
- Clear upgrade path: add team members, numbers, no migration
- 99.95% uptime SLA
- **Strategic dogfood:** Live demonstration of Hermes MCP's WhatsApp tooling — directly demo-able to prospects
**Cons / Risks:**
- Meta business verification: 1–3 business days, occasionally longer
- Meta can reject WhatsApp API applications (fallback documented below)
- New Twilio numbers may initially score as "Spam Likely" before building call history
- Twilio has had outages (e.g., Sept 2021) — acceptable risk for solo operator
---
## Adversarial Challenges & Responses
### Challenge 1: "Twilio is overkill — OpenPhone is simpler"
True for calling UX. False strategically. Hermes MCP WhatsApp tooling is dead weight without the API. The setup cost is paid once; coherence pays indefinitely.
### Challenge 2: "What if Meta rejects the WhatsApp API application?"
Voice lines are fully unaffected. See Fallback Plan. Meta allows re-application after 30 days.
### Challenge 3: "Do you need 3 numbers?"
No. Revised to 2. One WhatsApp number can serve both brands with context-aware profile copy. Revisit when brand separation becomes a priority.
### Challenge 4: "Twilio outage takes down both lines simultaneously"
Real single point of failure. Mitigation: personal cell as documented fallback in Studio call flows. Acceptable at current scale.
### Challenge 5: "Which entity should own these numbers?"
Twilio account should be under primary business entity (SquareMCP LLC or FetcherPay LLC, whichever is formed first). Numbers portable between Twilio accounts if entity structure changes.
### Challenge 6: "Is WhatsApp the right channel or a solution looking for a problem?"
WhatsApp has 2B+ users and is the dominant async B2B channel outside North America. Relevant for both SquareMCP (global dev teams) and FetcherPay (international payments). Hermes MCP investment signals prior conviction.
### Challenge 7: "Account compromise wipes out both business lines"
Yes — real risk. Mitigated by strong account security (see below), spending hard limits, and personal-cell fallback. Revisit with a second carrier at 5+ team members.
---
## ⚠️ Identified Gaps & Blind Spots
### 🔐 Security
#### Toll Fraud / IRSF (International Revenue Sharing Fraud)
**Risk level: HIGH.** Compromised Twilio credentials can route calls to premium international numbers, generating thousands in charges overnight. Common against new accounts.
**Required — non-negotiable:**
- Enable **Twilio Fraud Guard** immediately after account creation
- Twilio console → Voice → Geo Permissions: restrict to US + Canada only to start
- Set spending alert at $25/mo and hard limit at $50/mo
- Never expose auth tokens in client-side code or public repos
#### Account Security
- Enable **authenticator-app 2FA** on Twilio (NOT SMS-based 2FA)
- Enable 2FA on **Meta Business Manager** separately
- Use a dedicated business email for both accounts
#### API Key Management
- Create scoped sub-auth-tokens for Hermes MCP — do not use master credentials
- Reference credentials via environment variables only
- Rotate every 90 days minimum
---
### ⚖️ Compliance
#### Call Recording Disclosure
If recording is ever enabled in Studio (not required now, but plan ahead):
- **11 US states** require all-party consent: CA, CT, FL, IL, MD, MA, MI, MT, NH, OR, PA, WA
- Studio flow must play disclosure before connecting ("This call may be recorded...")
- Do not enable recording without this in place
#### GDPR / CCPA — Voice & WhatsApp Data
Call logs, voicemail recordings, and WhatsApp message content are personal data.
- Sign Twilio's **Data Processing Agreement (DPA)** — available in console
- Define retention policy: how long are call logs and voicemail kept?
- **Update privacy policies on squaremcp.com and fetcherpay.com** to disclose WhatsApp and call data collection — legally required under GDPR/CCPA, almost always forgotten
- Configure Twilio data residency if messaging EU residents
#### FetcherPay — Financial Services WhatsApp Restrictions
WhatsApp Commerce Policy has specific restrictions for financial services:
- Certain financial product promotions require additional Meta approval
- Messages referencing payment amounts or account balances require careful template design
- Avoid anything resembling phishing patterns
- Treat FetcherPay as higher-scrutiny brand in all WhatsApp messaging
---
### 🔧 Technical
#### Webhook Infrastructure — Critical Gap
For Hermes MCP to **receive** inbound WhatsApp messages, a webhook endpoint must exist at a public URL, run 24/7, and parse the Twilio/Meta payload. This is not optional.
| Option | Pros | Cons |
|---|---|---|
| **Twilio Functions** | No separate infra, tightly integrated | Vendor lock-in, cold starts |
| **Cloudflare Workers** | Fast, global, generous free tier | New system to manage |
| **Existing SquareMCP server** | No new infra | Must be always-on |
| **AWS Lambda / Vercel** | Scalable, low cost | Additional account |
**Recommended:** Twilio Functions for Phase 1. Migrate to SquareMCP server or Cloudflare Worker when that infra exists.
#### CNAM (Caller ID Name) Registration
Without CNAM, outbound calls show as bare number or "Unknown" — looks unprofessional and increases ignore/spam-report rate.
- Register CNAM for both numbers in Twilio console (Phone Numbers → Manage → Active Numbers → Edit)
- Display names: "SquareMCP" and "FetcherPay"
- Cost: ~$0.25–0.50/mo per number; propagation 1–3 business days
- AT&T and Verizon coverage best; T-Mobile inconsistent
#### Number Type: Local vs Toll-Free
| | Local | Toll-Free |
|---|---|---|
| Cost | ~$1.15/mo | ~$2/mo |
| Trust signal | Personal/regional | National business presence |
| Best for | SquareMCP (dev-to-dev) | FetcherPay (payments, trust matters) |
**Recommendation:** Local for SquareMCP, toll-free for FetcherPay. Revisit after brand research.
#### New Number Spam Scoring
New numbers may be flagged "Spam Likely" by carrier analytics before building call history.
- Register both numbers at **freecallerregistry.com** (covers AT&T, Verizon, T-Mobile — free)
- Do not make high-volume outbound calls immediately on new numbers
- Allow 2–4 weeks of light usage first
#### WhatsApp Display Name Approval
API access approval and display name approval are **two separate Meta processes.** Display name ("SquareMCP") must:
- Be associated with legal business name or DBA on file
- Not contain generic terms
- Be approved before showing to contacts (failed → contacts see number only)
Include as explicit step in Phase 4.
#### WhatsApp Green Checkmark (OBA)
Not achievable immediately. Requires Meta Business verification + brand notability evidence (press, Wikipedia, etc.). Set as 6-month milestone. Not a launch blocker.
---
### 🔧 Operational
#### Voicemail Transcription
Twilio Studio supports voicemail transcription natively — transcripts delivered to email. Essential for solo operator. Include in Phase 3 Studio build.
#### After-Hours Routing
Define explicitly before going live:
- **Business hours:** Mon–Fri, 9am–6pm local (Twilio Studio time-of-day widget)
- **After hours:** Custom message with response time expectation → voicemail with transcription
- **Weekend:** Separate voicemail greeting
---
### 🌐 Strategic
#### The Dogfooding Opportunity
This setup is a **live demo of Hermes MCP.** Inbound WhatsApp → Hermes MCP flow → Notion task + auto-reply is exactly the workflow Hermes MCP sells. Should be:
- Documented as a reference architecture for prospects
- Showcased in marketing ("Hermes MCP powers SquareMCP's own customer communications")
#### International Voice Strategy
Both brands likely serve international users. US numbers create friction for non-US callers (they pay international rates).
- **Short term:** Promote WhatsApp as the global contact channel — free for users internationally
- **Later:** Add UK (+44) or EU number via Twilio when first international enterprise prospects appear — no re-architecture needed
#### Privacy Policy Updates (Both Domains)
Required before going live with WhatsApp. Must disclose:
- What data is collected (phone numbers, message content, call logs)
- Retention period
- Third parties: Twilio, Meta
- How users can opt out of WhatsApp communications
Required under GDPR, CCPA, and FTC guidelines. Commonly skipped until a compliance issue forces it.
---
## Confidence Assessment (v3)
| Claim | Confidence | Notes |
|---|---|---|
| Twilio is the right platform | 94% | Cleaner without SMS complexity |
| 2 numbers is right starting config | 87% | Toll-free for FetcherPay may warrant revisit |
| WhatsApp API over App | 93% | Unchanged |
| Twilio Studio sufficient for voice IVR | 96% | SMS removal simplifies flows |
| No self-hosted PBX needed | 97% | Unchanged |
| Security posture (post gap-fix) | 88% | Actionable; gaps are known and fixable |
| Compliance posture (post gap-fix) | 85% | GDPR/CCPA + recording disclosure are clear tasks |
**Overall plan confidence: ~93%** — above threshold. Removal of SMS eliminates the largest compliance surface area (TCPA, A2P 10DLC) and simplifies implementation materially.
---
## Recommended Configuration
```
Twilio Account (business entity owner, 2FA enforced, Fraud Guard ON)
│
├── +1 (XXX) XXX-XXXX → SquareMCP [local number]
│ ├── Voice: Studio flow → CNAM "SquareMCP" → greeting → forward to cell
│ ├── After-hours: voicemail + transcription to email
│ └── WhatsApp Business API: Meta-verified, display name approved
│ └── Inbound webhook → Twilio Function → Hermes MCP handler
│
└── +1 (XXX) XXX-XXXX → FetcherPay [toll-free candidate]
├── Voice: Studio flow → CNAM "FetcherPay" → greeting → forward to cell
└── After-hours: voicemail + transcription to email
```
---
## Implementation Steps
### Phase 1: Account Setup & Security (Day 1, ~1 hr) — DO FIRST
- [ ] Create Twilio account with dedicated business email
- [ ] Enable authenticator-app 2FA immediately (not SMS-based)
- [ ] Enable **Twilio Fraud Guard** (console → Voice → Fraud Guard)
- [ ] Set Geo Permissions: restrict outbound voice to US + Canada only
- [ ] Set spending alert at $25/mo and hard limit at $50/mo
- [ ] Create scoped sub-auth-tokens for Hermes MCP
### Phase 2: Numbers & CNAM (Day 1, ~1 hr)
- [ ] Purchase 2 numbers (local for SquareMCP, evaluate toll-free for FetcherPay)
- [ ] Register CNAM for both numbers ("SquareMCP", "FetcherPay")
- [ ] Register both numbers at freecallerregistry.com
### Phase 3: Call Flows (Day 1–2, ~2 hrs)
- [ ] Build Twilio Studio flow for SquareMCP:
- [ ] Business hours check (time-of-day widget)
- [ ] Custom inbound greeting (record audio)
- [ ] Forward to cell during business hours
- [ ] After-hours: voicemail with transcription to email
- [ ] Mirror flow for FetcherPay with brand-specific greeting
- [ ] Test: busy, no answer, after-hours, weekend
### Phase 4: WhatsApp Business API (Day 2–7, variable)
- [ ] Create/verify Meta Business Manager account
- [ ] Enable 2FA on Meta Business Manager
- [ ] Apply for WhatsApp Business API access via Twilio console
- [ ] Submit business verification documents to Meta
- [ ] Submit display name "SquareMCP" for approval (separate process from API access)
- [ ] Wait for approval (1–3 business days typical)
- [ ] Create and submit message templates:
- [ ] Welcome/greeting template (utility)
- [ ] Support response template (service — first 1,000/mo free)
- [ ] Authentication template if OTP flows needed
- [ ] Configure WhatsApp sender on SquareMCP number
### Phase 5: Webhook Infrastructure (Day 5–7, ~2 hrs)
- [ ] Create Twilio Function for inbound WhatsApp handling
- [ ] Parse payload: sender, message body, media
- [ ] Route to Hermes MCP handler (log, auto-reply, Notion task creation)
- [ ] Set webhook URL in Twilio WhatsApp sender settings
- [ ] Test end-to-end: WhatsApp → Twilio → Function → Hermes MCP
- [ ] Test `whatsapp_send_message` outbound
- [ ] Test `whatsapp_list_templates` returns approved templates
### Phase 6: Compliance & Legal (Day 7–10)
- [ ] Update squaremcp.com privacy policy (WhatsApp + call data disclosure)
- [ ] Update fetcherpay.com privacy policy (WhatsApp + call data disclosure)
- [ ] Sign Twilio Data Processing Agreement (DPA) in console
- [ ] Define data retention policy (call logs, voicemail, WhatsApp messages)
- [ ] Document call recording disclosure plan (for future use if ever enabled)
---
## Fallback Plan (WhatsApp API Rejection)
1. **Immediate:** Register SquareMCP number to WhatsApp Business App on a dedicated tablet
2. **Short-term:** Operate WhatsApp manually — Hermes MCP automation paused
3. **Re-apply:** After 30 days with additional documentation
4. **Alternative provider:** 360dialog or Bird (formerly MessageBird) as alternate Meta BSPs
Voice lines are fully operational regardless.
---
## Roadmap (Not Launch Blockers)
- **WhatsApp Green Checkmark (OBA):** Apply at 6-month mark with press/brand evidence
- **International voice number:** UK (+44) or EU number when first international enterprise prospects appear
- **Twilio Flex:** Revisit as contact center layer at 5+ team members
- **Call analytics:** Twilio call logs → Grafana/Retool dashboard
- **SMS:** Add later when there's a clear use case — A2P 10DLC registration takes 2–3 weeks so initiate early when decided
---
## Dogfooding Reference Architecture
```
Customer sends WhatsApp message to SquareMCP number
↓
Twilio receives → fires webhook to Twilio Function
↓
Twilio Function parses payload → calls Hermes MCP endpoint
↓
Hermes MCP:
- Logs conversation to Notion
- Sends auto-acknowledgment via whatsapp_send_message
- Creates follow-up task if keywords matched
↓
Operator notified via email with voicemail transcript or WA summary
```
Directly demonstrable to Hermes MCP prospects as a reference implementation.
---
## Tags
#communications #infrastructure #twilio #whatsapp #squaremcp #fetcherpay #product-incubation #compliance #security
## Clarification: SMS Capability vs SMS Workflows
> Added 2026-05-15
The "SMS is out of scope" decision means **no SMS workflows, outbound campaigns, or programmatic SMS messaging.** It does NOT mean buying voice-only numbers.
**Buy numbers with SMS capability enabled.** Reasons:
- WhatsApp Business API verification requires the number to receive an OTP via SMS
- Other services (Stripe, Google, etc.) will send verification codes to these numbers over time
- SMS capability has no additional cost — you only pay for messages actually sent/received
The distinction: SMS capability = the number can receive a text. SMS workflow = you've built Studio flows, webhooks, and outbound automation around it. The former is required infrastructure. The latter is what's out of scope.