omnifocus-mcp-bridge
An authenticated Streamable HTTP bridge that wraps the local OmniFocus MCP server, enabling remote MCP access with bearer token authentication and optional Tailscale Serve.
README
omnifocus-mcp-bridge
Authenticated Streamable HTTP bridge for
omnifocus-mcp-enhanced.
Use this when an MCP client needs remote access to OmniFocus on your Mac. The upstream OmniFocus MCP server is a local stdio process; this repo wraps it in a small authenticated Streamable HTTP server.
What it does:
- installs the published
omnifocus-mcp-enhancedpackage as a pinned dependency - launches that package locally as a child stdio MCP process
- exposes MCP over HTTP at
/mcp - requires Bearer auth on every request
- defaults to read-only tool exposure
- optionally publishes the bridge through Tailscale Serve at
/omnifocus-mcp
What it does not do:
- it does not import upstream server internals
- it does not require the upstream repo to become a monorepo
- it does not make OmniFocus itself remote; OmniFocus stays on the Mac
Requirements
- macOS with OmniFocus installed and automation access allowed
- Node.js 20+
- pnpm 11+
- Tailscale, only if using
pnpm start:tailscale
Quick Start
pnpm install
pnpm token:generate
pnpm start
Default local endpoint:
http://127.0.0.1:3050/mcp
Clients must send:
Authorization: Bearer <contents of .secrets/omnifocus-mcp-token>
Smoke test:
TOKEN="$(cat .secrets/omnifocus-mcp-token)"
curl -i http://127.0.0.1:3050/mcp \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
pnpm token:generate writes .secrets/omnifocus-mcp-token with private
permissions and does not print the token. Rotate it with:
pnpm token:generate -- --force
Security
- Bearer auth is required on every request.
- The bridge refuses to start without
OMNIFOCUS_MCP_TOKEN,OMNIFOCUS_MCP_TOKEN_FILE, or.secrets/omnifocus-mcp-token. - Token files must be regular files and must not be group/world readable.
- The default bind host is
127.0.0.1. - Read-only mode is enabled by default. Set
OMNIFOCUS_MCP_READ_ONLY=falseonly when remote mutation is intended. - The upstream OmniFocus server stays local to the Mac and is launched over stdio; no upstream internals are imported.
Configuration
.env is optional. If present, it is loaded before process environment values,
so shell, launchd, or service-manager env vars override .env.
| Variable | Default | Description |
|---|---|---|
OMNIFOCUS_MCP_TOKEN_FILE |
.secrets/omnifocus-mcp-token when present |
Private file containing the bearer token. |
OMNIFOCUS_MCP_TOKEN |
none | Direct bearer token override. Avoid inline shell usage because it can leak through history. |
OMNIFOCUS_MCP_ENV_FILE |
.env when present |
Optional dotenv file path. If explicitly set, the file must exist. |
OMNIFOCUS_MCP_HOST |
127.0.0.1 |
HTTP bind host. Keep this as 127.0.0.1 for Tailscale Serve mode. |
OMNIFOCUS_MCP_PORT |
3050 |
HTTP bind port. |
OMNIFOCUS_MCP_READ_ONLY |
true |
Set to false to expose mutating upstream tools. |
OMNIFOCUS_MCP_VERBOSE |
false |
Set to true for redacted request logs. |
OMNIFOCUS_MCP_UPSTREAM_COMMAND |
Node executable | Optional override for the stdio upstream command. |
OMNIFOCUS_MCP_UPSTREAM_ARGS |
resolved dependency bin path | Optional override args. Supports JSON arrays or shell-like quoted strings. |
To expose plain HTTP on a trusted LAN, set OMNIFOCUS_MCP_HOST=0.0.0.0. This is
not HTTPS; prefer Tailscale Serve for remote access.
Tailscale Serve
For tailnet HTTPS:
pnpm start:tailscale
This starts the bridge on 127.0.0.1:${OMNIFOCUS_MCP_PORT:-3050} and runs
Tailscale Serve in the foreground. With the default port, the Serve command is:
tailscale serve --set-path /omnifocus-mcp http://127.0.0.1:3050/mcp
Remote endpoint:
https://<mac-name>.<tailnet>.ts.net/omnifocus-mcp
The wrapper refuses to overwrite an existing /omnifocus-mcp route, leaves
unrelated Serve routes alone, and does not run tailscale serve reset.
Run in the Background
Use a macOS LaunchAgent, not a LaunchDaemon, so OmniFocus automation runs in the logged-in user's GUI session.
pnpm launchd:install
This renders launchd/com.0xjem.omnifocus-mcp-bridge.plist.template to:
~/Library/LaunchAgents/com.0xjem.omnifocus-mcp-bridge.plist
The service runs an installed copy of scripts/omnifocus-mcp-bridge.sh, so
macOS Login Items show a named bridge entry instead of pnpm. The installed
launcher lives outside ~/Documents to avoid macOS background-item privacy
restrictions, keeps the bridge alive, and writes logs to:
~/Library/Logs/omnifocus-mcp-bridge/
Check status:
launchctl print "gui/$(id -u)/com.0xjem.omnifocus-mcp-bridge"
pnpm launchd:logs
Uninstall:
pnpm launchd:uninstall
Upstream Launch
The upstream package is pinned in package.json. At runtime, the bridge:
- resolves
omnifocus-mcp-enhanced/package.json - reads the package
binentry - starts
node <resolved-bin-path>as a child stdio MCP process
Override launch only when testing a different stdio server:
OMNIFOCUS_MCP_UPSTREAM_COMMAND=node \
OMNIFOCUS_MCP_UPSTREAM_ARGS='["/absolute/path/to/custom/server.js"]' \
pnpm start
Read-Only Mode
When OMNIFOCUS_MCP_READ_ONLY is unset or true, only these tools are exposed:
dump_databaseget_task_by_idread_task_attachmentget_today_completed_tasksget_inbox_tasksget_flagged_tasksget_forecast_tasksget_tasks_by_tagfilter_taskslist_custom_perspectivesget_custom_perspective_tasks
Known and unknown mutating tools are blocked in read-only mode.
Diagnostics
Enable redacted request logs:
pnpm start:tailscale -- --verbose
or:
OMNIFOCUS_MCP_VERBOSE=true pnpm start:tailscale
Verbose logs include method, path, status, duration, remote address, forwarded-for, user agent, content type, accept header, whether an Authorization header was present, and whether bearer auth passed. They do not include bearer tokens or request bodies.
If a client gets 502 Bad Gateway and no bridge request log appears, the request
did not reach the bridge. Check:
tailscale serve status --json
lsof -nP -iTCP:3050 -sTCP:LISTEN
If the bridge logs statusCode:401, the request reached the bridge but the
token was missing or invalid.
Development
pnpm install
pnpm run format:check
pnpm run lint
pnpm run typecheck
pnpm test
pnpm run build
Tests use a fake stdio MCP child process. They do not launch OmniFocus or call the real upstream package.
pnpm start, pnpm start:tailscale, and pnpm token:generate run
pnpm run build before executing compiled output.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。