{"slug": "doop-open-source-alternative-to-paper-design", "title": "Doop: Open-Source Alternative to Paper.design", "summary": "Doop has launched as an open-source alternative to Paper.design, a multiplayer design canvas where humans and AI agents edit the same Frames of real HTML rendered in sandboxed iframes. AI agents connect through Doop's built-in MCP server, with support for Claude Code, Codex, ChatGPT, Cursor and OpenCode, while the built-in Doop Agent runs on GPT, Claude, Gemini, DeepSeek, Kimi or Qwen models. Doop self-hosts with a single `docker compose up` command or `bun run dev` with zero configuration, using embedded Postgres and no external services.", "body_md": "**[Doop](https://doop.design/?utm_source=github) is the open-source alternative to [Paper.design](https://paper.design) — a multiplayer\ndesign canvas for humans *and* AI agents.** Every design lives on a shareable **Canvas**\n(`/c/<id>`) holding **Frames** — artboards that render real HTML in sandboxed iframes. People edit\nin the browser; AI agents edit through the built-in **MCP server**, streaming their designs in\nlive. Everyone sees everything as it happens: cursors, presence, frame edits, agent status, and an\nactivity feed.\n\nThink of it as Claude Design for whichever agent you already use: **Claude Code, Codex, ChatGPT,\nCursor, OpenCode** or any other MCP client designs on the same canvas, and the built-in Doop Agent\nruns on **GPT, Claude, Gemini, DeepSeek, Kimi or Qwen** models\n([every agent and model](#works-with-any-agent)).\n\n- **Design with agents, not prompts-and-refresh** — connect Claude Code (or any MCP client) once,\nthen watch it sketch, stream and self-review designs on your canvas, next to your cursor.\n- **A built-in Doop Agent** — queue a card or @mention a role and it designs on its own, no client\nto connect. Runs on the model account each user connects (a**ChatGPT subscription** , or an\nOpenAI, Claude, Gemini, DeepSeek, Kimi or OpenRouter key), or on the server's`ANTHROPIC_API_KEY` for as many\nfree tasks as`RESIDENT_TASK_LIMIT` grants (none by default) ([setup](#the-doop-agent) ); the\nfirst-canvas welcome performance is scripted and runs without any of it.\n- **Pages within a canvas** — organize frames into named pages from the Layers panel. Add, rename,\ndrag to reorder, double-click to rename, or right-click to rename and delete empty pages.\nPage edits support Undo/Redo; selected frames can move between pages. Agents can list pages\nwith`get_canvas` , manage them with`set_canvas_pages` (passing the original list as`expectedPages` to protect collaborators), and target frames with`pageId` . Each page can wear\na canvas colour of its own, as in Figma: with nothing selected, the sliders icon on the right\nopens the Page panel with its Background swatch (agents:`set_page_background` ); cleared, the\npage shows the theme paper again.\n- **Clickable prototypes** — wire elements to other frames (click, hover, press, key or delay;\nnavigate, overlay, back, scroll or link, with transitions) in Prototype mode or straight in the\nHTML, then click through the flow with Play or share`/c/<id>/proto` . Agents use the same`data-doop-*` attributes plus`get_prototype` /`set_prototype_start` .\n- **A real canvas editor** — draw frames, shapes, pen paths and text, edit any element's fill,\ntype and flex layout, snap to rulers and guides, zoom from 8% to 1600%\n([the editor](#the-canvas-editor) ).\n- **True multiplayer** — live cursors, presence, follow mode, per-frame editing indicators,\nundo/redo, threaded comments on elements or the canvas, and an activity feed, all over one\nWebSocket room.\n- **Design memory** — pin exemplar frames, capture decisions, and let the distiller propose durable\nstyle rules that every agent follows.\n- **Private by default** — invite collaborators by email or share a link that can view, comment\nor edit; agents inherit exactly their human's access.\n- **Self-host in one command** —`docker compose up` , or`bun run dev` with zero configuration\n(embedded Postgres, no external services required).\n\nDoop isn't tied to one model vendor. Every agent below designs through the same MCP server, works\nas the person who connected it, and shows up live on the canvas with its own cursor, status and\ntasks. **Connect AI** in the top bar walks you through each one.\n\n| Agent | How it connects | \n|---|---|\n| Claude Code | `claude mcp add` , OAuth in the browser ([setup](#hook-up-claude-code) ) | \n| Claude (web and desktop) | **Add to Claude** in Connect AI ([setup](#connect-claude) ) | \n| Codex (CLI and desktop) | `codex mcp add` , OAuth in the browser ([setup](#connect-an-ai-agent) ) | \n| ChatGPT | A custom MCP server in ChatGPT, guided by **Connect AI → ChatGPT** | \n| Cursor | **Add to Cursor** in Connect AI | \n| OpenCode, VS Code Copilot, OpenClaw and more | Any MCP client, over OAuth or with an agent key ( [setup](#connect-an-ai-agent) ) | \n| Headless agents (n8n, Mastra, CI) | An agent key as a bearer header ( [setup](#headless-agents-agent-keys) ) | \n\nNo agent of your own? The built-in [Doop Agent](#the-doop-agent) runs on the model account you\nconnect: a ChatGPT subscription, or an OpenAI, Claude, Gemini, DeepSeek, Kimi or OpenRouter key.\nOpenRouter brings Qwen, GLM, MiniMax and more ([details](#past-the-free-tasks-connect-your-own-chatgpt)).\n\n```\ngit clone https://github.com/kgoedecke/doop && cd doop\nbun install\nbun run dev\n```\n\nDoop builds and installs with [bun](https://bun.sh) (`bun.lock` is the only\nlockfile); the server itself runs on Node.\n\n- Web app: **[http://localhost:4300](http://localhost:4300)**\n- API + WebSocket + MCP server: **[http://localhost:4400](http://localhost:4400)** (the web port proxies`/api` ,`/ws` ,`/mcp` ,`/.well-known` ,`/i/` ,`/ingest` and`/local-agent` to it)\n\n`bun run dev` and `bun run build` also package the Claude Desktop extension with a Node script,\nso Node must be on your `PATH` as well.\n\nEverything works with no configuration: data persists to an embedded Postgres (PGlite) in `data/pg`,\nand every optional integration (SMTP, stock photos, object storage, analytics) degrades gracefully\nuntil its variable in [.env.example](https://github.com/kgoedecke/doop/blob/main/.env.example) is set ([the ones that matter](#environment-variables)).\nThe built-in [Doop Agent](#the-doop-agent) runs once a user connects a model account in Settings\n(or on the server's `ANTHROPIC_API_KEY` if you raise `RESIDENT_TASK_LIMIT`) — agents you connect\nyourself over MCP need no key.\n\nOr self-host the production build with Docker:\n\n```\nBETTER_AUTH_SECRET=$(openssl rand -hex 32) docker compose up -d   # app + Postgres on :4400\n```\n\nProduction build without Docker: `bun run build && bun run start` (single server on :4400 serving\neverything). Set `DATABASE_URL` to use a real Postgres — same code path as PGlite.\n\nPrefer not to run anything? **[doop.design](https://doop.design)** is the hosted version.\n\nOnce you sign in, Home is where you start: describe what you want and Doop makes a canvas with drafts queued for the Doop Agent, or pick up one of your canvases, workspaces and connected agents.\n\nThe bottom toolbar holds the tools; every one has a single-key shortcut. Shapes drawn on the canvas become standalone elements, and shapes drawn inside a frame become positioned HTML/SVG layers of that frame, so agents read and edit them like any other markup.\n\n| Tool | Key | What it does | \n|---|---|---|\n| Select | V | Click to select, drag the background for a marquee, ⇧/⌘-click to add to the selection | \n| Hand | H | Pan (Space or the middle button pans from any tool) | \n| Frame | F | Draw an empty frame | \n| Rectangle | R | Draw a rectangle | \n| Circle | O | Draw a circle or ellipse | \n| Vector path | P | Bézier pen: snaps to its own anchors, previews closing the path; Alt skips snapping | \n| Text | T | Place a text layer | \n| Comment | C | Pin a comment to an element or to the canvas | \n\n- **Frames** — drag to move, pull the corner handle to resize, snap to neighbours and guides.\nThe Inspector edits name,\nposition, size and the raw HTML, marks the frame ready for dev, exports it, and pins it as a\nstyle reference;**Version history…** in the frame menu previews and restores earlier designs.\n- **Elements inside a frame** — click to select, drag a corner grip or edge to resize (⇧ keeps the\nratio; a`W × H` badge shows the size), drag the element to\nmove it within or across frames. The**Design** tab edits fill, stroke, text (font, size, weight,\nalignment), opacity, corner radius, rotation, position, flex layout (direction, gap, padding,\nwrap, alignment) and image fills;**HTML** shows its source;**Prototype** wires interactions. The\nfloating toolbar adds Comment,**Ask AI** (pre-fills an`@mention` ), Code, Edit text and Copy link.\n- **Rich text** — double-click text to edit it. Select words and use the formatting toolbar for\nbold, italic, underline, strikethrough, bulleted lists or numbered lists. ⌘/Ctrl+B, I and U toggle\ninline formatting; ⌘/Ctrl+⇧+7 or 8 toggles numbered or bulleted lists. Enter continues a list;\nEnter on an empty item leaves it. With a text layer selected on the canvas, ⌘/Ctrl+B, I, U and\n⌘/Ctrl+⇧+X toggle the whole layer and ⌘/Ctrl+⇧+7 or 8 make it a list, as in Figma. Esc finishes editing; formatting saves with the frame and\nsupports undo/redo. With words selected, the Design panel's font, size, weight and colour edit\nthat run alone; selecting the whole layer shows**Mixed** where its runs differ, and a value set\nthere applies to all of them, as in Figma.\n- **Path editing** — double-click a path to drag its anchors and Bézier handles, switch points\nbetween corner and curve, or delete them. Alt moves one handle on its own; ⇧ constrains its angle.\n- **Layers** — a searchable tree of pages, frames and elements: drag to reorder or reparent, hide,\nlock, collapse, and right-click an element for copy, paste, duplicate, Copy HTML, Copy selector\nand Copy link to element.\n- **Rulers and guides** — ⇧R shows rulers; drag out of one to add a guide. Guides belong to the page,\nundo like any edit, and everything snaps to them within 8 screen pixels.\n- **Zoom** — 8% to 1600%. Wheel pans, ⌘/Ctrl + wheel or a pinch zooms; a 1px pixel grid fades in from\n300%. The zoom menu has 50/100/200% presets and the rulers toggle.\n- **Panels** — the right side panel has**Agents** ,**Comments** ,**Activity** and**Memory** tabs;\nLayers and the side panel can be resized, and ⌘. hides all UI.\n- **Themes** — Light, Dark or System under Settings → Appearance.\n- **Phones** — the canvas works on a phone: one-finger pan, pinch zoom, tap to comment, and bottom\nsheets for canvas actions, Layers and the Inspector.\n\n| Shortcut | Action | \n|---|---|\n| ⌘Z / ⌘⇧Z (or ⌘Y) | Undo / redo your own edits | \n| ⌘C / ⌘V / ⌘D | Copy, paste, duplicate frames or layers | \n| ⌫ | Delete the selected element, else the selected frames | \n| ⌘⇧H / ⌘⇧L | Hide / lock the selection | \n| ⌥↑ / ⌥↓ | Move a layer up or down (Layers panel) | \n| ⇧1 / ⇧2 | Zoom to fit everything / the selection | \n| ⌘0 / ⌘+ / ⌘− | Zoom to 100%, in, out | \n| ⇧R | Toggle rulers | \n| ⌘. | Hide or show all UI | \n| ⌘⌥↩ | Present from the selected frame (Ctrl+Alt+↩ elsewhere) | \n| ⌘K | Open the Agents composer (on Home: the search palette) | \n| Esc | Deselect, stop following | \n\nClick a collaborator's avatar to follow their viewport; an agent's avatar flies you to what it is working on. Placeholder frames show where an agent that has picked up a card is about to design.\n\nComment on any element or anywhere on the canvas. The **Comments** tab lists the page's threads\n(open or resolved) with their replies. `@mention` an agent role in a comment or a reply (for example\n`@doop`) to queue a design card; the agent's answer comes back in the thread. People who miss a\ncomment get an email digest (opt out under Settings → Account), and canvases opened through a\nview-only or comment-only link show a badge and disable editing.\n\nThe import source picker offers **Website** (one page, or discover a whole site and pick its pages),\n**Live app** (the [sync snippet](#design-sync-push-an-apps-live-screens-onto-a-canvas)), and\n**GitHub repo** (through the GitHub App or a fine-grained token: Doop reviews the repo's screens and\ncomponents and queues cards for the Doop Agent to sketch them and extract the design system into a\nstyle guide).\nRight-click a frame and choose **Export…** to download PNG, JPG or a vector PDF (of the frame, or of\nevery selected frame as one PDF). **Export** in the top bar binds any frames of the page into one PDF. A progress toast tracks the\nrender; the desktop app opens its native save panel. Every frame also has a public live image at\n`/i/<frameId>.png?scale=2` (or `.jpg`) that re-renders when the design changes, handy as an\n`og:image` or in docs.\n\nFigma, Canva and Photoshop (PSD) import and export are currently available in\n[Doop Cloud](https://doop.design) and not part of the open source.\n\n**Integrations** in the rail is where an account connects the outside tools Doop works with:\n\n| Integration | What it does | \n|---|---|\n| Linear | Read issues through MCP, or delegate an issue to Doop: it designs a canvas and reports the result back to Linear ( [setup](https://github.com/kgoedecke/doop/blob/main/docs/linear.md) ) | \n| Slack | Mention `@Doop` with a brief; it designs a canvas and posts the result in the thread ([setup](https://github.com/kgoedecke/doop/blob/main/docs/slack.md) ) | \n| Meta Ads | Pull ad creatives onto a canvas on a schedule with an [automation](#automations) | \n\nThe Figma integration (import frames as editable HTML, export frames back to Figma) and the Canva\nintegration (import designs as editable frames, send frames back with live text) are currently\navailable in [Doop Cloud](https://doop.design) and not part of the open source. A self-hosted\nIntegrations page shows Linear, Slack and Meta Ads.\n\n**Outbound webhooks** (Settings → Webhooks) POST a signed JSON event to your own URL when a\ncomment is created, replied to or resolved, when a frame is created, or when an agent finishes or\nfails a board card, with retries and a test ping ([events and signatures](https://github.com/kgoedecke/doop/blob/main/docs/webhooks.md)).\n\nTo reference a specific element in feedback, select it and choose **Copy link**\nin its floating toolbar, or right-click its Layers row and choose **Copy link to\nelement**. Opening the link selects the element and opens its properties on the\ncorrect page. The URL includes the canvas ID, frame ID and URL-encoded CSS\n`selector`, so an AI agent can locate it in the frame HTML. Canvas access rules\nstill apply. Selectors that use element IDs survive layout changes; selectors\nbased on sibling positions can change when the HTML is restructured.\n\nSelect a frame and turn on **Development → Mark as approved** in the inspector,\nor right-click one or more frames and choose **Mark ready for dev**. A green badge\nappears above the screen and in Layers. Hover the toggle row or a badge to see\nwho approved it and when. Turn the toggle off to move an approved screen back to draft.\n\nChanging the HTML or frame dimensions switches an approved screen to **Needs review**;\nreview it and turn **Mark as approved** on again. Moving, renaming, hiding, locking, or moving\nbetween pages keeps approval. Copies start as drafts. An approval checks the frame\nrevision so a concurrent edit cannot accidentally be approved, and waits for live\ndesign streams to finish.\n\nAgents can read `approvalStatus` (`draft`, `ready_for_dev`, `needs_review`) and\n`approval` attribution in `get_canvas` and `get_frame`. Call\n`get_canvas({ canvas_id, approval_status: \"ready_for_dev\" })` to find approved\nscreens, then re-read `get_frame` before implementing. Only `ready_for_dev` is\ncurrent sign-off. Approval is set by people in the app, or by an agent when a person asks\nit to: `set_frame_approval({ frame_id, status: \"ready_for_dev\" | \"draft\" })` (MCP and the Doop\nAgent) records the approval in that person's name, with the agent shown as \"via\". An agent\nnever approves unasked, and automation runs cannot approve. In **Automations**, choose\n**Designs are approved** to run a workflow when frames on a selected canvas become\nready for dev. Without an enabled workflow, approval only records sign-off.\n\nThe REST equivalent is `PUT /api/frames/:id/approval` with\n`{ status: \"ready_for_dev\" | \"draft\", expectedUpdatedAt }`. The signed-in user's\nidentity supplies the attribution; the endpoint uses the same canvas access rules\nas editing and returns `409` when the reviewed revision is stale.\n\nTurn frames into a flow you can click through. Switch on **Prototype mode** (top bar), pick an\nelement and add an interaction in its **Prototype** tab, or drag the handle on its right edge\nonto another frame. Each interaction is a trigger (click, hover, press, a key or a delay) and an\naction (go to a frame, open one as an overlay, go back, close the overlay, scroll, open a link),\nwith an optional transition: dissolve, slide or push. Connectors on the canvas show where every\nelement leads, and a **Start** flag marks the frame each page's flow begins on.\n\nPress **Play** to run it full screen, or share `/c/<canvas-id>/proto`: the player follows the\nsame canvas access rules, and the browser's Back and Forward walk the flow. Frames stay live\nwhile you play, so an edit on the canvas shows up on the screen you are looking at.\n\nInteractions are plain attributes on the element in the frame HTML, so they sync, version and export with the frame, and agents write them with the same tools they design with:\n\n```\n<button data-doop-on=\"click\" data-doop-action=\"navigate:<frameId>\" data-doop-transition=\"push-left\">Book stay</button>\n```\n\nAgents check their wiring with `get_prototype`, which flags links to missing frames, and set\nthe start with `set_prototype_start`. Both the MCP server and the built-in Doop Agent have them.\nThe full attribute reference is in [`.context/specs/prototyping.md`](https://github.com/kgoedecke/doop/blob/main/.context/specs/prototyping.md).\n\nThe SwiftUI iOS app lives in [`ios/`](https://github.com/kgoedecke/doop/blob/main/ios/README.md). Open `ios/Doop.xcodeproj`\nin Xcode to run it against Doop Cloud or your own HTTPS server. It uses SwiftUI for the app interface and a native canvas that\nrenders frames with the Blitz HTML/CSS engine (Rust, no WebKit), over the same REST API and WebSocket rooms. The app is in development;\nsee the iOS README for validation status and remaining release requirements.\n\nThe native Kotlin/Jetpack Compose app lives in [`android/`](https://github.com/kgoedecke/doop/blob/main/android/README.md).\nOpen that directory in Android Studio or run `./gradlew assembleDebug` from it.\nIt shares iOS's Blitz/Skia renderer and the existing REST/WebSocket backend, with\nnative canvas gestures, editing, agent prompts, comments, exports and optional\nbackground task notifications. It targets ARM64 phones and tablets on Android 8+.\nSee the Android README for setup, tests and release signing.\n\nChoose **Connect AI → Claude → Add to Claude**. On hosted Doop, this opens Claude's\nconnector form with Doop's name and server URL filled in. Confirm it, sign in to\nDoop, then start a new Claude chat and paste the canvas prompt from the dialog.\nNo file download, terminal or API key needed.\n\nThe updated Doop desktop app also offers **Add to Claude** for local and self-hosted\nservers: it opens Claude Desktop's extension installer directly, with your server\nURL filled in. Confirm the installation in Claude and approve the Doop sign-in.\nThe online connector needs a publicly reachable HTTPS server; localhost connections\nuse the desktop app. Manual extension installation remains available as a fallback.\nBuild and installation details: [`claude-extension/`](https://github.com/kgoedecke/doop/blob/main/claude-extension/README.md).\n\nOne command connects Claude Code (or any MCP client) to your canvas:\n\n```\nclaude mcp add --transport http doop http://localhost:4300/mcp\n```\n\nThat triggers the standard MCP OAuth flow — a browser window opens, you approve, and from then on\nthe agent works **as you**. Ask it to design something on your canvas id and watch it happen live.\nEverything in this shot is the real flow: Claude Code announced itself with `set_status`, created a\nframe, and is streaming the pricing section in — presence avatar, \"for Kai Moreno\" attribution,\nthe frame chip, the working strip, and the task in the Agents panel.\n\nThe first canvas after signup comes with a performance: the Doop Agent streams a welcome design in while you watch — status in the working strip, a task in the panel, a pulsing border on the frame it's building.\n\nThat welcome performance is **scripted** (`server/demo.ts`) — a pre-authored frame replayed through\nthe same machinery real agents use, so it runs with no configuration at all. The Doop Agent proper\nneeds a key.\n\nDoop ships a built-in design team that lives in the server and picks work up on its own: queue a\nboard card, `@mention` a role in a comment, or post task feedback over the API, and it runs\nwithout a human in the loop. Roles (Doop builds; specialists own one pass each — UX, copy, brand,\naccessibility) are defined in [`shared/agents.ts`](https://github.com/kgoedecke/doop/blob/main/shared/agents.ts), and a card can be routed\nthrough several in order.\n\nNormally each user's own connected model account pays for their runs (next section). The server\ncan also pay for a free tier, on Anthropic by default, once `RESIDENT_TASK_LIMIT` is above 0:\n\n```\nANTHROPIC_API_KEY=sk-ant-...   # in .env, or the environment of your deployment\n```\n\nSame key gates the **guideline distiller** ([`server/distill.ts`](https://github.com/kgoedecke/doop/blob/main/server/distill.ts)), which proposes\ndurable style rules from your canvas.\n\nThe free tier can run on **Azure OpenAI** instead — useful when your organisation's credits or\ncompliance rules live there:\n\n```\nDOOP_AGENT_PROVIDER=azure\nAZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com\nAZURE_OPENAI_API_KEY=...\nAZURE_OPENAI_DEPLOYMENT=my-deployment\n```\n\nThe distiller stays on `ANTHROPIC_API_KEY` either way and quietly turns off without it.\n\nWhen a user's `RESIDENT_TASK_LIMIT` free tasks are gone, they don't lose the agent — they connect a\nmodel account and the Doop Agent keeps running on it. **A connected account takes over immediately**,\nfrom the very next task: the free tier is a trial that gets people here, not a balance to spend down\nfirst, and connecting stops costing the server anything from that moment. The connection is\naccount-level, so it lives at **/settings** (Home → Settings); the free-tier wall links there rather\nthan carrying its own copy, and \"Connect an AI agent\" on a canvas stays about MCP clients only. A\nuser can connect eight kinds of account; the Gemini cloud pilot and Claude Plan appear only where\nthe operator or the desktop app provides them:\n\n- **ChatGPT subscription** — OAuth against`auth.openai.com` , then inference through the Codex\nbackend that Plus/Pro/Business plans include. Tokens live in`model_accounts` and never reach a\nbrowser.\n- **OpenAI API key** — pay-as-you-go on the user's own OpenAI account, no subscription involved.\n- **OpenRouter API key** — one key for a curated multi-vendor roster: Kimi, Qwen, GLM, DeepSeek,\nMiniMax, MiMo and Gemini Flash (the menu lives in[`shared/modelMenu.ts`](https://github.com/kgoedecke/doop/blob/main/shared/modelMenu.ts) ). Models without image input still work, in a\ndegraded mode: the agent skips screenshot review, verifies through the frame HTML instead, and\nthe picker labels them \"no visual review\".\n- **Gemini API key** — Google's Gemini models through their OpenAI-compatible endpoint, plus Nano\nBanana image generation.\n- **DeepSeek API key** — DeepSeek V4.1 Flash (with vision) and V4 Pro (text-only for now) on the\nuser's own platform.deepseek.com account.\n- **Kimi API key** — Moonshot's Kimi K3 models, all with vision, on the user's own\nplatform.moonshot.ai account. A key from Moonshot's China platform needs an operator to point`KIMI_CHAT_URL` at`https://api.moonshot.cn/v1/chat/completions` .\n- **Kimi Code plan** — a Kimi membership (Plus and up) through a key from the Kimi Code console,\nbilled to the membership rather than per token. Its own endpoint (`KIMI_CODE_CHAT_URL` ,`api.kimi.ai/coding/v1` overseas) and ids (`k3.1-pro` ,`k3.1-pro-highspeed` ,`k3` ); requests\nname Doop in their`User-Agent` , as Kimi Code's terms ask of every third-party tool.\n- **Gemini cloud pilot** — an operator-managed prototype running the official Gemini CLI in an\nisolated worker using Google sign-in. Disabled by default; see the[pilot setup and verification guide](https://github.com/kgoedecke/doop/blob/main/docs/gemini-cloud-pilot.md) .\n- **Claude API key** — pay-as-you-go on the user's own Anthropic account.\n- **Claude Plan (desktop app)** — the Doop desktop app runs the Doop Agent through the user's own\nlocal Claude Code login (`claude -p` ), with a per-run scoped MCP token. Once switched on it takes\nprecedence over connected accounts while the app is online. Setup:[`desktop/README.md`](https://github.com/kgoedecke/doop/blob/main/desktop/README.md#local-claude-cli) .\n\nThe ChatGPT, OpenAI, Claude and Gemini kinds get their model menu from the provider's own\ncatalog, asked with that account's credential when the picker opens (`server/modelCatalog.ts`,\n`GET /api/model-account/models`): the Codex backend's catalog for a ChatGPT subscription (the\nsame list the Codex CLI reads, asked as `CHATGPT_CODEX_CLIENT_VERSION`), OpenAI's and\nAnthropic's `/v1/models`, Gemini's `/v1beta/models`. A newly released model is on the menu\nwithout an upgrade; the curated entries above sit on top as recommendations, a curated tier the\naccount cannot run is left off, and the curated menu alone is served if the provider cannot be\nreached. OpenRouter, DeepSeek, Kimi and Kimi Code stay on their curated rosters, whose hand-checked vision\nflags are what the run relies on. DeepSeek and Kimi return their reasoning as `reasoning_content`\nand refuse a tool-calling conversation that leaves it out, so the transport keeps it in the run's\nhistory and sends it back on every turn.\n\nAzure OpenAI is deliberately *not* a connectable account kind, and the OpenRouter/Gemini/DeepSeek/Kimi\nendpoints are fixed constants: a user-supplied endpoint would be a URL the server fetches with the run's full\ncontext — an SSRF vector — so custom endpoints stay server-level configuration only.\n\nEither way the user picks their **model tier** in Settings from that provider's curated menu — on\nOpenAI, `gpt-6-astra` (the newest flagship; on a ChatGPT subscription it needs Plus or better and\nOpenAI is still rolling it out per account), `gpt-5.6-sol` (flagship), `gpt-5.6-terra` (the default\nworkhorse) or `gpt-5.6-luna` (cheap and fast). They are paying for it, so the choice is theirs;\n`DOOP_AGENT_OPENAI_MODEL`, `DOOP_AGENT_OPENROUTER_MODEL`, `DOOP_AGENT_GEMINI_MODEL`,\n`DOOP_AGENT_DEEPSEEK_MODEL`, `DOOP_AGENT_KIMI_MODEL` and `DOOP_AGENT_KIMI_CODE_MODEL` only set the default they start on. Note that\n`gpt-5.4` and `gpt-5.4-mini` retire from ChatGPT-authenticated Codex on **31 August 2026**, so\npinning a 5.4 id via that env var will break the subscription path after that date.\n\nOpenAI registers no redirect URI for a hosted app, so connecting ChatGPT takes one of three shapes and Doop picks the cheapest one available:\n\n| Where Doop runs | Flow | What the user does | \n|---|---|---|\n| Same machine as the browser (dev, self-host) | Loopback catch — Doop holds `127.0.0.1:1455` | Approve in the OpenAI tab. Nothing to copy, no setup | \n| Hosted (doop.design) | Device code ( `/api/accounts/deviceauth/*` ) | Type a short code at `auth.openai.com/codex/device` | \n| Device codes disallowed | Browser redirect + paste | Paste the dead `localhost:1455` page's address back into Doop | \n\nThe device flow needs **device code authorization** switched on in ChatGPT → Settings → Security\n(workspace members need an admin to allow it) — that is why the loopback flow, which needs no\nsetting at all, stays the default when Doop is local. All three end at the same server-side PKCE\nexchange.\n\n**Before you turn this on for real users:** driving a ChatGPT subscription from a third-party\nserver is not something OpenAI's terms sanction, and heavy use can get an account rate-limited or\nsuspended. The API-key path is the fully supported alternative and shares all the same code.\n`CHATGPT_CONNECT_DISABLED=1` switches the subscription path off and leaves the key path.\n\nRuns are attributed to the human whose card, comment or feedback they picked up, so the person who\nasked for the work is the person whose account runs it. The translation between the agent's\nAnthropic-shaped loop and OpenAI's Responses API lives in\n[`server/openaiAgent.ts`](https://github.com/kgoedecke/doop/blob/main/server/openaiAgent.ts); which credential a run gets is decided in\n[`server/agentModel.ts`](https://github.com/kgoedecke/doop/blob/main/server/agentModel.ts).\n\n**With no server key and no connected account** the Doop Agent is off, and it fails quietly by\ndesign — queued cards and `@mentions` simply wait for some agent to claim them. The startup banner\ntells you which state you're in.\n\n**All of this is separate from connecting your own agent.** Claude Code and any other MCP client\nauthenticate over OAuth and drive the canvas from outside, on your own subscription — never metered.\nThree paths, same canvas: the Doop Agent on our key (free tier), the Doop Agent on your key, or your\nown agent over MCP.\n\n| Variable | Default | What it does | \n|---|---|---|\n| `DOOP_AGENT_PROVIDER` | `anthropic` | What the free tier runs on: `anthropic` \\|`azure` | \n| `ANTHROPIC_API_KEY` | *unset* | Pays for the free Doop Agent tier (default provider) and the distiller | \n| `AZURE_OPENAI_ENDPOINT` | *unset* | The free tier's Azure OpenAI resource, when `DOOP_AGENT_PROVIDER=azure` | \n| `AZURE_OPENAI_API_KEY` | *unset* | A key of that resource | \n| `AZURE_OPENAI_DEPLOYMENT` | *unset* | The deployment the free tier runs on | \n| `AZURE_OPENAI_API_VERSION` | *unset* | Pins an `api-version` query parameter; the v1 surface needs none | \n| `AZURE_OPENAI_REASONING_EFFORT` | *unset* | Reasoning effort on Azure runs; unset sends none (non-reasoning-safe) | \n| `RESIDENT_TASK_LIMIT` | `0` | Free Doop Agent tasks per account; `0` means a connected account from the first task | \n| `DOOP_AGENT_MODEL` | `claude-opus-5` | Model for the Doop Agent on the server's Anthropic key | \n| `DOOP_AGENT_OPENAI_MODEL` | `gpt-5.6-terra` | Default tier on a user's account; each user can pick another in Settings | \n| `DOOP_AGENT_OPENAI_EFFORT` | `medium` | Default reasoning effort on a user's OpenAI account; each user can pick low–xhigh | \n| `DOOP_AGENT_OPENROUTER_MODEL` | `moonshotai/kimi-k2.6` | Default model on a connected OpenRouter key | \n| `DOOP_AGENT_GEMINI_MODEL` | `gemini-3.7-flash` | Default model on a connected Gemini key | \n| `DOOP_AGENT_DEEPSEEK_MODEL` | `deepseek-flash` | Default model on a connected DeepSeek key | \n| `DOOP_AGENT_KIMI_MODEL` | `kimi-k3.1-pro` | Default model on a connected Kimi key | \n| `DOOP_AGENT_KIMI_CODE_MODEL` | `k3.1-pro` | Default model on a connected Kimi Code plan | \n| `CHATGPT_CONNECT_DISABLED` | *unset* | `1` hides the ChatGPT flow, leaving the API-key path | \n| `DOOP_DISTILL_MODEL` | `claude-haiku-4-5-20251001` | Model for the guideline distiller | \n\n`RESIDENT_TASK_LIMIT` is the free-tier meter. By default it is `0`: the Doop Agent only runs once\nthe user connects a model account (any of the kinds above) — a connected\naccount is never metered. Connecting your own MCP agent does not lift the meter: it runs on your\nmodel when *it* designs, but resident tasks still bill a credential. Set the limit above 0 to\ngrant that many free tasks on the server's key; everything that triggers resident work counts,\nincluding feedback and retries. There is no \"unlimited\" value: self-hosting with your own key, set\nit to a large number, since you're paying Anthropic directly either way.\n\nThe web app requires an account (better-auth, email/password — open signup). Your account\nname is your identity everywhere: cursors, presence, the activity feed, and feedback\nattribution are all server-authoritative from the session, and the WebSocket rejects\nunauthenticated joins. **Canvases are private by default**, Figma-style: only the owner\nand people they invite (Share → invite by email, existing doop accounts) can open one.\nThe Share modal also sets what anyone with the link gets: nothing (invite-only, the\ndefault), **view**, **comment** or **edit**. From the same modal an owner can file the canvas\nin a workspace or list it in the **Community** gallery (`/community`), where signed-in people\nbrowse published canvases and copy them into their own. Your home screen lists\nyour own canvases plus ones shared with you (plus unowned legacy ones, claimable there).\nAgents connected over MCP act under the account that approved them and get exactly that\nuser's access.\n\nWith SMTP configured (`SMTP_HOST` etc. — see [.env.example](https://github.com/kgoedecke/doop/blob/main/.env.example)), signups require email\nverification and \"forgot password\" sends real reset links. Without it, signup stays open and every\nemail is printed to the server log, links included — the flows still work in development.\n\nSet `SIGNUP_EMAIL_DOMAINS=jointhetroops.com` to restrict new accounts to one email domain, or use a\ncomma-separated list for several domains. Matching is case-insensitive and exact; existing accounts\nare unaffected. Leave it unset to keep public signup open.\n\nSet `REQUIRE_EMAIL_VERIFICATION=false` to let people in before they verify — the link is still\nemailed, it just stops gating sign-in. Admin promotion is deliberately not part of that trade:\n`ADMIN_EMAILS` only ever promotes a verified address (see below).\n\nIf signup or password reset **hangs** rather than failing, the cause is almost always a host that\nblocks outbound SMTP: Railway and most PaaS block 25/465/587. Resend also serves 2465/2587, so\n`SMTP_PORT=2587` is the usual fix.\n\nEnv: `BETTER_AUTH_SECRET` (required in production), `TRUSTED_ORIGINS` (comma-separated,\ndefaults to the localhost dev origins).\n\nA **workspace** is a team's shared home for canvases: everyone in it opens every canvas inside,\nwith no per-canvas invites. Create one from the sidebar on the home screen, invite people by\nemail (existing accounts join at once; anyone else joins the moment they sign up with that\naddress), file canvases in it from the Share modal or the canvas menu (\"Move to workspace…\"),\nand manage people, roles (owner / admin / member) and billing at `/w/<id>`. Agents see workspace\ncanvases in `list_canvases` and can create into one with `create_canvas`'s `workspace_id`.\n\nWorkspaces are the paid part of doop on a hosted deployment. Plans (see `shared/billing.ts`):\n\n| Plan | Price | What it is | \n|---|---|---|\n| Personal | free | Your own canvases, per-canvas invites, agents, community, imports. | \n| Team | $20 / seat / month, or $192 / seat / year | Shared workspaces with roles; seats follow the people list. | \n| Enterprise | talk to us | SSO, dedicated support, custom terms. | \n\n**Self-hosting: billing is off unless you turn it on.** Without `STRIPE_SECRET_KEY` every\nworkspace is active and nothing is locked. With it, a workspace must hold a live per-seat\nsubscription before it can *grow* — create canvases in it, invite people, take canvases in —\nand the upgrade modal appears wherever that is attempted. Canvases already in a workspace stay\nopen to its members whatever the subscription does (a failed card never locks a team out of its\nwork). Deleting a workspace hands every canvas back to its owner's personal space and cancels\nthe subscription.\n\nTo enable billing: create the product and prices with `node scripts/stripe-setup.mjs`\n(prints `STRIPE_PRICE_TEAM_MONTHLY` / `STRIPE_PRICE_TEAM_YEARLY`), point a Stripe webhook at\n`<origin>/stripe/webhook` for `checkout.session.completed` and\n`customer.subscription.{created,updated,deleted}`, and set `STRIPE_WEBHOOK_SECRET`. Checkout,\ncards, invoices and cancelling all happen on Stripe's hosted pages; the server only mirrors the\nsubscription onto the workspace (through the webhook, and a direct sync when the browser lands\nback from Checkout, so local development works without a tunnel).\n\n`ADMIN_EMAILS` (comma-separated) names the accounts that get the `admin` role, applied at\nsignup, on email verification, and at boot — so you can name an admin before or after they\nhave an account. **This requires SMTP in production**: an address only identifies someone\nonce they have proven they own it, and without a mailer signup is open, so anyone could sign\nup as your address and take the role with it. A production instance without SMTP promotes\nnobody and warns at boot; set the role directly in the database if that is your setup.\nAdmins get `/admin`: every canvas and account on the instance, and \"view as\", which hands\nthem a real but **read-only** 15-minute session as that user. Being an admin does not widen\ncanvas access itself: the gate in [`server/access.ts`](https://github.com/kgoedecke/doop/blob/main/server/access.ts) is shared with MCP,\nso a privileged read there would give every agent holding an admin's token the run of the\ninstance. View-as sessions cannot write, cannot connect agents, and record who is behind\nthem in `session.impersonated_by`.\n\nOptional login against an external OIDC provider (Zitadel, Okta, Authentik, Keycloak,\netc.), alongside email/password — not a replacement for it. Set `OIDC_ISSUER`,\n`OIDC_CLIENT_ID`, and `OIDC_CLIENT_SECRET` together to enable it; a partial set refuses\nto boot rather than run with SSO half-configured. `OIDC_SCOPES` (default\n`openid email profile`) and `OIDC_PROVIDER_NAME` (default `SSO`, shown on the login\nbutton — e.g. `Zitadel`) are optional. Signing in via SSO links to an existing\nemail/password account when the emails match and the provider marks the email\nverified, and this works even on an instance with no SMTP configured, where a\nlocal account could otherwise never verify on its own. SSO alone never grants\nthe admin role, even for an address listed in `ADMIN_EMAILS` — an IdP is not\ntrusted as an admin-promotion source, only as an email-ownership check;\npromotion still requires the normal `ADMIN_EMAILS` path (verified signup, or\n`syncAdmins` at boot for an account SSO has since verified).\n\nEnv: see the OIDC block in [.env.example](https://github.com/kgoedecke/doop/blob/main/.env.example).\n\nOptional, alongside email/password and SSO. Create an OAuth client (Web application) in\nthe [Google Cloud console](https://console.cloud.google.com/apis/credentials), add\n`<BETTER_AUTH_URL>/api/auth/callback/google` as an authorised redirect URI, and set\n`GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` together (one without the other refuses to\nboot). The login page shows a \"Sign in with Google\" button whenever both are set. Account\nlinking and admin promotion follow the same rules as SSO above; `SIGNUP_EMAIL_DOMAINS`\napplies to Google (and SSO) sign-ups exactly as it does to email/password.\n\nSame shape as Google. Register an app in [Microsoft Entra](https://entra.microsoft.com)\n(App registrations, platform Web) with `<BETTER_AUTH_URL>/api/auth/callback/microsoft` as a\nredirect URI, create a client secret, and set `MICROSOFT_CLIENT_ID` and\n`MICROSOFT_CLIENT_SECRET` together. `MICROSOFT_TENANT_ID` (default `common`, any Microsoft\naccount) can be `organizations`, `consumers`, or your tenant id to make the button an\norg-only door. Microsoft does not assert email ownership unless the app registration's\nID token includes the `email` and `verified_primary_email` optional claims; without them a\nMicrosoft sign-in still works but only links to an existing account that is already\nverified. Everything else (allowlist, admin promotion) follows the SSO rules above.\n\nTwo independent halves, documented in [.env.example](https://github.com/kgoedecke/doop/blob/main/.env.example). For the web button,\nregister a Services ID with Sign in with Apple enabled and\n`<BETTER_AUTH_URL>/api/auth/callback/apple` as a return URL, then set `APPLE_CLIENT_ID` (the\nServices ID) and `APPLE_CLIENT_SECRET` (the client-secret JWT signed with your Sign in with\nApple key, which Apple caps at six months) together. For the iOS app, set\n`APPLE_APP_BUNDLE_IDENTIFIER` to the app's bundle id: the app shows the native Sign in with\nApple button and posts the identity token Apple issues for that bundle id to\n`/api/auth/sign-in/social`, which the server verifies against Apple's keys. Apple only sends\nthe person's name on their first sign-in, so the app forwards it then; a later sign-in from a\nfresh install leaves the name as stored. Linking and admin promotion follow the SSO rules\nabove. Apple's \"Hide My Email\" addresses are on `privaterelay.appleid.com`, which\n`SIGNUP_EMAIL_DOMAINS` rejects unless listed.\n\nThe `/mcp` endpoint requires OAuth. Adding the server in Claude Code / Codex triggers\nthe standard MCP OAuth flow: a browser window opens, you sign in to Doop and approve,\nand the client stores a bearer token. Every tool call then carries your identity —\nagent tasks show \"for ⟨you⟩\" in the Agents panel, and presence tooltips name the owner.\nUnauthenticated calls get a 401 whose `WWW-Authenticate` header points at\n`/.well-known/oauth-protected-resource/mcp` and asks for `openid profile email offline_access`\n(so clients get refresh tokens); that is what kicks off the flow. The approval screen lives at\n`/oauth/consent`. Dynamic client registration is enabled, so no manual client setup.\n`ping` and `resources/list`/` resources/read` answer without a token, and a banned account's\nagents get a 403 even with a valid one.\n\nThe endpoint takes `POST` only and answers with plain JSON rather than an SSE stream, which is what\nChatGPT needs. Tool results also carry `structuredContent` for an inline frame-preview card\n(`ui://doop/frame-preview-2.html`) in clients that render MCP Apps, such as ChatGPT.\n\nIn production also set `BETTER_AUTH_URL` to the public origin — OAuth URLs are built on it.\n\nThe repo ships a production `Dockerfile` (client build + Chromium for frame screenshots).\nAny container host works; Railway/Fly are the least friction:\n\n1. Create the app from this repo (both auto-detect the Dockerfile).\n2. Add a managed Postgres and set `DATABASE_URL` .**Don't skip this in real deployments** —\nthe PGlite fallback is embedded/single-process and only suits a single instance with a\npersistent volume mounted at`/app/data` .\n3. Set `BETTER_AUTH_SECRET` (long random string) and`BETTER_AUTH_URL` (the public origin,\ne.g.`https://doop.example.com` ). Extra allowed origins:`TRUSTED_ORIGINS` (comma-separated).\n4. Health check: `GET /healthz` . The server trusts one proxy hop (`trust proxy` ), so\nTLS termination at the platform edge works out of the box.\n\nLocal sanity check of the exact production image:\n\n```\ndocker build -t doop .\ndocker run -p 4400:4400 -e BETTER_AUTH_URL=http://localhost:4400 -e BETTER_AUTH_SECRET=dev-only doop\n```\n\nEvery variable is optional except the two marked required in production. Each one is declared and\nvalidated once at boot ([`server/env.ts`](https://github.com/kgoedecke/doop/blob/main/server/env.ts)) and documented in\n[`.env.example`](https://github.com/kgoedecke/doop/blob/main/.env.example), which also lists endpoint overrides and other rarely needed knobs.\nThis is the short list a self-hoster usually touches:\n\n| What | Variables | Without them | \n|---|---|---|\n| Core | `BETTER_AUTH_SECRET` ,`BETTER_AUTH_URL` (both required in production),`DATABASE_URL` ,`TRUSTED_ORIGINS` ,`PORT` | Embedded PGlite in `data/pg` , localhost origins | \n| Sign-in | `OIDC_*` ,`GOOGLE_*` ,`MICROSOFT_*` ,`APPLE_*` ,`SIGNUP_EMAIL_DOMAINS` ,`ADMIN_EMAILS` ([Accounts](#accounts) ) | Email/password only, open signup | \n|  | `SMTP_HOST` ,`SMTP_PORT` ,`SMTP_USER` ,`SMTP_PASS` ,`SMTP_SECURE` ,`EMAIL_FROM` ,`REQUIRE_EMAIL_VERIFICATION` | Emails print to the server log; no verification | \n| Object storage | `BUCKET` ,`ACCESS_KEY_ID` ,`SECRET_ACCESS_KEY` ,`ENDPOINT` ,`REGION` (any S3-compatible store) | Uploaded assets stored under `data/assets` | \n| Doop Agent | `ANTHROPIC_API_KEY` ,`RESIDENT_TASK_LIMIT` ,`DOOP_AGENT_*` ,`AZURE_OPENAI_*` ([The Doop Agent](#the-doop-agent) ) | Runs only on accounts users connect | \n| Image generation | `OPENAI_API_KEY` ,`GEMINI_API_KEY` ,`ARK_API_KEY` (Seedream),`DOOP_IMAGE_MODEL` | Runs only on accounts users connect; Seedream off | \n| Agent search tools | `PEXELS_API_KEY` (photos),`BRANDFETCH_CLIENT_ID` (logos),`BACKGROUNDS_ORIGIN` ,`CONTEXT_DEV_API_KEY` | No photo search; open-source and favicon logos; local Chromium | \n| Screenshots | `CHROME_PATH` ,`CHROME_NO_SANDBOX` (the Docker image sets both up) | Auto-detected Chrome/Chromium | \n| Integrations | `META_APP_ID` /`_SECRET` ,`LINEAR_*` ([setup](https://github.com/kgoedecke/doop/blob/main/docs/linear.md) ),`SLACK_*` ([setup](https://github.com/kgoedecke/doop/blob/main/docs/slack.md) ),`GITHUB_APP_*` | That integration is unavailable; GitHub import uses a personal token | \n| Billing | `STRIPE_SECRET_KEY` ,`STRIPE_PRICE_TEAM_*` ,`STRIPE_WEBHOOK_SECRET` ([billing](#workspaces-and-billing-team-plan) ) | Billing off, every workspace active | \n| Rate limits | `MCP_UPLOADS_PER_MIN` ,`MCP_SEARCHES_PER_MIN` ,`MCP_GENERATIONS_PER_MIN` ,`MCP_IMPORTS_PER_MIN` ,`SYNC_INGESTS_PER_MIN` ,`PREVIEW_RENDERS_PER_MIN` ,`SYNC_FREEZE_MS` | Defaults sized for the hosted service; requests over a cap get `429` | \n| Webhooks | `WEBHOOK_ALLOW_PRIVATE_URLS` ([webhooks](https://github.com/kgoedecke/doop/blob/main/docs/webhooks.md) ) | Webhook URLs on private networks are refused | \n| Analytics | `VITE_POSTHOG_KEY` (build time: a Docker build`ARG` ),`POSTHOG_KEY` ,`POSTHOG_*_HOST` | No analytics; when set, the browser reports through the same-origin `/relay` proxy | \n| iOS push | `DOOP_APNS_TEAM_ID` ,`DOOP_APNS_KEY_ID` ,`DOOP_APNS_PRIVATE_KEY` ,`DOOP_APNS_BUNDLE_ID` | No Live Activity pushes; the app polls | \n| Gemini cloud pilot | `DOOP_GEMINI_CLOUD_WORKERS` ([pilot guide](https://github.com/kgoedecke/doop/blob/main/docs/gemini-cloud-pilot.md) ) | Off | \n\nThe MCP endpoint (streamable HTTP, stateless) is at:\n\n```\nhttp://localhost:4300/mcp\n```\n\nClaude Code:\n\n```\nclaude mcp add --transport http doop http://localhost:4300/mcp\n```\n\nCodex:\n\n```\ncodex mcp add doop --url http://localhost:4300/mcp\ncodex mcp login doop   # approve in the browser\n```\n\nIn the Doop desktop app, **Connect AI → Codex → Add to Codex** writes the entry into\n`~/.codex/config.toml` for you (CLI and the Codex tab of the ChatGPT desktop app). Connect AI also\nhas one-click **Add to Claude** and **Add to Cursor**. ChatGPT needs Doop on a public HTTPS address\n(or an OpenAI Secure MCP Tunnel); it cannot reach `localhost`.\n\nGeneric MCP config:\n\n```\n{ \"mcpServers\": { \"doop\": { \"type\": \"http\", \"url\": \"http://localhost:4300/mcp\" } } }\n```\n\nOpenCode takes Doop as a remote MCP server in `opencode.json`. An\n[agent key](#headless-agents-agent-keys) in the header skips the browser sign-in:\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"mcp\": {\n    \"doop\": {\n      \"type\": \"remote\",\n      \"url\": \"http://localhost:4300/mcp\",\n      \"headers\": { \"Authorization\": \"Bearer dpk_…\" }\n    }\n  }\n}\n```\n\nThe OAuth flow above assumes a human at a browser to approve the connection. A headless client — a\nMastra workflow, n8n, CI, any server-side agent framework — authenticates with an **agent key**\ninstead: mint one under **Settings → Agent keys** and send it as a bearer header. The key acts as\nyour account (same canvas access, same attribution) and is checked on every request, so revoking it\nin Settings cuts the agent off immediately.\n\n```\n{\n  \"mcpServers\": {\n    \"doop\": {\n      \"type\": \"http\",\n      \"url\": \"http://localhost:4300/mcp\",\n      \"headers\": { \"Authorization\": \"Bearer dpk_…\" }\n    }\n  }\n}\n```\n\nThen tell the agent something like:\n\nWork on canvas `<canvas-id>` (shown in the top bar). Call `get_canvas` to see the existing frames.\nTo design, create a frame with `create_frame`, then stream the design into it with `append_frame_html`\none complete section at a time, roughly 1–4 KB per chunk (`start=true` on the first, `done=true` on the last) so people watch it\nbuild up live. Complete HTML with inline CSS. After finishing, call `get_frame_screenshot` to see it,\nfix what looks wrong, and re-check. Pick an `agent_name` and reuse it on every call.\n\nScreenshots render in your system Chrome/Chromium via `puppeteer-core` (set `CHROME_PATH` if it isn't\nauto-detected). Humans can hit the same renderer at `GET /api/frames/:id/screenshot.png?scale=2`.\nFor website viewing/imports, setting `CONTEXT_DEV_API_KEY` makes Context.dev acquire the rendered\nHTML while Doop still sanitizes it and renders the preview locally; without the key, Doop navigates\nto the public page directly in Chromium.\n\nServer-side import can't reach apps behind SSO or a VPN. The **doop-sync snippet** flips the capture\nto the user's browser: mint a write-only key under a canvas's **Import → Live app**, drop one tag into the app —\n\n```\n<script async src=\"https://your-doop-origin/doop-sync.js?key=dk_…\"></script>\n```\n\n— and every distinct screen people visit lands on that canvas as a frame (one row per app), imported\nonce: a grace window (`SYNC_FREEZE_MS`, 15 minutes by default) lets the first capture settle (scroll reveals, late images), then the frame\nfreezes so later visits — different viewports, other users' data, open menus — never churn it. Deleting\na frame re-imports it on the next visit; navigation counts keep accumulating regardless. Routes are\nnormalized (`/orders/8231` → `/orders/:id`) so each screen maps to one\nframe; captures are serialized from the CSSOM (so styled-components/emotion output survives), and\nsame-origin webfonts and small images are inlined as data: URIs — fonts require CORS inside the\nsandboxed frame, and intranet URLs would never render for viewers outside the network. Scripts are\nstripped client- and server-side, input values are always dropped, and anything marked `data-doop-mask`\nis redacted before upload (`data-doop-sync-ignore` excludes an element entirely). The key is the whole\ncredential: it can only write frames to its one canvas, so revoking it under Import → Live app cuts the\napp off instantly. Endpoint: `POST /ingest/<key>` (CORS-open, no cookies).\n\nAgent HTML lands in the store immediately, but viewers see it through a **typewriter reveal**: the server\nbroadcasts the accumulated HTML in 80 ms ticks at about 8,000 chars/s, with every reveal lasting between\n2.5 s and 5 s,\nso even an agent that sends few large chunks — or a one-shot `set_frame_html` / `create_frame` with\nfull HTML — plays back as a smooth live stream. Mid-reveal HTML is *healed* before broadcast: a trailing\nhalf-written tag is dropped, an unclosed `<script>` is cut (never run half-written JS), and an unclosed\n`<style>` is closed so content paints instead of blanking. Human edits from the inspector bypass the\nreveal (and a human html edit cancels any open reveal — the human takes over).\n\nWhile a stream/reveal is open the frame gets a pulsing dashed border and a \"✦  is designing…\"\nchip; \"finished designing\" logs when the reveal completes. A stale stream auto-closes after 30s.\nThere is also a REST equivalent: `POST /api/frames/:id/append` with `{ html_chunk, start?, done? }`;\nthe author is always the signed-in user.\n\nSteering happens at three layers (the same architecture paper.design uses, plus result nudges):\n\n1. **Server `instructions`** at MCP initialize — a compact contract: load the guide, get context\nfirst, stream designs, review with screenshots, keep one`agent_name` .\n2. **`get_guide` tool** — the deep playbook (mandatory review checkpoints, streaming workflow,\nframe sizing, design-quality doctrine, multiplayer etiquette), loaded once per session and\nre-loadable after context compaction. Source:`server/guide.ts` .\n3. **Result nudges** —`create_frame` /`set_frame_html` / final`append_frame_html` results tell\nthe agent it hasn't*seen* its design yet and to call`get_frame_screenshot` before moving on.\nOther results remind an agent to read canvas style guides it hasn't opened, to announce itself\nwith`set_status` , and point out HTML that arrived escaped; open human feedback rides along too.\n\n`get_guide` has one topic, `doop-instructions`, covering human feedback, the design brief, images,\nstyle guides and memory, redesigns, prototypes and exporting; extensions such as Linear add their\nown lines. The built-in Doop Agent gets the same text in its system prompt and most of the same\ntools; `tests/agentToolParity.test.ts` lists the MCP tools it does not have yet.\n\n42 tools: 40 built in ([`server/mcp.ts`](https://github.com/kgoedecke/doop/blob/main/server/mcp.ts)) plus the two Linear tools its extension\nregisters ([`server/linear/extension.ts`](https://github.com/kgoedecke/doop/blob/main/server/linear/extension.ts)). Every tool carries\nread-only / destructive / idempotent annotations; the server registers no MCP prompts.\n\n| Tool | What it does | \n|---|---|\n| `get_guide` | The agent playbook — agents are instructed to load this first | \n| `set_status` | Broadcast a one-line \"what I'm working on\" — shown live in the working-now strip, avatar tooltip, and activity feed | \n| `get_profile` | The Doop account this connection is signed in as | \n| **Canvases** |  | \n| `list_canvases` | List the canvases you can open, including workspace canvases | \n| `create_canvas` | Create a canvas (optionally in a workspace), returns its shareable id | \n| `get_canvas` | Canvas layout: every frame's position/size/meta | \n| `set_canvas_pages` | Create, rename, reorder or delete canvas pages | \n| `set_page_background` | Paint one page's canvas a colour of its own, or clear it back to the theme paper | \n| **Frames** |  | \n| `create_frame` | Add a frame with HTML (auto-placed if no x/y) | \n| `get_frame` | Read a frame including its HTML | \n| `append_frame_html` | **Stream** a design in chunks (`start=true` first,`done=true` last) — viewers watch it build up | \n| `set_frame_html` | Replace a frame's design in one shot — renders live for everyone | \n| `edit_frame_html` | Targeted exact find/replace in a frame's HTML — morphs into the render in place | \n| `update_frame` | Rename / move / resize a frame | \n| `delete_frame` | Remove a frame | \n| `list_frame_versions` | Earlier states of a frame, newest first, with author and time | \n| `restore_frame_version` | Put a frame back to an earlier state; the replaced design is kept as a version | \n| `get_frame_screenshot` | Render the frame headlessly and return a PNG — lets agents *see* and iterate on their design | \n| `export_frame` | PNG/JPG URLs that re-render when the design changes, or a vector PDF | \n| **Prototypes** |  | \n| `get_prototype` | Each page's flow start and every interaction (trigger, action, target), flagging links to missing frames | \n| `set_prototype_start` | Choose the frame a page's clickable prototype starts on | \n| **Collaboration** |  | \n| `get_feedback` | Fetch & claim open human feedback requests — for agents whose job is to poll the canvas periodically | \n| `get_comments` | Read element and canvas comments with their replies, optionally filtered by frame or resolution state, no claiming | \n| `reply_to_comment` | Reply inside an element-comment thread; `@mention` of a resident role is metered like a browser comment | \n| `resolve_comment` | Resolve an element-comment thread; resolving an `@mention` thread records the exchange in canvas Memory | \n| `report_issue` | Report a tool failure or missing capability to the instance admins | \n| `share_feedback` | Share suggestions and feedback with the instance admins | \n| **Design memory** |  | \n| `list_guidelines` | List a canvas's style guides (brand rules, style recipes) with one-line summaries | \n| `get_guidelines` | Read one style guide in full — the rules every frame on the canvas must follow | \n| `set_guidelines` | Write or revise a style guide (versioned, with history) | \n| `get_reference` | Read a frame a human pinned as a \"more like this\" style reference | \n| `save_decision` | Record a design decision so later agents don't re-litigate it; feeds the distiller | \n| **Assets & inspiration** |  | \n| `search_images` | Stock photo search (Pexels) — returns thumbnails the agent picks from | \n| `search_icons` | 200,000+ open-source icons (Iconify) as hotlinkable SVGs | \n| `search_logos` | Real company logos by brand name or domain (Brandfetch, vector marks) | \n| `list_backgrounds` | Curated hero/section/bento backgrounds (glows, grainy meshes, aurora, painterly) as thumbnails | \n| `search_inspiration` | Curated live landing pages with style, colour, fonts and sections (One Page Love) | \n| `generate_image` | Generate an image with the model the user picked in Settings (GPT Image, Nano Banana or Seedream) → asset URL | \n| `upload_asset` | Store your own file — from a URL, a one-time local-file upload URL, or inline base64 | \n| **Web** |  | \n| `view_website` | Inspect one public page read-only; returns a desktop screenshot and visible text without changing the canvas | \n| `import_webpage` | Import one public URL onto a canvas as an editable HTML snapshot/frame | \n| **Linear** |  | \n| `list_linear_issues` | List tickets through the user's Linear connection (open, most recently updated first) | \n| `get_linear_issue` | Read a Linear ticket and its description by UUID or identifier | \n\nMutating tools accept `agent_name`; the agent then appears in the presence stack (pulsing square avatar),\ngets an \"editing\" ring + chip on the frame it touched, and its actions land in the activity feed. Agents\nexpire from presence after ~20s of inactivity (~60s while they have a posted status, since a status\nusually means the agent is thinking between tool calls).\n\nAgent-to-human ownership comes from the OAuth token: the bearer token identifies who approved the connection, and that user shows up as the agent's owner in tasks and presence.\n\nAgents are steered (instructions + guide) to call `set_status` with a one-line, present-tense summary\nwhen they start a task and whenever their focus shifts — e.g. *\"Sketching a mobile onboarding flow\"*.\nStatuses appear in a floating **working-now strip** at the top-left of the canvas, beside the tool rail\n(at the bottom on phones; on screens 1180px and wider the top-bar presence pill shows them instead), in\nthe presence avatar tooltip, and as an activity feed entry, so you always know what\neach agent is doing even while it's silently thinking. An empty string clears the status; it also\nexpires with the agent's presence.\n\nEvery status also becomes a **task**: posting a new status completes the previous one, clearing (or\ngoing silent) ends the open task. Agents that never call `set_status` still show up: the server\ninfers a task from what they visibly do (*\"Designing 'Hero'\"*, italicized in the panel), closes it\nwhen the stream finishes, and nudges them in tool results to start announcing — so the panel works\neven for sessions that connected before the tool existed or skipped the guide. The **Agents** tab of\nthe side panel shows the history per agent (active task pulsing with a running duration, finished\nones checked off with how long they took, failed cards with **Retry**), Cursor-agent-panel style,\nabove the composer that queues new cards (with a model and effort picker and image attachments);\n**Activity** is the raw event feed. Task history survives agents leaving and is sent to late joiners.\n\nIn the app, people steer agents with [comments](#comments-imports-and-exports): `@mention` a role\non the element in question. For scripts and integrations, `POST /api/tasks/:id/feedback` with\n`{ text }` leaves a note on a task (the signed-in user is the author; it counts as one Doop Agent\ntask, so it can return `403 resident_limit`).\n\nEach note becomes an **open request on the canvas** — a work item, not mail for the agent whose\ntask it was. MCP is pull-based, so delivery rides the result-nudge layer: the **next identified\nagent call** on the canvas that supports feedback delivery (carrying an `agent_name`, whoever it is) returns a\n`HUMAN FEEDBACK` block quoting the note, saying whose work it concerns, and instructing the agent\nto address it before continuing — including editing another agent's frame (a human request\noverrides the don't-touch etiquette). Each note is claimed exactly once.\n\nAgents don't linger waiting for replies — sessions end when their work ends. Open requests simply\nwait for the next agent to show up: the original agent in a later session, a different agent\nalready on the canvas, or a fresh one you spawn (*\"check in on canvas ⟨id⟩\"*). For a dedicated\ncaretaker, point an agent at `get_feedback` — a non-blocking fetch-and-claim designed for a\n\"check the canvas every few minutes, address whatever humans requested\" loop.\n\nCall `get_comments({ canvas_id })` to read the canvas's retained element comments and replies\n(up to 100 entries, newest first). Each entry includes its ID, frame ID, author, text, timestamp,\nCSS selector, HTML snippet, and any claim, failure, or resolution metadata. Replies carry a\n`parentId` pointing to their root comment.\n\nPass `frame_id` to read only comments on a frame belonging to that canvas, or\n`include_resolved: false` to exclude resolved entries. Resolved entries are included by default\nso conversation context remains available. An empty result is `[]`. The tool enforces the same\ncanvas access permissions as other MCP reads; optional `agent_name` announces presence.\nIt does not claim task feedback or comments, or mark anything resolved.\n\n`reply_to_comment({ canvas_id, comment_id, text, agent_name })` adds a reply to a thread,\ninheriting the root's element anchor. `resolve_comment({ canvas_id, comment_id, agent_name })`\ncloses it, and resolving an `@mention` thread also records the exchange in canvas Memory. Both\nrequire the same canvas access as every other MCP tool. A reply whose text `@mentions` a resident\nrole spends one resident task from the account's allowance — the same free-tier meter that a board\ncard, an `@mention` comment, or task feedback consumes (`server/allowance.ts`); plain replies are\nfree. `resolve_comment` also costs nothing.\n\nAn automation runs on a schedule (daily, weekdays or weekly, in any time zone) or\nwhen designs on a selected canvas are approved. Configure up to six steps at `/automations`.\nApproval presets make different sizes, localize designs, or create companion assets;\nedit the brief to choose dimensions, languages and deliverables. Generated designs start as drafts.\n\n- **Pull steps** land designs on a canvas:**Meta ad creatives** (up to 200 ads, each with its image,\nname, copy and CTA;`META_APP_ID` /`_SECRET` , read-only`ads_read` scope).\n- **Agent steps** queue a board card for one Doop Agent role, identical to a card a person writes,\nand billed to the automation's owner. Following steps wait until that card completes.\n- **Create Linear ticket** uses the owner's connected Linear account and selected team.\nThe connection needs permission to create issues.\n- **Post to Slack** uses the owner's Slack installation and a channel ID. Invite @Doop\nto the destination channel. Both handoff actions include source design links and links\nproduced by earlier steps.\n\nSchedules are checked every minute; approvals and ongoing work every five seconds. One run\nper automation is active at a time. Up to ten approvals are grouped into each run, with each\napproval processed once, including after a restart or run-history cleanup. Enabling a workflow\nwatches future approvals; **Run now** also picks up existing, unprocessed approvals.\nChanging an approved source to draft or needs review stops its remaining workflow steps.\nAgent work times out after one hour. Sizes, languages, and asset briefs are editable presets.\n\nEvery run has a summary or an actionable error. Interrupted external calls fail visibly instead of automatically repeating a possibly successful ticket or message. Check the destination before reapproving a design to start another run. Approval receipts are retained until the automation is deleted; completed run history is limited to 100 entries. Existing scheduled automations retain their schedules and now wait for agent completion between steps.\n\nTypes live in [`shared/automations.ts`](https://github.com/kgoedecke/doop/blob/main/shared/automations.ts), the runner in\n[`server/automations.ts`](https://github.com/kgoedecke/doop/blob/main/server/automations.ts).\n\n- **Infinite canvas and editor** — tools, frames, elements, layers, rulers and shortcuts are in[The canvas editor](#the-canvas-editor) .\n- **Multiplayer** — live cursors with name tags, presence avatars, follow mode, per-frame \"who's\nediting\" indicators, colored flash when a remote actor changes a frame, drag positions streamed\nlive, a \"Reconnecting / saved\" status, auto-reconnect.\n- **Activity feed** — every create/edit/rename/delete, by whom (user or agent), with timestamps.\n- **Sharing** — invites, link levels (view / comment / edit), workspaces and the Community gallery\nfrom the**Share** modal ([Accounts](#accounts) ).\n- **Connect AI modal** — one-click installs for Claude, Cursor and Codex, plus copy-paste setup for\nevery other MCP client.\n- **Home** — a prompt that turns into a canvas with drafts queued (choose drafts per prompt, attach a\ndesign to start from), your canvases in a grid or list with sorting and owner filters, a\nself-ticking getting-started checklist, and the ⌘K search palette.\n- **Desktop app** — macOS and Windows ([`desktop/`](https://github.com/kgoedecke/doop/blob/main/desktop/README.md) ): canvas tabs, a native View\nmenu, Check for Updates, one-click agent installs and`doop://` links that hand sign-in and\nintegration OAuth back from the browser.\n\nThe web app talks to the same REST API you can script against. It authenticates with the\nbetter-auth session cookie (agents use [MCP](#connect-an-ai-agent) instead), and every route\napplies the same canvas access rules. Route handlers live in\n[`server/index.ts`](https://github.com/kgoedecke/doop/blob/main/server/index.ts) plus the routers it mounts.\n\n| Prefix | What it covers | \n|---|---|\n| `/api/canvases` | Canvases and their members, pages, flow start, guides, guidelines, references, cards, comments, imports, sync keys, assets, `export.pdf` | \n| `/api/frames` | Frames: edit, stream ( `/append` ), versions and restore, approval, comments,`screenshot.png` | \n| `/api/comments` ,`/api/tasks` ,`/api/feedback` | Replies, resolve and retry; task feedback | \n| `/api/workspaces` ,`/api/billing` | Workspaces, people, roles, Stripe checkout | \n| `/api/automations` ,`/api/integrations` ,`/api/webhooks` | Automations, connected tools, outbound webhooks | \n| `/api/model-account` ,`/api/image-model` ,`/api/agent-keys` | Model accounts and their catalogs, the image model, agent keys | \n| `/api/community` ,`/api/admin` ,`/api/notifications` | The gallery, instance admin, comment-email preferences | \n| `/i/<frameId>.png` ,`/a/<id>.<ext>` ,`/u/<token>` | Public live frame images, stored assets, single-use upload tickets (15 minutes, 5 MB) | \n| `/ingest/<key>` ,`/stripe/webhook` ,`/healthz` | Design-sync captures, Stripe events, health check | \n\nThe realtime protocol is plain JSON over `/ws`, one room per canvas; its message types are in\n[`shared/types.ts`](https://github.com/kgoedecke/doop/blob/main/shared/types.ts).\n\nThe main entry points (the server has about 70 modules in all):\n\n```\nserver/            Node (tsx) — one process on :4400\n  index.ts         Express REST API + ws rooms + presence + static serving (prod)\n  store.ts         In-memory canvas/frame state (hot path), write-through to the DB\n  db/              Drizzle schema + PGlite/Postgres connection + migrations\n  actions.ts       Shared mutations: broadcast + activity log + agent presence + streaming reveal\n  mcp.ts           MCP server (@modelcontextprotocol/sdk), stateless streamable HTTP at /mcp\n  guide.ts         The agent guide (get_guide) and the shared prototype/design doctrine\n  resident.ts      The built-in Doop Agent; agentModel.ts picks the credential a run uses\n  auth.ts          better-auth: email/password, SSO, Google/Microsoft/Apple, MCP OAuth\n  automations.ts   Scheduled and approval-triggered workflows\n  extensions.ts    Registry for the Linear and Slack integrations (server/linear, server/slack)\n  seed.ts          Demo canvas on first run\nshared/            Types and logic shared by server and client (ws protocol, prototypes, pages)\nsrc/               React + Vite + zustand client on :4300\n  pages/           Route-level screens (Home, CanvasPage, Settings, Automations…)\n  components/      Canvas editor and app UI; components/ui/ holds every styled primitive\n  styles.css       Design tokens, the base reset, and keyframes. Nothing else.\ndesktop/           Tauri desktop app (macOS, Windows)\nios/               SwiftUI iPhone and iPad app\nclaude-extension/  Claude Desktop extension (.mcpb); cursor-plugin/ and chatgpt-plugin/ beside it\npublic/doop-sync.js  The design-sync snippet\n```\n\nDoop's look is a component system, not a stylesheet. `src/components/ui/` holds the\nprimitives — `Button`, `Input`, `Badge`, `Card`, `Panel`, `Modal`, `Menu`, `Toolbar`,\n`Segmented`, `Dash*` and the rest — each a Tailwind + [CVA](https://cva.style) recipe bound\nto the tokens in `styles.css`. Screens compose those; they don't re-describe borders,\nshadows or type scales. If a pattern shows up twice, it belongs in `ui/`.\n\n`src/styles.css` is deliberately small: the `:root` tokens (`--ink`, `--paper`, `--brand`…),\ntheir `@theme inline` mapping onto Tailwind names, the base reset, and the `@keyframes`\nutilities cannot express. Components reference those animations by name, so the names are\nAPI. `--breakpoint-md` (900px) is the mobile boundary and `useIsMobile()` matches it in JS —\nchange them together.\n\nFrame HTML renders in `<iframe sandbox=\"allow-scripts\">` — scripts run, but no same-origin access and\nno reach into the app. Each iframe loads a small bootstrap once; new HTML is `postMessage` d in and\n**DOM-morphed in place** (`src/lib/frameRuntime.ts`), so updates and streaming ticks never white-flash\nthe frame with a full document reload. Changed `<script>` s re-execute; unchanged styles/fonts are\nuntouched. The realtime layer is plain JSON over a per-canvas WebSocket room;\nREST/MCP mutations are broadcast to the room by the shared actions layer, so human and agent edits go\nthrough identical plumbing.\n\nPRs welcome — see [CONTRIBUTING.md](https://github.com/kgoedecke/doop/blob/main/CONTRIBUTING.md) for commit conventions and code style. First-time\ncontributors sign the [CLA](https://github.com/kgoedecke/doop/blob/main/CLA.md); a bot asks for it on your first PR.\n\n| Command | What it does | \n|---|---|\n| `bun run test` | Vitest over `tests/` : unit tests plus integration tests that boot the real server | \n| `bun run typecheck` | `tsgo` , the native TypeScript compiler | \n| `bun run lint` /`bun run format` | oxlint + ESLint / Prettier | \n| `bun run doc-lint` | Checks that `CLAUDE.md` and`.context/` stay in step with the code | \n| `bun run storybook` | The component catalogue on :6006 | \n\nCI runs all of these except Storybook, plus `format:check` and a production build, on every PR, and lints the PR title as a conventional\ncommit (PRs land as a squash). Schema changes go through drizzle migrations (`npx drizzle-kit generate`\nafter editing `server/db/schema.ts`). Security issues: see [SECURITY.md](https://github.com/kgoedecke/doop/blob/main/SECURITY.md) — please report\nprivately.\n\nDoop is open source under the [GNU AGPL v3](https://github.com/kgoedecke/doop/blob/main/LICENSE). In short: use it, self-host it,\nmodify it — but if you offer a modified version as a service, you must publish your\nchanges under the same license.\n\nThe **doop name and logo are trademarks** and are not covered by the code license —\nplease rebrand derived services.", "url": "https://wpnews.pro/news/doop-open-source-alternative-to-paper-design", "canonical_source": "https://github.com/kgoedecke/doop", "published_at": "2026-11-16 08:31:23+00:00", "updated_at": "2026-11-16 08:53:03.098078+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "generative-ai"], "entities": ["Doop", "Paper.design", "Claude Code", "Codex", "ChatGPT", "Cursor", "OpenCode", "Anthropic"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/doop-open-source-alternative-to-paper-design", "markdown": "https://wpnews.pro/news/doop-open-source-alternative-to-paper-design.md", "text": "https://wpnews.pro/news/doop-open-source-alternative-to-paper-design.txt", "jsonld": "https://wpnews.pro/news/doop-open-source-alternative-to-paper-design.jsonld"}}