echo 0.0.1 sourceexamples

Let agents use your web app.

One small script, one Cloudflare Worker. Any framework.

Echo in four steps: install the client and the Worker, register functions, connect agents, and watch them work live.your appecho clientcloudflare workersessionlistTodosreadaddTodomutationsetCompletedmutationagent aagent b

1. Install

The client goes in your page, any framework. The Worker holds each session; deploy your own.

npm install github:acoyfellow/echo

git clone https://github.com/acoyfellow/echo && cd echo
npx wrangler secret put ECHO_SIGNING_SECRET
bun run deploy

2. Register

Name the functions agents may call and mark each read or mutation. Nothing else in the page is reachable.

import { createEcho } from '@acoyfellow/echo';

const echo = createEcho({ appId: 'todo', workerBase });

echo.register({
  listTodos: {
    effect: 'read',
    run: () => todos,
  },
  addTodo: {
    effect: 'mutation',
    run: ({ text }) => add(text),
  },
});

connectButton.onclick = () => echo.connect();
stopButton.onclick = () => echo.stop();

3. Connect, run, stop

The person presses Connect and gets one temporary MCP URL for any number of agents. Each agent sends a script that runs in a sandbox with no network; calls land in the tab one at a time. Stop ends every agent.

// echo_run { runId: 'r1', code: ... }
const todos = await app.listTodos({});

for (const todo of todos) {
  if (!todo.completed) {
    await app.setCompleted({
      id: todo.id,
      completed: true,
    });
  }
}

await app.addTodo({ text: 'Plan the next release' });

return app.listTodos({});

How it compares

Ways to let an agent act inside a web app today. A dash means it depends on how you build or configure it.

  • Works on the tab the person has open Live state, their login, what they see
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • Agent reaches only the functions you name Not the whole page, not the whole browser
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • No new backend API to build Reuse the functions your UI already calls
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • No install for the person No extension, no flags, any modern browser
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • One sandboxed script, many calls Fewer round trips, no network in the sandbox
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • Several agents at once, applied in order Calls queue in the tab, one at a time
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP
  • The person can stop it in one click Revokes every agent's access immediately
    Echo
    MCP server
    Browser automation
    Browser extension
    WebMCP

Try it here

A real todo app with Echo added. Press Connect agent, copy the URL into any MCP client, and watch the list change.

Want two agents at once? The whiteboard lets several draw on one board.


Try it on other apps

all 17 examples →

Built on Cloudflare