# Hermes MCP — LinkedIn, Snapchat & WhatsApp Integration Plan **Date:** 2026-04-30 **Status:** Planning **Project:** hermes-mcp --- ## Architecture Overview Each platform follows the same pattern as email and Obsidian: ``` src/clients/linkedin.ts ← API client module (new) src/clients/whatsapp.ts ← API client module (new) src/clients/snapchat.ts ← API client module (new) src/tools.ts ← add tool definitions + dispatch cases src/index.ts ← add REST passthrough endpoints .env.example ← add per-platform env vars ``` --- ## Platform Notes ### LinkedIn — OAuth 2.0, REST API - **Tools:** `linkedin_get_profile`, `linkedin_create_post`, `linkedin_search_connections`, `linkedin_send_message` - **Auth:** OAuth 2.0 — client ID/secret + access token per account - **Caveat:** DM API requires LinkedIn partnership; prototype uses posting + profile reads (`w_member_social` + `r_liteprofile`) ### WhatsApp — Meta Cloud API - **Tools:** `whatsapp_send_message`, `whatsapp_send_template`, `whatsapp_get_message_status`, `whatsapp_list_templates` - **Auth:** Meta System User Access Token per phone number / business account - **Notes:** Pure REST to `graph.facebook.com`, no SDK needed ### Snapchat — Snap Marketing API - **Tools:** `snapchat_get_profile`, `snapchat_create_ad`, `snapchat_get_story_analytics` - **Auth:** OAuth 2.0 via `https://accounts.snapchat.com/accounts/oauth2/token` - **Caveat:** Most restricted — public API is mainly ads/marketing --- ## Implementation Phases ### Phase 1 — WhatsApp (lowest friction) - [ ] `src/clients/whatsapp.ts` — Meta Cloud API wrapper - [ ] 4 tools in `tools.ts` + dispatch cases - [ ] `.env.example`: `WHATSAPP_{ACCOUNT}_PHONE_NUMBER_ID`, `WHATSAPP_{ACCOUNT}_ACCESS_TOKEN`, `WHATSAPP_BUSINESS_ACCOUNT_ID` ### Phase 2 — LinkedIn - [ ] `src/clients/linkedin.ts` — LinkedIn v2 REST wrapper - [ ] 4 tools in `tools.ts` - [ ] `.env.example`: `LINKEDIN_{ACCOUNT}_ACCESS_TOKEN`, `LINKEDIN_{ACCOUNT}_CLIENT_ID`, `LINKEDIN_{ACCOUNT}_CLIENT_SECRET` - [ ] Extend existing OAuth flow or use pre-obtained long-lived tokens ### Phase 3 — Snapchat - [ ] `src/clients/snapchat.ts` — Snap Marketing API wrapper - [ ] 3 tools: profile, ad creation, story analytics - [ ] `.env.example`: `SNAPCHAT_{ACCOUNT}_ACCESS_TOKEN`, `SNAPCHAT_{ACCOUNT}_CLIENT_ID` --- ## Open Questions 1. **Multi-account?** Named accounts like `personal`/`business` per platform, or single account for prototype? 2. **WhatsApp inbound?** Send-only, or also webhook for incoming messages (requires public endpoint)? 3. **LinkedIn DMs?** Skip (requires partnership) and focus on posts + profile reads? 4. **Snapchat scope?** Ads/analytics only, or also Login Kit (Bitmoji avatar, display name)? 5. **Token management?** Static env vars (like email) or store/refresh via existing OAuth DB?