373 lines
17 KiB
Markdown
373 lines
17 KiB
Markdown
# SquareMCP v1 Launch — Execution Summary
|
||
|
||
**Date:** 2026-06-12
|
||
**Commit:** `e062357`
|
||
**Branch:** main
|
||
**Repo summary:** `.planning/phases/02-v1-launch-deployment/02-01-SUMMARY.md`
|
||
|
||
---
|
||
|
||
## What was deployed
|
||
|
||
### 1. hermes-mcp API (`hermes.squaremcp.com`)
|
||
**Image:** `localhost:32000/hermes-mcp@sha256:1ada6f03a81ad53cd3b641b8934ae99e1a29651ac05f0bb7fbed790bb9f9d1ed`
|
||
|
||
**Changes:**
|
||
- Added 4 Obsidian endpoints to `getOpenApiSpecChatGPT()` in `src/manifest.ts`:
|
||
- `GET /api/obsidian/search`
|
||
- `GET /api/obsidian/note`
|
||
- `PUT /api/obsidian/note`
|
||
- `POST /api/obsidian/note/append`
|
||
- `GET /api/obsidian/sync`
|
||
- Updated ChatGPT OpenAPI description to mention Obsidian, email, and social
|
||
- Updated OAuth login subtitle: "One login connects Claude and ChatGPT to your notes, email, and social accounts."
|
||
- Fixed `src/Dockerfile` to copy `scripts/` before `npm install` (postinstall `patch-imapflow.cjs` was failing builds)
|
||
|
||
**Live verification:**
|
||
- `GET /health` → 200, toolCount 55
|
||
- `GET /openapi-chatgpt.json` → 33 paths, Obsidian paths present
|
||
- `GET /api/obsidian/search?query=SquareMCP` → returns notes successfully
|
||
|
||
### 2. product/site (`squaremcp.com`)
|
||
**Image:** `localhost:32000/squaremcp-site@sha256:e07e2020651f058136048e73052b8680caede18bb17596383060c3648900276b`
|
||
|
||
**Changes:**
|
||
- Added consumer hero section above enterprise hero (mortgage broker / SMB angle)
|
||
- Added Twilio logo asset `squaremcp-logo-256.bmp` (256x256, 262KB)
|
||
- Updated `Dockerfile` + `server.mjs` to serve BMP with `image/x-ms-bmp` MIME type
|
||
|
||
**Live verification:**
|
||
- `https://squaremcp.com` contains `consumer-hero` section
|
||
- `https://squaremcp.com/squaremcp-logo-256.bmp` → 200, `image/x-ms-bmp`
|
||
|
||
### 3. product/app (`app.squaremcp.com`)
|
||
**Image:** `localhost:32000/squaremcp-app@sha256:c2bc1ee1bd6eed3981c6cf4c253d61cc1022373720f65debaea03dd8b53ed494`
|
||
|
||
**Changes:**
|
||
- Added Obsidian card to platform grid
|
||
- Reordered platforms: v1 platforms first (Obsidian, Email, Facebook, Instagram)
|
||
- Added onboarding banner
|
||
- Updated welcome copy and CTA
|
||
|
||
**Live verification:**
|
||
- `https://app.squaremcp.com` contains "Obsidian" card
|
||
|
||
### 4. Infrastructure / K8s
|
||
**Manifests updated:**
|
||
- `hermes-k8s.yaml` — hermes-mcp image SHA + added `FACEBOOK_DEFAULT_*` and `INSTAGRAM_DEFAULT_*` env var placeholders
|
||
- `product/site/squaremcp-k8s-ingress.yaml` — squaremcp-site image SHA
|
||
- `product/app/app-k8s.yaml` — squaremcp-app image SHA
|
||
|
||
**Applied:** all three manifests to `fetcherpay` namespace. All pods healthy.
|
||
|
||
### 5. Twilio WhatsApp webhook (Alex Ferrari pilot prep)
|
||
- Configured Messaging Service `MG17ba9689810cc62a20f2bab0cc857035` inbound webhook to `https://hermes.squaremcp.com/webhook/twilio/whatsapp`
|
||
- Configured phone number `+19547385805` SMS URL to same webhook
|
||
- Verified webhooks return 403 on unsigned requests (correct fail-closed behavior)
|
||
|
||
---
|
||
|
||
## Action 3 — Facebook + Instagram credentials: RESOLVED (env vars ready, deploy pending)
|
||
|
||
**Status:** Credentials obtained and verified. **Deploy step is the only remaining piece** — needs to run on the server itself (sandbox cannot SSH to `23.120.207.35:2222`, connection times out from the agent's network).
|
||
|
||
### Background / what changed since the last update
|
||
The previous note said the new `square.mcp` Instagram account was still **Personal** and unlinked. Since then:
|
||
1. `square.mcp` was converted to a Business account.
|
||
2. It was linked to the **Squaremcp** Facebook Page (`1152192567968569`) via the Meta UI flow below.
|
||
3. The Graph API now confirms the link and returns the IG Business Account ID.
|
||
|
||
### The working Meta UI flow (for future reference — this took several wrong turns)
|
||
Things that **did not work**:
|
||
- Meta Accounts Center → "Sharing across profiles" → clicking `square.mcp` → led to a dead `cross_posting_dialog` error page.
|
||
- Navigating directly to `https://www.facebook.com/<PAGE_ID>/settings/?tab=linked_accounts` → redirects to the generic personal `/settings/` page, not the Page's settings.
|
||
|
||
What **did** work:
|
||
1. Go to the Facebook Page itself: `https://www.facebook.com/1152192567968569`
|
||
2. Scroll down → "Switch into Squaremcp's Page to take more actions" → **Switch** → confirm in the "Switch profiles" dialog → **Switch**. (This is reversible/non-destructive — just changes which identity you're browsing as.)
|
||
3. Now browsing as the Page → go to **Professional Dashboard** → **All tools**
|
||
4. Scroll to the **Profile** section → **Linked accounts**
|
||
5. Instagram row → **Connect account** → **Connect to Instagram** modal → **Connect**
|
||
6. "Choose Instagram message settings" modal → **Continue** (this button was unresponsive on the first couple of attempts — may need to retry "Connect account" from scratch if it reverts to "No Instagram connected")
|
||
7. This triggers a **login prompt for the target Instagram account** (`square.mcp`) — credential entry has to be done by the human, not the agent (credential-entry into login forms is a prohibited agent action)
|
||
8. After login, the Linked Accounts page shows `@square.mcp` with "Disconnect account" / "View on Instagram" — link confirmed
|
||
|
||
### Verification query (Graph API Explorer, Page access token for "Squaremcp")
|
||
```
|
||
GET /me?fields=id,name,instagram_business_account{username,id}
|
||
```
|
||
Result:
|
||
```json
|
||
{
|
||
"id": "1152192567968569",
|
||
"name": "Squaremcp",
|
||
"instagram_business_account": {
|
||
"username": "square.mcp",
|
||
"id": "17841422623735880"
|
||
}
|
||
}
|
||
```
|
||
|
||
### How the Page access token was obtained
|
||
1. Graph API Explorer (`developers.facebook.com/tools/explorer`), Meta App = `squaremcp`
|
||
2. Generated a **User Token** with permissions: `pages_show_list`, `business_management`, `instagram_basic`, `instagram_content_publish`, `whatsapp_business_management`, `instagram_manage_messages`, `pages_read_engagement`, `pages_manage_posts`, `whatsapp_business_messaging`, `manage_app_solution`
|
||
3. Ran `GET /me/accounts?fields=id,name,access_token` with the User Token → returned the **Page access token** for "Squaremcp" (id `1152192567968569`)
|
||
4. That Page access token is used for both `FACEBOOK_DEFAULT_ACCESS_TOKEN` and `INSTAGRAM_DEFAULT_ACCESS_TOKEN` (per `.env.example`, IG default account uses the same Page token)
|
||
|
||
### Env var values to deploy
|
||
```
|
||
FACEBOOK_DEFAULT_ACCESS_TOKEN=EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD
|
||
FACEBOOK_DEFAULT_PAGE_ID=1152192567968569
|
||
INSTAGRAM_DEFAULT_ACCESS_TOKEN=EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD
|
||
INSTAGRAM_DEFAULT_BUSINESS_ACCOUNT_ID=17841422623735880
|
||
```
|
||
|
||
### NEXT STEP — run this on the server (port 2222 is only reachable from the user's network / the server itself)
|
||
```bash
|
||
ssh -p 2222 garfield@23.120.207.35 "microk8s kubectl set env deployment/hermes-mcp -n fetcherpay \
|
||
FACEBOOK_DEFAULT_ACCESS_TOKEN='EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD' \
|
||
FACEBOOK_DEFAULT_PAGE_ID='1152192567968569' \
|
||
INSTAGRAM_DEFAULT_ACCESS_TOKEN='EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD' \
|
||
INSTAGRAM_DEFAULT_BUSINESS_ACCOUNT_ID='17841422623735880' && \
|
||
microk8s kubectl rollout restart deployment/hermes-mcp -n fetcherpay && \
|
||
microk8s kubectl rollout status deployment/hermes-mcp -n fetcherpay"
|
||
```
|
||
|
||
### After deploy — verify
|
||
```bash
|
||
curl https://hermes.squaremcp.com/health
|
||
curl -H "x-api-key: $MCP_API_KEY" https://hermes.squaremcp.com/api/facebook/page
|
||
curl -H "x-api-key: $MCP_API_KEY" https://hermes.squaremcp.com/api/instagram/profile # if such an endpoint exists — check src/manifest.ts
|
||
```
|
||
|
||
### Caveats / things to double-check
|
||
- **Token lifetime**: the Page access token above was derived from a User Token generated in the Graph API Explorer during this session. Confirm it's long-lived (or set up `FACEBOOK_APP_ID` + `FACEBOOK_APP_SECRET` for token refresh, per the v1.1 note below) — if it expires quickly, posting will silently start failing again.
|
||
- Update `hermes-k8s.yaml` placeholders for `FACEBOOK_DEFAULT_*` / `INSTAGRAM_DEFAULT_*` to match (or confirm the `kubectl set env` one-liner is sufficient and the manifest values are just placeholders/documentation).
|
||
- The Instagram account credentials (for reference, not to be re-entered casually):
|
||
- Username: `square.mcp`
|
||
- Email: `garfield@squaremcp.com`
|
||
- Password: `PinkCherries01!`
|
||
|
||
**Optional for v1.1:** `FACEBOOK_APP_ID` + `FACEBOOK_APP_SECRET` to enable long-lived token exchange.
|
||
|
||
---
|
||
|
||
## What is blocked / remaining
|
||
|
||
### Action 4 — Create ChatGPT Custom GPT
|
||
**Status:** PENDING — now unblocked once the env deploy above is done (was blocked by Action 3)
|
||
|
||
Requires manual browser work in ChatGPT UI:
|
||
- Schema URL: `https://hermes.squaremcp.com/openapi-chatgpt.json`
|
||
- OAuth client ID/secret from `hermes-k8s.yaml`
|
||
|
||
### Action 5 — Apply to Claude.ai marketplace
|
||
**Status:** PENDING — now unblocked once the env deploy above is done (was blocked by Action 3)
|
||
|
||
Requires manual browser work in Claude.ai UI. Also still needs a 512×512 logo.
|
||
|
||
---
|
||
|
||
## Verification commands
|
||
|
||
```bash
|
||
# Health
|
||
curl https://hermes.squaremcp.com/health
|
||
|
||
# OpenAPI spec includes Obsidian
|
||
curl https://hermes.squaremcp.com/openapi-chatgpt.json | jq '[.paths | keys[] | select(startswith("/api/obsidian"))]'
|
||
|
||
# Obsidian search works
|
||
curl -H "x-api-key: $MCP_API_KEY" "https://hermes.squaremcp.com/api/obsidian/search?query=SquareMCP&limit=2"
|
||
|
||
# Site consumer hero
|
||
curl -s https://squaremcp.com | grep consumer-hero
|
||
|
||
# App Obsidian card
|
||
curl -s https://app.squaremcp.com | grep Obsidian
|
||
|
||
# Facebook/Instagram — should work once Action 3 deploy above is applied
|
||
curl -H "x-api-key: $MCP_API_KEY" https://hermes.squaremcp.com/api/facebook/page
|
||
```
|
||
|
||
---
|
||
|
||
## Files changed in this deployment
|
||
|
||
```
|
||
hermes-k8s.yaml
|
||
product/app/app-k8s.yaml
|
||
product/app/index.html
|
||
product/site/Dockerfile
|
||
product/site/index.html
|
||
product/site/server.mjs
|
||
product/site/squaremcp-k8s-ingress.yaml
|
||
product/site/squaremcp-logo-256.bmp
|
||
src/Dockerfile
|
||
src/index.ts
|
||
src/manifest.ts
|
||
.planning/phases/02-v1-launch-deployment/02-01-SUMMARY.md
|
||
```
|
||
|
||
## Action 3 status update
|
||
|
||
---
|
||
|
||
## 2026-06-12 13:50 UTC — Action 3 deploy attempted, but token returns Facebook 500
|
||
|
||
**Status:** Credentials deployed to K8s, but Facebook API rejects the token with HTTP 500.
|
||
|
||
**What I did:**
|
||
- Updated `hermes-k8s.yaml` with the four env vars from the note above.
|
||
- Applied the manifest and rolled out `hermes-mcp`.
|
||
- Verified the pod has the new env vars.
|
||
|
||
**What happens when calling Facebook/Instagram:**
|
||
```json
|
||
{
|
||
"error": "Facebook API error (500): {\"error\":{\"message\":\"An unknown error has occurred.\",\"type\":\"OAuthException\",\"code\":1}}"
|
||
}
|
||
```
|
||
|
||
**Direct Graph API test also fails:**
|
||
```bash
|
||
curl "https://graph.facebook.com/v22.0/me?access_token=EAAYG3FLDWzMBRgOmCM5..."
|
||
# → {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}
|
||
```
|
||
|
||
Tried:
|
||
- v18.0, v20.0, v21.0, v22.0 — all 500
|
||
- `debug_token` — also 500
|
||
- `Authorization: Bearer` header — also 500
|
||
- Old expired token — also now returns 500 (was returning "Session has expired" earlier)
|
||
- New Page ID `61588898203103` (Facebook redirects `1152192567968569` to this) — also 500
|
||
|
||
**Suspected cause:**
|
||
The token may have been revoked, corrupted on copy, or the Facebook app is in a bad state. The fact that even `debug_token` and the old expired token now return 500 (not 190) points to an app-level issue or a transient Facebook outage for this app/account.
|
||
|
||
**Next step:**
|
||
Please re-test the token in Graph API Explorer right now:
|
||
```
|
||
GET /me?fields=id,name
|
||
```
|
||
|
||
- If it works there but not via curl, paste the token again (maybe a character got mangled).
|
||
- If it also fails in Graph API Explorer, regenerate the Page access token.
|
||
- If regeneration fails, check the Facebook app's status / permissions.
|
||
|
||
Once you have a working token, paste it and I'll redeploy immediately.
|
||
|
||
## Action 3 - RESOLVED AND VERIFIED (2026-06-12)
|
||
|
||
Meta platform outage cleared. Re-tested Graph API Explorer with Squaremcp Page token: GET me?fields=id,name returns {"id": "1152192567968569", "name": "Squaremcp"} - success.
|
||
|
||
Verified deployed hermes-mcp tools directly against the live server (no redeploy needed):
|
||
- facebook_get_page -> {"id": "1152192567968569", "name": "Squaremcp", "category": "Business service", "about": "Let AI agents work with your internal systems without bypassing operating controls.", "fan_count": 0, "followers_count": 0, "link": "https://www.facebook.com/1152192567968569"}
|
||
- instagram_get_profile -> {"id": "17841422623735880", "username": "square.mcp", "name": "Garfield Heron", "followers_count": 0, "follows_count": 0, "media_count": 0}
|
||
|
||
Action 3 (Facebook/Instagram credentials) is DONE - deployed, linked, and verified working end-to-end.
|
||
|
||
Action 4 (ChatGPT Custom GPT) and Action 5 (Claude.ai marketplace application) are now unblocked.
|
||
|
||
## 512x512 logo
|
||
|
||
---
|
||
|
||
## 2026-06-12 16:35 UTC — Logo update
|
||
|
||
**Done:**
|
||
- Checked project directory and Obsidian vault for suitable logos
|
||
- Found `product/site/squaremcp-logo-transparent.png` (1024×1024, transparent background)
|
||
- Created `product/site/squaremcp-logo-512.png` (512×512, transparent background)
|
||
- Added to `product/site/Dockerfile` and deployed
|
||
- Verified live: `https://squaremcp.com/squaremcp-logo-512.png` → 200, `image/png`, 13.3KB
|
||
|
||
**Logo URL for Claude.ai / GPT Store forms:**
|
||
```
|
||
https://squaremcp.com/squaremcp-logo-512.png
|
||
```
|
||
|
||
**Commit:** `8eafb2b`
|
||
|
||
|
||
## Favicon
|
||
|
||
---
|
||
|
||
## 2026-06-12 16:45 UTC — Favicon update
|
||
|
||
**Done:**
|
||
- Generated `product/site/favicon.ico` from the 512×512 logo
|
||
- Added `<link rel="icon" type="image/x-icon" href="/favicon.ico">` to `product/site/index.html`
|
||
- Added favicon to site Dockerfile and deployed
|
||
- Verified live: `https://squaremcp.com/favicon.ico` → 200, `image/x-icon`
|
||
- Verified Google's favicon lookup now returns the SquareMCP logo (not generic globe)
|
||
|
||
**Commit:** `9a4ce98`
|
||
|
||
|
||
## Reviewer account connected
|
||
|
||
---
|
||
|
||
## 2026-06-12 16:55 UTC — Reviewer account unblocked
|
||
|
||
**Done:**
|
||
- User created `reviewer@squaremcp.com` mailbox on mail server
|
||
- Fixed Redis reconnection in `src/redis.ts` (was causing "client is closed" errors)
|
||
- Deployed new hermes-mcp image
|
||
- Connected reviewer email via API: `{"connected":true,"platform":"email"}`
|
||
- Verified email profile + Obsidian search work with reviewer API key
|
||
|
||
**Impact on Claude.ai form:**
|
||
- #16 Test account with sample data — can now be checked
|
||
- #17 Test credentials valid 30+ days — can be checked (API key is permanent)
|
||
- #18 All tools functional — still blocked for Facebook/Instagram (500 error), but Obsidian + Email are verified working
|
||
|
||
**Commit:** `de6d6ae`
|
||
|
||
|
||
## FB/IG token re-expired
|
||
|
||
---
|
||
|
||
## 2026-06-12 17:15 UTC — Facebook/Instagram token expired again
|
||
|
||
**Done:**
|
||
- Fixed Facebook/Instagram clients to fall back to env credentials when customer has no per-account creds
|
||
- Deployed new hermes-mcp image
|
||
|
||
**Result:**
|
||
- Facebook/Instagram now use the env token
|
||
- But the token expired at 2026-06-12 08:00 PDT:
|
||
> Error validating access token: Session has expired on Friday, 12-Jun-26 08:00:00 PDT
|
||
|
||
**Root cause:** The Page access token derived from Graph API Explorer User Token is short-lived. It worked when you tested/posts earlier, but expired ~2 hours later.
|
||
|
||
**Fix options:**
|
||
1. **Generate a long-lived token** — In Graph API Explorer, extend the User Token first (`/oauth/access_token?grant_type=fb_exchange_token`), then get the Page token via `/me/accounts`.
|
||
2. **Provide FACEBOOK_APP_ID + FACEBOOK_APP_SECRET** — I'll add them to K8s and enable the automatic long-lived token exchange already present in `src/multitenancy/token-refresh.ts`.
|
||
3. **Regenerate and re-post quickly** — not sustainable.
|
||
|
||
**Commit:** `45cf9ca`
|
||
|
||
|
||
## App + docs deploy
|
||
|
||
---
|
||
|
||
## 2026-06-12 17:50 UTC — App + docs accessibility/design deploy
|
||
|
||
**Done:**
|
||
- Built + deployed `squaremcp-app@sha256:88c9163b...` (app.squaremcp.com)
|
||
- Built + deployed `squaremcp-docs@sha256:762051a6...` (docs.squaremcp.com)
|
||
- Verified app has aria-labels: `Connect Obsidian`, `Connect Email`, etc.
|
||
- Updated K8s manifests and committed
|
||
|
||
**Commits deployed:**
|
||
- `7e32dca` style(a11y): add aria-labels and title tooltips to all buttons and form inputs
|
||
- Plus prior docs design commits
|
||
|
||
**Commit:** `d4b2ec2`
|
||
|