{"slug": "i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my", "title": "I built a local-first tab manager and gave it an MCP server so Claude can organize my tabs", "summary": "Developer and designer built Mos Tab, a local-first tab manager for Chrome that overrides the new tab page and includes optional cloud sync via a Cloudflare Worker and R2, with a 3-way merge to handle conflicts. The extension also features a remote MCP server that lets Claude or ChatGPT search, summarize, and save tabs, notes, and to-dos directly from chat. The developer highlighted challenges with multi-window sync, solved by gating writes to the focused window, and demonstrated a use case where Claude created a curated stroller shortlist with a shareable link.", "body_md": "I'm a designer and developer, and a hopeless tab hoarder. On a normal day I've got 70+ tabs open across a couple of windows, every favicon crushed into an unreadable sliver, and my \"system\" for finding anything is to just… open another tab. Bookmarks? A write-only graveyard I never revisit.\n\nI bounced between tab managers for a while. Toby was the one that stuck — until it capped the free plan at 60 saved tabs and started asking for an account. For a tab hoarder, a 60-tab cap is like a notes app that locks after 60 words. That was the nudge.\n\nSo I did the reasonable thing and spent way too long building my own. It's called **Mos Tab**. This is the build story — the parts I'm proud of, the part that nearly broke me (multiple windows, I'm looking at you), and the weirdly fun part at the end where I let Claude reorganize my tabs.\n\nThree non-negotiables:\n\nMos Tab overrides `chrome://newtab`\n\n(MV3). The data model is a boring normalized tree — **Space → Collection → Section → Tab** — records plus ID arrays for ordering. It's a single Zustand store with a `persist`\n\nmiddleware writing to `chrome.storage.local`\n\n. Your currently-open tabs show in a live side panel (`chrome.tabs`\n\n); one click saves them into a collection, drag to organize, and a `cmdk`\n\npalette searches everything you've saved.\n\nStack, for the curious: React 18 + TypeScript + Vite + `@crxjs/vite-plugin`\n\n, Tailwind, dnd-kit, zod, i18next (5 languages).\n\nSince the new tab is prime real estate, I threw in the stuff I open a tab for anyway — calendar, pomodoro, to-dos, sticky notes. All free.\n\nSo far, so normal. Then I wanted sync.\n\nLocal-first is lovely until you have two machines. I wanted **optional** cloud sync (the paid tier — more on money later) without turning this into a database migration.\n\nThe backend is deliberately dumb: a **Cloudflare Worker + R2**, one JSON blob per user (`state.json`\n\n). No per-row DB. To save, you `PUT`\n\nthe blob back with an **ETag conditional request** (`If-Match`\n\n). On a `412`\n\n(someone wrote first), you pull, **3-way merge** on the client, and push again.\n\nThe 3-way merge (base + local + remote) handles the real cases: both sides added a tab → keep both; something in `base`\n\nvanished on one side → it was deleted, respect it; field conflicts → local wins. Sticky-note text conflicts resolve to a *symmetric* content-addressed copy, so two machines converge instead of endlessly duplicating.\n\nThe part that actually broke me wasn't cross-device — it was **multiple windows on the same machine.** Every window wanted to push, each invalidating the others' ETag → 412 → merge → push → 412 → forever. A beautiful infinite loop.\n\nThe fix: **only the focused window pushes.** Every window can pull (reads are idempotent), but writes are gated to the focused one, with a flush-on-blur so the last edit isn't lost when you switch away. Add adaptive polling backoff (15s active → 2min idle) and an \"away mode\" that stops polling after 20 min of no activity, and it stops hammering the Worker.\n\nHere's the part I'm actually excited about. I gave Mos Tab a remote **MCP server** so you can connect Claude or ChatGPT to it. Once connected, the assistant can search and summarize everything you've saved (tabs, notes, to-dos) and — the fun bit — **save new things it finds into a brand-new space**, add notes, or make a public share link. All from the chat.\n\nConcrete example. I told Claude:\n\n\"Find the top-rated budget strollers on Amazon, save them to my tabs, and make a share link.\"\n\nA few seconds later there was a new \"Stroller shortlist\" space on my dashboard, organized into categories, and a public link I sent straight to my wife — she opened it in her browser, nothing to install.\n\nTwo design decisions I'm happy with:\n\n`fetch`\n\nWorker — no Durable Objects, no McpAgent. Auth is a long-lived scoped token you mint in settings (JWTs expire, which is bad for a persistent connection). Reads filter the same per-user blob in memory; writes are read-modify-write with `If-Match`\n\n/ 412 retry — so an AI-created space merges through the That last bit is the thing I like most: AI writes go through the same door as everything else. No special path, no separate store.\n\nBecause someone always asks: the whole local app is free — unlimited tabs, spaces, all the widgets, import/export. **Local storage costs me nothing to run, so there's no reason to cap it.** The paid tier is only the stuff that actually hits a server: multi-device sync, public sharing, and the AI/MCP integration. I can't give the server stuff away free — kind of wish I could. That's the whole pricing philosophy, and it keeps me honest.\n\nLive on the Chrome Web Store (Chrome + Chromium — Edge, Brave, Arc, etc.):\n\nI'm a solo dev, so I read everything — feedback on the sync merge model or the MCP design especially welcome.", "url": "https://wpnews.pro/news/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my", "canonical_source": "https://dev.to/_ed46ab02f1e9378858f01/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-organize-my-tabs-264f", "published_at": "2026-08-14 23:57:41+00:00", "updated_at": "2026-08-15 00:10:27.376820+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-products"], "entities": ["Mos Tab", "Claude", "Cloudflare Worker", "R2", "Chrome", "ChatGPT", "Toby", "Amazon"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my", "markdown": "https://wpnews.pro/news/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my.md", "text": "https://wpnews.pro/news/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my.txt", "jsonld": "https://wpnews.pro/news/i-built-a-local-first-tab-manager-and-gave-it-an-mcp-server-so-claude-can-my.jsonld"}}