Files
conversation-history/SquareMCP/Agent Handoff - 2026-04-28.md

5.9 KiB

Agent Handoff — 2026-04-28

Session with Claude (Sonnet 4.6) covering Hermes MCP infrastructure fixes, ChatGPT integration, and monetization planning.


What was built today

1. Obsidian full CRU via REST API

Hermes now exposes a REST API layer on top of the MCP tools so ChatGPT can call them directly:

Endpoint Operation
GET /api/obsidian/search?query=... Search notes
GET /api/obsidian/note?path=... Read a note
POST /api/obsidian/note/append Append / create
PUT /api/obsidian/note Full overwrite (new)
GET /api/obsidian/sync Sync status

2. obsidian_update_note tool

Added full-overwrite tool to both the MCP tool list and the REST API. Previously only append existed. This enables true Update in CRU.

3. OpenAPI spec + ChatGPT plugin manifest

  • GET /openapi.json — OpenAPI 3.1 spec describing all Obsidian REST endpoints
  • GET /.well-known/ai-plugin.json — ChatGPT plugin manifest pointing to the spec
  • GET /privacy removed from Hermes (wrong domain)

4. Privacy policy

Added privacy.html to the squaremcp.com site. Live at https://squaremcp.com/privacy. Used for ChatGPT GPT store / Custom GPT publishing requirements.

5. ChatGPT MCP connector proxy route

Added POST /hermes-mcp/:linkSegment/:toolName and GET /hermes-mcp/:linkSegment/:toolName to handle ChatGPT's internal MCP proxy path format. ChatGPT routes MCP tool calls as /hermes-mcp/link_{id}/{toolName} — this route forwards them to the tool handler.

6. MCP session auto-recovery

Previously, pod restarts wiped in-memory MCP sessions and ChatGPT got "Resource not found" on every deployment. Fixed by auto-creating a new session transparently when an unknown session ID arrives. Tools are stateless so no context is lost.

7. OAuth token TTL extended

Increased from 1 hour to 24 hours. ChatGPT no longer loses connection mid-day.

8. Hermes Custom GPT (ChatGPT)

Created and published a Custom GPT named Hermes at chatgpt.com. It uses the OpenAPI Actions system (not MCP) to call the REST endpoints above.

  • OAuth client ID: 6059dbc0-60e8-4964-807b-b3997e2daf7c
  • Auth URL: https://hermes.fetcherpay.com/oauth/authorize
  • Token URL: https://hermes.fetcherpay.com/oauth/token
  • Scope: obsidian email

The Custom GPT is the working path for ChatGPT web today.


Why it was built this way

ChatGPT web chat only surfaces officially approved connectors (Gmail, GitHub, Notion Legacy) in its runtime callable registry. MCP connectors connect at the Settings level but do not get mounted into the web chat runtime for unapproved servers. The Custom GPT + OpenAPI Actions path bypasses this limitation entirely.

The ChatGPT desktop app (Mac/Windows) does expose MCP connectors in the runtime without approval gating. So:

  • Web chat → use Custom GPT (Hermes GPT)
  • Desktop app → use MCP connector at https://hermes.fetcherpay.com/mcp

Current state

Component Status
Hermes MCP server Running on K8s, hermes.fetcherpay.com
MCP tools Email (7 accounts) + Obsidian (search, read, append, update, sync)
REST API Live at /api/obsidian/*
OpenAPI spec Live at https://hermes.fetcherpay.com/openapi.json
ChatGPT Custom GPT Live, named Hermes, visible in sidebar
ChatGPT MCP connector Connected in Settings, not in web runtime (by design)
Privacy policy https://squaremcp.com/privacy
Vault location (host) /home/garfield/obsidian/vaults/
OAuth DB hermes_oauth on MySQL at 127.0.0.1

Monetization track (not yet started)

Context

The goal is to turn SquareMCP into a commercial product — a personal MCP server platform that connects AI assistants to people's own tools (email, notes, internal systems).

Track items identified

  1. ChatGPT connector approval

    • Apply to OpenAI to get Hermes listed as an official connector
    • This makes it appear in the web chat runtime callable registry for any user
    • This is also the path to appearing in the ChatGPT plugin/connector marketplace
    • Tied to monetization because approval = distribution
  2. GPT store publishing

    • The Hermes Custom GPT can be published to the ChatGPT GPT store
    • Requires: privacy policy ✓, OAuth ✓, OpenAI revenue sharing enrollment
    • Revenue sharing: OpenAI pays builders based on GPT usage (ChatGPT Plus users)
    • Next step: enroll in OpenAI's builder revenue program
  3. SquareMCP as a product

    • The pilot request form is live at squaremcp.com
    • Pilot submissions go to SquareMCP/Pilot Requests.md in the vault
    • The product thesis: sell hosted personal MCP servers to professionals who want AI connected to their own tools without building infrastructure
    • Target: knowledge workers, founders, operators
  4. Connector approval = distribution moat

    • Getting approved as a ChatGPT connector puts Hermes/SquareMCP in front of every ChatGPT user
    • This is the same path Notion, GitHub, Gmail took
    • Should be pursued in parallel with GPT store
  1. Enroll in OpenAI builder revenue sharing
  2. Publish the Hermes Custom GPT publicly on the GPT store
  3. Draft the ChatGPT connector approval application (OpenAI partner program)
  4. Define the SquareMCP paid tier — what does a customer get, what does it cost

Files changed today

  • src/index.ts — REST API, MCP proxy route, session auto-recovery, privacy route removed
  • src/tools.ts — added obsidian_update_note tool + handler
  • src/clients/obsidian.ts — added updateNote() function
  • src/manifest.ts — added getOpenApiSpec(), schemas: {} fix
  • src/oauth.ts — token TTL 1h → 24h
  • product/site/privacy.html — new privacy policy page
  • product/site/server.mjs — added .html extension fallback for clean URLs
  • product/site/Dockerfile — added privacy.html to build