Files

4.3 KiB

Daily Note — 2026-06-09

SquareMCP / Hermes MCP — Session Summary

Three major features shipped today across the backend and frontend.


1. Browser AI Connection UX — Deployed

What: A new "Connect ChatGPT or Claude" button in the SquareMCP dashboard that opens a provider picker, copies the MCP server URL to clipboard, and opens the AI assistant's connector settings.

Commits:

  • 6663e63 — add browser ai connection ux (Codex)
  • c8fce7d — fix browser ai connection on mobile (Kimi)

Files: product/app/index.html, product/app/app.js, product/app/styles.css

Problems found and fixed during deploy:

Problem Cause Fix
Button click did nothing Nginx caches .js/.css for 1 year; browser served old app.js without event listener Added cache-busting query params (?v=3) to asset links in index.html
Mobile: clipboard copy failed navigator.clipboard.writeText() fails on mobile Safari after window.open() steals focus Reordered: copy FIRST (inside user-gesture context), then open window
Mobile: no fallback if clipboard fails No manual copy mechanism Added robust clipboard fallback (document.execCommand('copy')), mobile detection, "Copy URL" button, and mobile-specific instructions

Deployed image: squaremcp-app@sha256:9803b14ccbe007a0c05dc2045b4fea671236a2b51e1e59ac839f431f0c4ce9d2

Vault note: SquareMCP/2026-06-08-browser-ai-connection-ux.md


2. ChatGPT Connector Discovery + Email REST Endpoints — Deployed

What: Backend support for ChatGPT's browser connector runtime, plus authenticated email REST endpoints for API consumers.

Commit: 2f717ea — feat: ChatGPT connector discovery + email REST endpoints

Changes:

  • GET /mcp without session ID returns ChatGPT OpenAPI spec (handles ?only_resources=true with empty list)
  • New email REST endpoints:
    • GET /api/email/profile
    • GET /api/email/search
    • GET /api/email/read
    • POST /api/email/send
  • Removed split OpenAPI specs (/openapi-messaging.json, /openapi-media.json) per product decision

Files: src/index.ts

Deployed image: hermes-mcp@sha256:9b4219dfd77ce90273f4d280f901f35eb1b688d6dd0428c360cc30abdc25fe02


What: Durable tracking redirect URLs (/t/:token) for Lodge Brothers Beta. MySQL is the source of truth; Redis is not involved in the redirect path.

Commit: 5effb41 — feat(tracking): MySQL-backed tracking links + pilot schema

New files:

  • src/tracking-links.ts — core module (create, get, record click, validate URL, bot detection)
  • src/tracking-links.test.ts — 20 tests, all passing

Schema additions (auto-applied via initDatabase()):

  • tracking_links table — token, customer_id, draft_id, destination_url, click_count, expires_at
  • post_drafts table — id, tenant_id, draft text, status enum, utm_token
  • 6 pilot columns on customers — pilot_active, pilot_paused, pilot_end_date, pilot_owner_phone, industry, location

Public route: GET /t/:token — no auth required, returns 302 redirect, bot-filtered click counting

Verification:

  • Build: ✅
  • Tests: ✅ 20/20
  • Unknown token → 404: ✅
  • Health endpoint: ✅
  • K8s rollout: ✅

Deployed image: hermes-mcp@sha256:fbe8a90ca5f49800c6e1b3b70c4f2ab1031cb59880fa381631b855e91e7fc5df

Vault notes:


Deployment Log

Service Image SHA Status
hermes-mcp sha256:fbe8a90ca5f49800c6e1b3b70c4f2ab1031cb59880fa381631b855e91e7fc5df ✅ Rolled out
squaremcp-app sha256:9803b14ccbe007a0c05dc2045b4fea671236a2b51e1e59ac839f431f0c4ce9d2 ✅ Rolled out

Remaining Tasks / Next Up

  • Lodge Brothers beta: pilot draft cron (weekly Claude API draft generation)
  • Lodge Brothers beta: WhatsApp approval flow (inbound "1/2/3" → publish)
  • Lodge Brothers beta: lead dashboard (GET /dashboard)
  • Marketplace submission: ChatGPT GPT Store (private GPT → test → public review)
  • Marketplace submission: Claude.ai Integrations (developer program application)
  • MicroK8s TLS cert refresh (kubectl exec/logs broken due to node IP mismatch)