Things Cloud MCP
by AndreasSko
README.md
# Things Cloud MCP
An [MCP](https://modelcontextprotocol.io) server that lets an AI assistant read
and edit your [Things](https://culturedcode.com/things/) tasks from any machine.
You self-host it on a Cloudflare Worker and connect it to ChatGPT, Claude, or
any MCP client.
Ask for today's tasks, add a task to an Area, Project or tag, triage your
Inbox, set reminders and deadlines, or create repeating tasks.
> **Unofficial.** Things has no public API. This server uses the same private
> endpoint the Things apps use, worked out from community projects (see
> [ADR 0004](docs/adr/0004-reverse-engineered-things-contract.md)). Cultured
> Code can change it at any time, which would break writes, and there is some
> account risk. Writes are off by default. Keep a backup and use at your own
> risk.
## How it works
```
MCP client ──POST /mcp──▶ Cloudflare Worker ──▶ AccountDurableObject (SQLite mirror)
│
background sync keeps it fresh
▼
Things Cloud (private API)
```
The Worker keeps a copy of your Things data (a "mirror") in a small SQLite
database inside one Durable Object. Reads come from the mirror, so they are
fast and keep working even when Things Cloud is slow. A background job refreshes
it. A write is sent to Things Cloud as a single commit, then read back to
confirm it landed. One mirror holds one account. See
[ARCHITECTURE.md](docs/ARCHITECTURE.md) for details.
## Tools
**Read (15)** — answered from the mirror; every response says how fresh it is:
`get_overview`, `get_today`, `get_inbox`, `get_upcoming`, `get_anytime`,
`get_someday`, `get_logbook`, `get_projects`, `get_project`, `get_repeating`,
`get_task`, `get_areas`, `get_tags`, `search_tasks`, `get_sync_status`.
Long lists page with a `nextCursor`; Today, Inbox and Upcoming return
everything. `get_task` returns the full note, checklist, tags, reminder and
state.
**Write (33)** — off unless `ENABLE_WRITE_TOOLS=true`:
- Capture & schedule: `create_task`, `create_project`, `schedule_task`,
`move_to_today`, `set_task_deadline`, `set_task_reminder`
- Organize: `move_task`, `rename_task`, `update_task_notes` (replace / append /
prepend), `set_task_tags`, `add_task_tags`, `remove_task_tags`
- State: `complete_task`, `reopen_task`, `cancel_task`, `trash_task`,
`restore_task`
- Checklists: `add_checklist_item`, `rename_checklist_item`,
`set_checklist_item_completed`, `remove_checklist_item`
- Projects & headings: `update_project`, `complete_project`, `create_heading`,
`rename_heading`
- Recurrence: `create_repeating_task`, `update_repeating_task`,
`pause_repeating_task`, `complete_repeating_occurrence`
- Batch, up to 50 tasks in one commit: `batch_move`, `batch_complete`,
`batch_schedule`, `batch_trash` (needs `confirm: true`)
### Write safety
A write needs `ENABLE_WRITE_TOOLS=true` and either the bearer token or the OAuth
`mcp:write` scope. While `WRITE_DRY_RUN=true` a write only returns a preview.
Every real write:
- carries a unique `commandId`, so sending it again returns the saved result
instead of writing twice;
- is sent once and never retried (a lost reply is reported as "unknown", not
resent);
- requires the mirror to be up to date first; and
- is read back afterwards to confirm it landed.
Ordinary task tools only touch active, ordinary tasks; repeating templates and
occurrences have their own tools. In a batch, if one task can't be changed,
nothing changes and the rejected IDs come back.
## Setup
You need Node.js, a Cloudflare account with Wrangler, and your Things Cloud
login.
```bash
npm install
```
### Configure
Required:
| Variable | Purpose |
| --- | --- |
| `MCP_BEARER_TOKEN` | Login for direct clients (e.g. Codex) |
| `THINGS_EMAIL`, `THINGS_PASSWORD` | Things Cloud sign-in |
| `THINGS_TIMEZONE` | Time zone for relative dates like "today" (`wrangler.toml`) |
Optional: `ENABLE_WRITE_TOOLS` (`true` to allow writes), `WRITE_DRY_RUN`
(`false` to write for real), `ALLOWED_ORIGINS`, `AUTO_SYNC_ENABLED`,
`THINGS_BASE_URL`, `OAUTH_ALLOWED_CLIENT_HOSTS`. For ChatGPT/Claude sign-in:
`GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET`, `GITHUB_ALLOWED_USER_ID`.
Local runs read `.dev.vars` (gitignored):
```bash
MCP_BEARER_TOKEN="a-long-random-token"
THINGS_EMAIL="you@example.com"
THINGS_PASSWORD="your Things Cloud password"
THINGS_TIMEZONE="Europe/Berlin"
WRITE_DRY_RUN="true"
```
### Run locally
```bash
npm run dev -- --port 8787
curl -sS http://localhost:8787/health
```
The MCP endpoint is `http://localhost:8787/mcp`. Add
`--persist-to /tmp/things-mcp-local` to use a separate local database.
### Deploy
Copy the example config, fill in your own values, and deploy. `wrangler.toml` is
gitignored because it holds your identifiers.
```bash
cp wrangler.example.toml wrangler.toml
npm exec -- wrangler deploy
curl -sS https://your-worker.workers.dev/health
```
Put the secrets in Wrangler (not in the file):
```bash
npm exec -- wrangler secret put MCP_BEARER_TOKEN
npm exec -- wrangler secret put THINGS_EMAIL
npm exec -- wrangler secret put THINGS_PASSWORD
# Only for ChatGPT/Claude sign-in:
npm exec -- wrangler secret put GITHUB_CLIENT_ID
npm exec -- wrangler secret put GITHUB_CLIENT_SECRET
```
See [OPERATIONS.md](docs/OPERATIONS.md) for deploy checks and free-tier limits.
## Connect a client
- **ChatGPT or Claude:** add a custom connector pointing at
`https://your-worker.workers.dev/mcp` and sign in with GitHub. Only the single
`GITHUB_ALLOWED_USER_ID` may sign in; GitHub is used only to check that ID and
its token is then discarded. Approve editing to get write access; without it
the connection stays read-only. `OAUTH_ALLOWED_CLIENT_HOSTS` (default
`chatgpt.com,claude.ai`) sets which connectors are allowed.
- **Direct clients (e.g. Codex):** send `Authorization: Bearer <MCP_BEARER_TOKEN>`.
The GitHub OAuth app's callback is
`https://your-worker.workers.dev/oauth/callback`. The connector's own callback
(for Claude, `https://claude.ai/api/mcp/auth_callback`) is checked by this
server against the connector's metadata, not set in GitHub.
## Develop
```bash
npm run typecheck
npm test
```
Tests run in the Cloudflare Workers Vitest pool, so Durable Objects, SQLite and
alarms behave like the real runtime.
## More
- [Architecture](docs/ARCHITECTURE.md) · [Operations](docs/OPERATIONS.md) ·
[Decision records](docs/adr/)
- Credits — informed by community Things Cloud projects:
[arthursoares/things-cloud-sdk](https://github.com/arthursoares/things-cloud-sdk),
[mattydsmith/things-cloud-mcp](https://github.com/mattydsmith/things-cloud-mcp),
[wbopan/things-cloud-mcp](https://github.com/wbopan/things-cloud-mcp),
[evanpurkhiser/things3-cloud](https://github.com/evanpurkhiser/things3-cloud),
[disrupted/things-cloud-api](https://github.com/disrupted/things-cloud-api).
These are behavioral references, not an official contract.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues