omnifocus-sync-mcp
A headless MCP server that reads and writes OmniFocus data by directly communicating with the Omni Sync Server via WebDAV, enabling task management without a local OmniFocus app.
README
omnifocus-sync-mcp
A headless MCP server that reads and writes OmniFocus data by talking directly to the Omni Sync Server over WebDAV — no Mac, no running OmniFocus app. It implements OmniFocus's client-side end-to-end encryption in TypeScript, so it can run anywhere Node runs (a Linux NAS, a container, a cloud box).
Every other OmniFocus MCP server automates the local macOS app via AppleScript/JXA. This one speaks the cloud sync protocol instead, which is what lets it run headless.
⚠️ Alpha / use at your own risk. This talks to your real task database. The read and write paths have been validated end-to-end against a live Omni Sync Server account (add + delete transactions round-trip correctly), and the crypto and parsing have an offline test suite — but this hasn't been exercised across every OmniFocus version or edge case. Keep a backup (in OmniFocus: File → Back Up Database), and consider a throwaway account while evaluating. See Safety.
How it works
An OmniFocus sync store is a WebDAV collection (OmniFocus.ofocus/) containing:
- a baseline transaction and a chain of delta transactions, each a
.zipholding acontents.xmldescribing object creates/updates/deletes; .clientfiles registering each device and the transaction "tail" it has synced to;- an
encryptedplist holding the wrapped document keys.
This server:
- Resolves the shard —
sync.omnigroup.com302-redirects each account to asyncN.omnigroup.comhost; the client follows it. - Authenticates with HTTP Digest (what Omni Sync Server negotiates).
- Decrypts using the OmniFileStore format: PBKDF2 derives a wrapping key from your passphrase, RFC 3394 unwraps the document key slots, and each file is AES-128-CTR + HMAC-SHA256 in 64 KiB segments (encrypt-then-MAC).
- Replays the transaction chain into an in-memory object model.
- Writes by building a new
contents.xml, zipping, encrypting,PUT-ting it as a new transaction descending from the current head tail, and refreshing its.clientregistration so other clients treat it as a real participant.
The crypto and format were reimplemented from Omni's own open-source frameworks
(OmniGroup/OmniGroup, notably
OmniFileStore/EncryptionFormat.md and DecryptionExample.py) plus community
reverse-engineering (tomzx/ofocus-format,
rubyfocus). See CREDITS.
Install
git clone https://github.com/rosskukulinski/omnifocus-sync-mcp.git
cd omnifocus-sync-mcp
npm install
npm run build
Configure
Set credentials via environment variables (see .env.example):
| Variable | Required | Description |
|---|---|---|
OMNIFOCUS_SYNC_USERNAME |
yes | Omni Sync Server account name |
OMNIFOCUS_SYNC_PASSWORD |
yes | Omni Sync Server account password |
OMNIFOCUS_ENCRYPTION_PASSPHRASE |
no | Defaults to the sync password (OmniFocus's default) |
OMNIFOCUS_SYNC_URL |
no | Defaults to https://sync.omnigroup.com |
OMNIFOCUS_DATABASE |
no | Defaults to OmniFocus.ofocus |
OMNIFOCUS_CLIENT_NAME |
no | Display name for this client's .client file |
OMNIFOCUS_CLIENT_STATE_FILE |
no | Where the stable client id is stored |
OMNIFOCUS_READ_ONLY |
no | 1/true to refuse all writes |
Try it without an MCP client
A diagnostic CLI exercises the sync path directly:
export OMNIFOCUS_SYNC_USERNAME=... OMNIFOCUS_SYNC_PASSWORD=...
npm run probe -- sync # show database counts
npm run probe -- list flagged # list flagged tasks
npm run probe -- projects # list projects
npm run probe -- add "Buy milk" # add an inbox task
Use as an MCP server
Run over stdio. Example Claude Desktop / Claude Code config:
{
"mcpServers": {
"omnifocus": {
"command": "node",
"args": ["/absolute/path/to/omnifocus-sync-mcp/dist/index.js"],
"env": {
"OMNIFOCUS_SYNC_USERNAME": "your-account",
"OMNIFOCUS_SYNC_PASSWORD": "your-password"
}
}
}
}
Tools
| Tool | Description |
|---|---|
of_sync |
Reload the database from the server; returns counts |
of_list_tasks |
List tasks (remaining, available, flagged, inbox, due_soon, all), with project/tag/search filters |
of_get_task |
Full detail for one task by id |
of_list_projects |
List projects with folder path and status |
of_add_task |
Create a task (inbox or in a project) |
of_complete_task |
Mark a task complete |
of_edit_task |
Edit name/note/flag/due/defer; clear dates |
of_delete_task |
Delete a task by id |
Safety
- Back up first, and prefer a test account until you trust the write path.
- Start with
OMNIFOCUS_READ_ONLY=1to explore safely. - Writes are append-only transactions; a bad write forks history rather than destroying data, and OmniFocus merges forks on its next sync — but that is a safety net, not a guarantee.
- Secrets come from the environment only; nothing is written to this repo. The client
identity file (
client.json) contains no secrets.
Development
npm test # offline test suite (crypto round-trips, parse/write, digest)
npm run dev -- ... # run the CLI via tsx without building
The offline tests cover the risky parts without a network or a real account: the
OmniFileStore encrypt/decrypt round-trip at every segment boundary, MAC tamper
detection, the passphrase→PBKDF2→key-unwrap pipeline, contents.xml build/parse
round-trips, partial-update merge semantics, and the full zip→encrypt→decrypt→parse
read path.
Credits
Built by reimplementing formats documented and open-sourced by others:
- OmniGroup/OmniGroup — Omni's own frameworks;
OmniFileStore/EncryptionFormat.mdandDecryptionExample.pyare the authoritative encryption spec, andOmniFoundation/XML/OFXMLIdentifier.mthe id format. - tomzx/ofocus-format — the
.ofocustransaction/format write-up. - jyruzicka/rubyfocus, kumpelblase2/focus — prior-art parsers.
Not affiliated with or endorsed by The Omni Group. "OmniFocus" is their trademark.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。