Note
This repository is archived. Its Chrome extension continues as Webside, a notes extension that keeps everything in the browser, with no server and no account.
What stays here is the record of the earlier design: the extension with optional sync, the Context Server, the MCP adapter, the Raycast client, and the history of how they got there. Nothing here is maintained.
Write memos next to the web page or video you are looking at, and get them back later — in the browser, or through an agent.
한국어 · Chrome extension · Setup modes · Context API · MCP adapter · MIT
The unit is the thing you were looking at: one URL. Memos line up under it by time. There is no project, session, or category to pick first; writing one line and writing continuously while you watch are the same action in the same input. When you save, the extension attaches the page address and title, the text you had selected, and — when the page has a video — the playback position.
The default path is the Chrome extension on its own: memos are always saved on the device first. A Context Server (Cloudflare Worker + D1) and an MCP adapter are optional layers on top, for syncing across devices and for letting an agent read the memos of a page.
Context OS does not try to resume your work. Picking up where you left off — reviewing direction and the next decision — is what StateCarry is for. Context OS only keeps what you wrote next to what you saw. This repository does not establish an automatic integration between the two.
The workspace pins pnpm 11.21.0 and uses Turborepo. From the repository root:
pnpm install
pnpm --filter context-shelf buildLoad apps/client-chrome/dist as an unpacked extension at chrome://extensions. Click the toolbar icon to open the side panel, write, and press ⌘↵ / Ctrl+↵. That is the whole setup; nothing leaves the device. See the Chrome guide for the shortcut, the toolbar badge, and what counts as the same page.
The extension ID is pinned by the public key in the manifest (khnemlddgmpikkldkjnicigkfgpfmakb), so its storage and its server origin do not change with the install path.
| Layer | Add it when | What changes |
|---|---|---|
| Context Server — Worker + D1, local or your own Cloudflare account | You want the memos on more than one device, or readable by an agent. | You connect by entering the server address and signing in: Cloudflare Access shows the sign-in, the Worker verifies it and issues the extension its own token. Without Access (and for a local server), paste the one-line connection string <server address>#<token> that pnpm token:create prints into the same field. The extension still saves locally first, then sends each memo in the background and retries until it arrives. While a server is connected, the URL of the tab in view is looked up on your server to show that page's memos. |
| MCP adapter | You want an agent to read what you wrote about a page. | get_page_notes returns a page's memos by URL or title; search_context and get_recent_contexts include the page, selected text, and playback position. Read-only by default. |
Follow setup modes for the local Worker/D1 setup and for the explicit remote migration and deployment steps. Deploying is a self-hosted setup in your own Cloudflare account, not a managed synchronization service.
pnpm dev:chrome # extension UI on the Vite dev server
pnpm dev:server # Context Server on local D1 (needs the private wrangler.jsonc)
pnpm --filter server-mcp dev # MCP adapter over the Context APIMCP calls the Context API over HTTP and has no direct D1 access. Configure CONTEXT_SERVER_URL and CONTEXT_SERVER_TOKEN in the copied environment file:
cp apps/server-mcp/.env.example apps/server-mcp/.env
pnpm --filter server-mcp build
pnpm --filter server-mcp startThe default mode is read-only. CONTEXT_MCP_MODE=read-write adds create_context and update_context; an update appends a new revision rather than mutating a record. For Streamable HTTP, set a separate CONTEXT_MCP_HTTP_TOKEN and run pnpm --filter server-mcp start:http (http://127.0.0.1:17003/mcp). See the MCP guide.
| Decision | Practical consequence | Where to look |
|---|---|---|
| Memos are stored on the device before anything else. | Saving never waits on, or fails because of, a server. Unsent memos stay in an outbox that is retried on browser start, when the network returns, and on a backed-off timer. | Storage and migration · Outbox sync |
| A page is identified by a normalized URL. | Tracking parameters, fragments, and YouTube timestamp/short-link variants resolve to one page, in the extension, the server, and MCP alike. The server stores the value when a record is written; records older than that field match only by their stored address until backfilled. | normalizeUrl · Server contract |
| Small text records behind scoped device tokens. | An exact retry of the same record ID is idempotent; different content under that ID conflicts. Capture writes append records, while a separate delete scope permits removal. |
API implementation · Record validation · API tests |
| Signing in never puts a token in a URL. | Access protects only /connect; the Worker verifies the Access JWT itself and is disabled unless configured. The browser gets a one-time code, exchanged with a PKCE verifier for a read/write token. The return address is limited to the allowed extension's callback. |
Access verification · Connect flow · Tests |
| MCP is an optional reader over the Context API. | No direct D1 access; write mode appends revisions. | MCP tools · MCP tests |
The Context API accepts bounded text captures and supported metadata. It does not upload attachments, screenshots, HTML, or DOM content. Tokens are stored as hashes in D1; keep raw tokens, actual configuration, and captured data out of Git. See the server contract for limits and permissions.
| Path | Responsibility | State |
|---|---|---|
apps/client-chrome |
Context Shelf: memos attached to the page in view, local-first with background sync | Active — the center of the project |
apps/server-context |
Worker + D1 record API, validation, device-token scopes, page lookup by normalized URL | Active — optional sync target |
apps/server-mcp |
stdio / Streamable HTTP MCP adapter for reading memos by page | Active — optional |
apps/client-raycast |
Raycast capture and retrieval client | Frozen — kept as is, not being developed |
apps/voice-capture |
macOS voice capture helper | Frozen |
apps/server-brain |
Local model orchestration (Daily Summary) | Frozen |
apps/server-gateway |
External entry-point contract (docs) | Contract only |
Frozen components still build and still talk to the same Context API, but new work goes into the browser path. Records they wrote — including older Work-based records with a context-os:event:v1 header — remain readable. A mobile client is not planned in this repository. The URL normalization module is duplicated across the three active apps and kept identical by pnpm test:repo; a shared package is deferred until more than that needs sharing.
This repository publishes source and setup guides; no GitHub Release is available. CI succeeded at source revision 019e405, before the browser-first restructuring described above. That observation does not prove a particular deployed service or device acceptance.
pnpm verifyThe root command runs repository tests and package lint, type, test, and build tasks.
- Builds made before the manifest
keyexisted had a different extension ID per install path. Chrome storage belongs to the ID, so the pinned build starts with empty device storage: connect once, by signing in or by pasting the connection string (https://<server address>#ctx_<token>). Memos that were synced to the server appear again. - A deployed Context Server must allow the pinned origin
chrome-extension://khnemlddgmpikkldkjnicigkfgpfmakbinALLOWED_ORIGINS, and needs migration0004and the current Worker before it accepts memos that carry a playback position (and migration0005plus the Access variables before sign-in works). Until then such memos wait in the extension's outbox; nothing is lost. - Records stored before
normalizedUrlexisted are found only through their exact stored address. Backfilling them is a deliberate, separate decision; see setup modes.
MIT.