.mdeck API on Whop hosting, with OpenAPI and MCP for agents #61

Open
opened 2026-10-15 20:57:10 +00:00 by teahubxyz · 2 comments
Owner

Base: gh-pages

Follow-up to #60. Whop's app hosting runs server code: it keeps runtime logs (console output, exceptions, failed requests) and its hosting guide covers secrets and an injected Whop API key. So .mdeck can have a real API on its whop.site address with no hosting bill for the factory. That makes the openapi view honest, and the same endpoints can be offered over MCP.

Stateless endpoints, nothing stored:

  • POST /api/link: deck text in, the #d= link out, using the same deflate + base64url recipe as SKILL.md. This is for agents that can't run code.
  • POST /api/html: deck text in, the self-contained HTML file out, the same output as Copy deck as HTML.
  • POST /api/check: deck text in, a per-slide report of which slides will shrink or be cut in two, using the editor's thresholds.
  • GET /openapi.json describing those three, served as the app's openapi view.
  • An MCP endpoint at /mcp (streamable HTTP) exposing the same three as tools: make_deck_link, deck_to_html, check_deck.
  • SKILL.md gains a short section pointing agents at the API and the MCP endpoint, and keeps the code recipe for agents that prefer it.
  • The link, HTML and check logic lives in one module shared by the page and the API, so they can't drift. Tests compare the API's output with the page's for the same decks.
  • Check Whop's hosting guide for the server entry format before building.
  • Nothing on Whop in this card either. Deploying and registering the openapi view wait for the operator's OK on the Whop previews.

Depends on #60

DONE: PR open against gh-pages; the three endpoints, /openapi.json and /mcp pass their tests locally; API output matches the page's for the test decks; CI green.

Base: gh-pages Follow-up to #60. Whop's app hosting runs server code: it keeps runtime logs (console output, exceptions, failed requests) and its hosting guide covers secrets and an injected Whop API key. So .mdeck can have a real API on its whop.site address with no hosting bill for the factory. That makes the `openapi` view honest, and the same endpoints can be offered over MCP. Stateless endpoints, nothing stored: - `POST /api/link`: deck text in, the `#d=` link out, using the same deflate + base64url recipe as SKILL.md. This is for agents that can't run code. - `POST /api/html`: deck text in, the self-contained HTML file out, the same output as **Copy deck as HTML**. - `POST /api/check`: deck text in, a per-slide report of which slides will shrink or be cut in two, using the editor's thresholds. - `GET /openapi.json` describing those three, served as the app's `openapi` view. - An MCP endpoint at `/mcp` (streamable HTTP) exposing the same three as tools: `make_deck_link`, `deck_to_html`, `check_deck`. - SKILL.md gains a short section pointing agents at the API and the MCP endpoint, and keeps the code recipe for agents that prefer it. - The link, HTML and check logic lives in one module shared by the page and the API, so they can't drift. Tests compare the API's output with the page's for the same decks. - Check Whop's hosting guide for the server entry format before building. - Nothing on Whop in this card either. Deploying and registering the `openapi` view wait for the operator's OK on the Whop previews. Depends on #60 DONE: PR open against gh-pages; the three endpoints, /openapi.json and /mcp pass their tests locally; API output matches the page's for the test decks; CI green.
teahubxyz added the ready label 2026-10-15 20:57:10 +00:00

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch time/card-61.

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch `time/card-61`. <!-- time {"beat":"dispatched","launched":true,"worker":"anthropic"} -->

⏱️ Time: the worker call failed: sonnet stopped without a PR after 43 steps: I'm proceeding with option (a) from my last message. Before writing code, I'll read the two page pieces I haven't seen yet.. Comment /time retry to try again.

⏱️ Time: the worker call failed: `sonnet stopped without a PR after 43 steps: I'm proceeding with option (a) from my last message. Before writing code, I'll read the two page pieces I haven't seen yet.`. Comment `/time retry` to try again. <!-- time {"beat":"error"} -->
teahubxyz added queued and removed ready labels 2026-10-17 18:17:48 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: teahubxyz/time#61