Superbridge
by greenaltambe
README.md
# Superbridge
**Let an AI assistant (Claude, Gemini) organise your [Super Productivity](https://super-productivity.com).**
Triage the inbox, file tasks into projects, tag and schedule them, plan your day, review your week, by just asking.
Every change is shown to you first (a "dry run"), applied all-or-nothing, logged and undoable.
> Unofficial, not affiliated with Super Productivity. Early software: try it on a copy of your data, or at least read the safety section first.
## How it works (30 seconds)
```
Claude / Gemini ──asks──▶ relay ◀──checks for work── Superbridge plugin (inside Super Productivity)
```
- The **plugin** runs inside Super Productivity and does the actual reading and changing, using the app's own plugin API.
- The **relay** is a tiny server that passes requests between the assistant and the plugin. It never sees your data except what passes through it.
It runs either **on your computer** (local) or **on Cloudflare's free plan** (cloud).
- The assistant connects to the relay through what Claude calls a **connector** (the technical name is an *MCP server*).
- **Super Productivity must be open, with the plugin enabled, on at least one device**, or the assistant will just say "not connected".
## Which setup do you want?
| You want to use it from… | Choose |
|---|---|
| Claude Code or Gemini CLI on the same computer as Super Productivity | **A. Local** (10 minutes, no accounts) |
| The Claude app / website / phone, or the Gemini app | **B. Cloud** (about 30 minutes, free Cloudflare account) |
You can start with A and add B later.
## Before you start
- Super Productivity **14 or newer** on desktop (Linux, macOS or Windows).
- [Node.js](https://nodejs.org) 20 or newer, to run the relay (cloud setup also uses it to deploy).
- Download `superbridge.zip` from this repo's **Releases** page. You do not need Python for this.
- Clone this repo (`git clone https://github.com/greenaltambe/superbridge`) for the relay files.
## A. Local setup
1. **Install the plugin.** In Super Productivity: Settings → Plugins → install `superbridge.zip`. (To update later: remove it, fully quit and reopen the app, install the new ZIP.)
2. **Start the relay** in the cloned folder: `node relay/server.mjs`. It prints a **read token** and a **write token** (also saved in `relay/tokens.json`). Keep it running.
3. **Check:** open `http://127.0.0.1:8787/health` in a browser. After a few seconds it should say `"pluginConnected": true`.
4. **Connect an assistant** (use the *write token*; the read token gives look-only access):
- Claude Code: `claude mcp add --transport http superbridge http://127.0.0.1:8787/mcp --header "Authorization: Bearer <WRITE TOKEN>"`
- Gemini CLI: add to `~/.gemini/settings.json`:
`{ "mcpServers": { "superbridge": { "httpUrl": "http://127.0.0.1:8787/mcp", "headers": { "Authorization": "Bearer <WRITE TOKEN>" } } } }`
5. **Try it:** see [First things to ask](#first-things-to-ask).
## B. Cloud setup (phone, Claude app, Gemini app)
Do step 1 of A first (install the plugin), then follow [`relay/cloudflare/DEPLOY.md`](relay/cloudflare/DEPLOY.md). It covers: making a free Cloudflare account and API token, creating your three secret tokens,
deploying, and then telling the plugin where your relay lives (open the Superbridge icon in the right-hand panel and enter the relay address and the plugin token).
Then add the connector in the app you use:
- **Claude (app, web, phone):** Settings → Connectors → Add custom connector. URL `https://<worker-name>.<subdomain>.workers.dev/mcp`, keep "No sign-in", then **Add header**: name `Authorization`, value `Bearer <WRITE TOKEN>`.
Claude Code signed in to the same account shows it too (run `/mcp` to check).
- **Gemini app (web, then phone):** Settings → Connected apps → Add a custom app. Paste `https://<worker-name>.<subdomain>.workers.dev/mcp?token=<TOKEN>` (Gemini has no header field, so the token goes in the link: use the **read** token unless you want Gemini to be able to change things).
In chats, type `@` and pick Superbridge, or switch it on from the **+** menu, otherwise Gemini answers without it.
## First things to ask
- *"Ping Superbridge."* (checks the connection)
- *"Look at my Inbox and propose where each task should go. Don't change anything yet."*
- *"What's overdue or due today? Suggest a plan for today."*
- *"Stage these tasks for deletion in my 'To delete' project."* (it moves and cleans them; you delete them)
Before it changes anything the assistant should show you a list of what *would* change. Say yes to apply. Say "undo that" to revert.
## What the assistant can do
| Read | Change (needs the write token) |
|---|---|
| projects and tags, tasks (with filters), archived tasks, recurring series, a review snapshot (inbox, overdue, today, stale tasks, deadlines), what "today" is, recent changes | move tasks, tag them, edit title/notes/estimate/due day or time/deadline/priority, add to Today, reopen tasks, pause or end recurring series, create tasks/subtasks/projects/tags, start/stop time tracking, undo |
## Safety
- Changes are a **dry run by default**; applying needs an explicit second step. Up to 50 changes per batch, **all or nothing** (rolled back if one fails).
- Applied batches are logged inside the app (last 20) and **can be undone**.
- **Nothing is ever deleted.** "Stage for deletion" moves tasks to a holding project and strips dates, tags and estimate; you delete them yourself.
- Recurring tasks: moving one instance would move the whole series, so it is refused unless confirmed.
- Tokens: the **read** token can look and dry-run only. Every call is logged (relay/audit.log locally, Cloudflare logs in the cloud).
- The plugin is not sandboxed by Super Productivity: read `plugin/plugin.js` (about 650 lines) before installing anything with access to your tasks.
## Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Assistant says "Super Productivity is not connected" | The app is closed, the plugin is off, or it points at the wrong relay. Open the app, open the Superbridge panel icon and use **Test connection**. |
| `/health` says `pluginConnected: false` | Same as above. Locally, the plugin must be installed with no relay address saved. |
| Test connection says "Token rejected" | The plugin token in the panel differs from `PLUGIN_TOKEN` in `secrets.env`. (Re-upload secrets after changing: `npx wrangler secret bulk secrets.env`.) |
| Claude/Gemini says it has no Superbridge | Claude: check the connector is on for the chat. Gemini: `@`-mention it or enable it from **+**. |
| "This token is read-only" | You connected with the read token. Use the write token for changes. |
| Changes seem to do nothing | Look at the dry run text: tasks already in the requested state are reported as "no change". |
| Won't do, reminders, folders, deletion | The plugin API doesn't allow them: [`docs/PLUGIN-API-NOTES.md`](docs/PLUGIN-API-NOTES.md). |
If a token ever leaks (pasted in a chat or screenshot), see [SECURITY.md](SECURITY.md).
## Developing
`npm test` runs everything offline against a fake app (well under a minute). `python3 build.py` builds `dist/superbridge.zip`. `npm run cf:smoke` checks a running Worker.
`real-app-tests/` are scripted checks you run against your own Super Productivity (they use throwaway tasks, see each file's header).
Layout: `plugin/` plugin · `relay/` relay core, local server, Cloudflare Worker, tool definitions · `tests/` · `real-app-tests/` · `docs/`.
Releases: push a tag matching the plugin version (`git tag v0.2.1 && git push origin v0.2.1`) and GitHub Actions tests it and attaches the ZIP. The ZIP holds no secrets.
## License
MIT
This server cannot be deployed
Maintenance
ActivityNo data
ResponsivenessNo recent community issues