Port Authority

Pass the port.

A MessagePort can be handed to another window, another origin, a worker, and on again. Whoever holds it can talk, and nobody in between has to stay. These are experiments in how far that goes.

Three real origins. Site A and Site B have never met. Press Introduce them, let them talk, then remove the one in the middle.

Experiments

Each one runs here, across separate origins, in your browser. Start with the hub: the other three sit on top of it.

  1. Web Intents, with a port at the end

    Working

    A site says what it needs in plain words. You choose which site answers. The picker opens that site, hands each side one end of a channel, and closes. The call runs on your machine over that port, and it keeps working with the network unplugged. Sites declare tools once and they are offered to WebMCP as well.

    Open the plannerthe floristthe library

    // a site with something to offer
    serve({ name: "Stem and Petal", tools: [{ name: "book_delivery", description, inputSchema, execute }] });
    
    // a site that needs something, and has never heard of the florist
    const line = await pick("send flowers to a friend");
    await line.call({ bouquet: "ember", recipient: "Ada" });
  2. One registry of every site's tools

    Working

    Sites submit their tools to your hub, a small server that is yours, every time they load. So the picker can list everything you have ever added with nothing open, and you never keep a tab around for it. A site you trust can ask for the whole registry and gets a Model Context Protocol connection over a single port.

    Open your hub

  3. Your agent, on any website

    Working, tested with a stand-in agent

    A site asks for an agent and receives a port that speaks the Agent Client Protocol. Which agent is yours to decide. Run the bridge beside Claude Code, Gemini CLI or anything else that speaks ACP, and it connects out to your hub. The agent is handed the registry too, so it can use tools in your open tabs. With nothing set up you get a built-in agent that has no model and only matches words.

    Choose your agentRead the bridge

  4. Links that carry an intent

    Working

    An ordinary link whose address is a wish: <a href="intent:find a book about raising chickens">. A click asks your hub who can do that.

    Try the links on the planner

  5. Six moves with a port

    Working

    The building blocks, each live: a channel, an introduction, reply ports, giving away less than you have, a SharedWorker exchange, and streams down the wire.

    See the patterns

  6. What else a port can carry

    Working

    Another origin painting into a canvas on your page. A function lent across origins and taken back. 64 MB moved in a few milliseconds. A stream pipeline across three origins where pausing the reader stops the source. And a table that tests, in your browser, which of twenty-three kinds of object will go down a port.

    Paint across originsThe pipelineThe census

  7. Where a port can end up

    Working

    In a new window: tear a live widget off the page and it carries on. In a Service Worker: one tab becomes the web server for every other tab. In a bank: a port cannot be stored, but it can be left with a SharedWorker and collected after a reload with nothing lost.

    Tear-offTab as serverSurvive a reload

  8. Across threads, and the use of a key

    Working

    Two workers that keep talking, and painting, while the page is frozen solid. Live video sent frame by frame through a filter on another origin. A signing key nobody can read, reached through a port that can be narrowed and taken back. And a worker that makes a blocking call down a port and waits for you to answer.

    Freeze the pageVideo filterThe key that staysBlocking call

  9. The lab: what can be sent where

    Working

    Forty-five kinds of object, sent for real to thirteen places a message can go: workers of every sort, the audio thread, frames on this origin, another origin and no origin, and the places that take no transfer list. Each one is used where it lands. Your browser's results are added to everyone's, so the table shows where browsers disagree.

    Run the labWhat browsers reportedThe isolated lab

  10. Between real sites: gifts and loans

    Working

    Four experiments where the other side is a real site with its own storage. A signing key posted to another origin, which keeps it after a reload and cannot be made to give it back. Half a stream as a permission to listen or to speak. Your data piped through another site's transform and back. And a network connection lent to a widget that has no network.

    The key you cannot take backHalf a streamPipe and backLend a connection

  11. Further than this page

    Working

    Four experiments where the other end of the port is somewhere else. Your phone holding a port to a frame on your laptop, joined by a pairing code and connected directly. Another site mounted at a path on this one, answering requests with streamed bodies from a page that is the server. One connection to the server shared by every tab. And a worker that plays music straight into the audio thread while the page is frozen.

    A port to another deviceMount a site at a pathOne socket for every tabThe audio thread

  12. The guide

    Growing

    Everything here written down in one place: where a message can go, what can be sent and what happens to it, ports as permissions, streams, threads, keys, and the list of things that will bite you. Every claim links to something running.

    Read the guide

  13. A model router that never sees your keys

    Next

    Pick your model provider once, in a window you trust. Sites receive a port to a model, never a key. The same introduction, pointed at accounts.

What we know so far

Where this comes from