S Setu

Setting up Setu

For the AI assistant a Setu user just pasted a message to, and for anyone curious what that message asks for.

You were sent here by Setu. It is a browser extension that lets someone point at part of the website they are building and say what to change. You are the one who makes the change, in their code.

Setu never sends their code or their requests off their computer. A small helper passes their requests to you, and passes your finished work back to their browser so they can approve or reject it.

1. Start the helper

Run this in the background and leave it running:

npx -y setu-relay@3 --http

If your tool stops background commands after a time limit, give this one the longest limit it allows. If it stops anyway, start it again.

It needs Node.js 22 or newer. If it fails because Node is missing, tell them so in plain words and point them to nodejs.org. It is the most likely thing to go wrong, and they may not know what Node is.

2. Wait for what they ask for

Run this in your project's folder, so you only get changes from this project.

curl -s -G "http://localhost:9988/picks/wait" -d seconds=50 --data-urlencode "folder=$PWD"

It answers as soon as they send something, or with [] after 50 seconds. If something is already waiting, it answers at once. You can ask for up to 110 seconds.

If it answers "Not found", the helper running is an older one: stop it and start it again with the command in step 1.

To look without waiting, GET http://localhost:9988/picks?status=pending lists everything still waiting, at once, including changes the wait would not hand you (one another session has taken, or one nobody has touched for a day). Work from the wait. Keep the ?status=pending: it is how Setu knows an assistant is listening.

You get back a list. Each item has:

3. Say you have started

When you start on a change, tell them:

PATCH http://localhost:9988/picks/<id>
{"status":"acknowledged","agent_note":"looking for the right file"}

Their browser then shows you are working on it, rather than only that it was sent.

If a change takes you more than a few minutes, send a note now and then ({"agent_note":"still on it"}). A started change with no word for 15 minutes goes back to waiting for another session.

4. Make the change, then send it back for review

Before you send a change back, check it is really in the file: open the file, or run git diff. An edit command can fail without an error. If the edit did not land, fix it, or send failed (below).

PATCH http://localhost:9988/picks/<id>
Content-Type: application/json

{"status":"needs_review","agent_note":"what you changed, in one sentence"}

This puts the change in front of them with your note, and marks the element on their page. Write the note for them, not for a developer. They read it to decide whether to approve.

5. Keep waiting

When you have sent back everything the wait gave you, run it again. A change they rejected comes back as pending, with a new entry in attempts, and wakes the wait like a new one.

If you cannot do it

PATCH http://localhost:9988/picks/<id>
{"status":"failed","agent_note":"why, in plain words"}

Better than silence: they see the reason and can try a different way.

If you need to ask first

PATCH http://localhost:9988/picks/<id>
{"status":"needs_input","agent_note":"your question, in plain words"}

They see your question in their browser and answer it there. The answer comes back through the wait, as the same change with a new entry in attempts: your question, and their answer. Ask instead of guessing, and do not close a change on a request they did not make.

Start on its own

If they ask you to make Setu start on its own, add Setu's helper to your user-level MCP settings, the ones for all their projects, not a project file. Your tool then starts the helper itself whenever it starts, and they no longer paste the setup message. The command is always:

npx -y setu-relay@3 --mcp --http

Both flags are needed: --mcp gives you Setu's nine tools (setu_watch waits for the next request instead of checking repeatedly), --http runs the helper their browser talks to. How to add it, by tool:

{
  "mcpServers": {
    "setu": {
      "command": "npx",
      "args": ["-y", "setu-relay@3", "--mcp", "--http"]
    }
  }
}

If a Setu helper you started earlier is still running, stop it first. Then tell them whether your tool needs a restart or only a new session, in plain words. After that, when they say "Watch for my changes from Setu", call setu_watch, and call it again each time it answers, as in step 5. It hands you one change at a time: anything already waiting first.

The helper runs while your tool is open and stops when it closes; the next time your tool starts, so does the helper. If they have several sessions open, the first one runs the helper and the others use it; a change goes to whichever session is watching and asks first.

Turn it off

If they ask you to stop Setu starting on its own, remove the setu entry you added: claude mcp remove --scope user setu, codex mcp remove setu, or delete it from the settings file. Removing the browser extension does not do this.