Rules for the agent
- Never ask the user for a password, token, cookie or API key, and never put one in a command, a file or the chat. The user enters every credential in their own browser or terminal prompt.
- The installer prints the MCP token inside a connect command. Do not repeat it in the chat or save it anywhere. Prefer the browser approval below, which needs no token.
- Run commands one step at a time and show the user what each one did. Stop and ask when a step fails. Do not work around the browser sign-in.
- Do not run
npm run setupa second time. It generates new tokens, which breaks any connection already made.
1. Check the prerequisites
dash.cloudflare.com/sign-up and wait.
Ask the user two things:
- Which sources they use:
ed,moodle,canvas,gmail. Any subset is fine, including none. - Their timezone, as an IANA name such as
Australia/Melbourne. The daily digest is written at 07:00 in this zone. If they are unsure, leave it out and the installer uses the computer’s zone.
2. Get the code
3. Run the installer
--yes the installer never prompts. It creates the database, applies migrations, generates the admin and MCP tokens, and deploys the Worker. A source whose credential is not already in the environment is skipped with a note, which is expected: the user adds it in step 5.
Read the Worker address from the deploy output, for example https://unicorn.<subdomain>.workers.dev. You need it for every later step.
4. Replace the admin token (you)
The installer stores an admin token but never prints it, and Cloudflare cannot show it again. Ask the user to run this in their own terminal and paste a long random value they keep in a password manager:5. Start the scheduler and add sources (you)
Ask the user to openhttps://<worker>/settings and sign in with user name unicorn and the admin token from step 4. Then:
- Click Start scheduler.
- Fill in the card for each source they chose and click Save, then Test connection.
- Click Sync now under Maintenance.
6. Check the deployment
"status":"ready", "database":true and "scheduler":"running". If scheduler is stopped, the user has not clicked Start scheduler yet.
7. Connect a client
For Claude Code, add unicorn with browser approval, so no token passes through you:/mcp in a Claude Code session, choose unicorn, and approve with user name unicorn and their admin token.
For claude.ai, Claude desktop, Cowork or ChatGPT, give the user the address https://<worker>/mcp and the steps in Connect your agent. They add it themselves in the client’s settings.
8. Confirm it works
Ask the connected client:last sync time and no error, and the scheduler should read running. If not, see Troubleshooting.