Files
hermes-mcp/product
Garfield 61dab40585 feat(saas): SquareMCP v2 — multi-tenant MCP platform complete
Steps 0–10 of the v2 plan, 194 tests passing.

Core infrastructure
- Shared Redis client (src/redis.ts); all four Redis consumers migrated
- Vitest test harness with vitest.config.ts and npm test/test:watch scripts

Billing & invoicing (Steps 1–2)
- Monthly invoice generation with idempotency (MySQL uq_customer_period unique key)
- Cron job with Redis distributed lock (Lua compare-delete, 1-hr TTL)
- Invoice emailer via nodemailer (FETCHERPAY SMTP)
- Billing middleware: checkLimit gate in handleToolCall; platform attribution fix

Email multi-tenancy (Step 3)
- EmailCtx = Account | EmailCredentials; imap.ts + smtp.ts accept both
- resolveEmailCtx helper in tools.ts; all email tools use customer credentials

Analytics + platform health (Steps 4–5)
- Chart.js bar charts for platform breakdown and daily activity
- Token expiry check in getCredential with dynamic import refresh
- platform-health.ts: per-platform health probe with 10-min Redis cache
- GET /api/health/platforms; "Token expired" amber badge in dashboard

Tool schema filtering (Step 6)
- stripAccountParam deep-clones tool schemas; multi-tenant sessions never
  see the internal account enum

OAuth hardening (Step 7)
- Atomic auth code consumption: UPDATE SET used=TRUE, check affectedRows
- customer_id threaded through oauth_auth_codes → oauth_tokens
- getTokenCustomer(); requireAuth resolves req.customer from Bearer token
- Consent page requires authenticated session; redirect_uri validated
  against registered URIs; http://localhost:* loopback wildcard

DCR browser flow (Step 8)
- ensureOAuthAppRegistered() upserts pre-registered SquareMCP OAuth app
  on startup with redirect URIs for mcp-callback, localhost:*, claude-desktop,
  opencode
- GET /oauth/connect-mcp → server-side redirect (client_id off frontend)
- GET /oauth/mcp-callback → exchanges code, renders config snippet page
  with copy buttons for Claude Desktop and Codex CLI

Webhooks (Step 9)
- webhook_url + webhook_secret columns on customers
- deliverWebhook(): HMAC-SHA256 signing, 3× exponential retry (1s/4s/16s),
  Redis DLQ with 7-day TTL on total failure
- isValidWebhookUrl(): SSRF protection (blocks RFC-1918, localhost, .local)
- POST /api/webhooks/config (secret returned once), GET, DELETE
- GET /api/admin/webhooks/dlq/:customerId
- WhatsApp POST route uses express.raw() for raw body preservation
- Dashboard Webhooks tab with secret-once display and copy button

Developer docs (Step 10)
- docs/ static HTML site (GitHub Pages, no build pipeline)
- index.html: landing page with client + platform overview
- getting-started.html: tabbed MCP config for Claude Desktop, Codex CLI, opencode
- platforms.html: LinkedIn, TikTok, WhatsApp, Instagram, Twitter, Telegram guides
- agent-tutorial.html: complete Node.js agent (Anthropic SDK + MCP SDK),
  LinkedIn posting loop, extensions for multi-platform + inbound webhook reaction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 23:43:56 -04:00
..

SquareMCP

SquareMCP is the productization path for Hermes: a managed MCP gateway for internal tools.

Positioning

Expose internal tools to AI agents with:

  1. authentication
  2. tool permissions
  3. audit logs
  4. observability
  5. managed hosting

The product is aimed at teams building internal AI copilots that need speed, control, and governance.

Offer

Core product

SquareMCP, a managed MCP gateway for internal tools.

Primary buyer

Teams building internal support, operations, and workflow copilots.

Why they buy

  1. safer access to internal systems
  2. faster deployment of agent tooling
  3. auditability for regulated or high-trust environments

Packaging

Free

  1. 1 workspace
  2. 2 connectors
  3. limited monthly tool calls
  4. community support

Team

Price: $199 to $499 per month

  1. 10 connectors
  2. role based permissions
  3. audit logs
  4. retries and rate limits
  5. email support

Business

Price: $1,500 to $3,000 per month

  1. SSO
  2. private networking
  3. longer log retention
  4. alerts
  5. SLA
  6. advanced observability

Enterprise

Price: $20k to $100k+ per year

  1. VPC or on prem deployment
  2. compliance features
  3. dedicated support
  4. custom connectors
  5. architecture review

Revenue model

  1. subscription
  2. setup fee
  3. usage

Recommended starting offer:

  1. $5k to $10k setup
  2. $500 to $3k monthly

30-day launch sequence

  1. Ship the landing page with "Book a pilot" CTA
  2. Write and post the Show HN launch
  3. Post the short pitch on LinkedIn the same week
  4. Schedule Product Hunt after initial social proof

Repo layout

  • incubation/: product strategy and go-to-market notes
  • site/: landing page scaffold

Verification

Run the live site verification suite with:

  1. npm run test:product-site:verify
  2. npm run deploy:product-site:verify
  3. npm run test:product-site:cleanup

Verification notes live in:

  • site/VERIFICATION.md