OmniFocus MCP Server

OmniFocus MCP Server

An MCP server that provides full read/write access to OmniFocus, enabling AI assistants to manage tasks, projects, folders, tags, and perspectives via 51 tools, resources, and prompts.

Category
访问服务器

README

OmniFocus MCP

npm version License: MIT

✔️ Turn prompts into projects.

Feature-complete Model Context Protocol server for OmniFocus. Full read/write access to tasks, projects, folders, tags, and perspectives — 51 tools, 2 resources, and 3 prompts.

Uses Omni Automation (OmniJS) under the hood, executing scripts via JXA and osascript. This is why macOS is required.

Demo

Table of Contents

Examples

"Create a project called 'Q3 Launch' in my Work folder with subtasks for design review, copy writing, and QA — all due next Friday, assigned sequentially."

"What's overdue? Flag anything due this week that isn't flagged yet."

"Move all tasks tagged 'waiting' in the 'Website Redesign' project to a new 'Blocked' project."

"Run my weekly review — go through stale projects, process inbox, and summarize what needs attention."

"How many tasks do I have tagged 'errand'? List the ones that are available."

Install

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "omnifocus-mcp-server"]
    }
  }
}

Claude Code

claude mcp add omnifocus -- npx -y omnifocus-mcp-server

Or add to .claude/settings.json:

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "omnifocus-mcp-server"]
    }
  }
}

<details> <summary><strong>Cursor</strong></summary>

Add to .cursor/mcp.json in your project or ~/.cursor/mcp.json globally:

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "omnifocus-mcp-server"]
    }
  }
}

</details>

<details> <summary><strong>Windsurf</strong></summary>

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "omnifocus-mcp-server"]
    }
  }
}

</details>

<details> <summary><strong>Codex CLI</strong></summary>

Add to ~/.codex/config.toml:

[mcp_servers.omnifocus]
command = "npx"
args = ["-y", "omnifocus-mcp-server"]

</details>

<details> <summary><strong>Gemini CLI</strong></summary>

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "omnifocus-mcp-server"]
    }
  }
}

</details>

Requirements

  • macOS (OmniFocus is macOS-only)
  • OmniFocus 4 (or OmniFocus 3 with Omni Automation support)
  • Node.js >= 18
  • Automation permission granted in System Settings > Privacy & Security > Automation

Security

This server has full read/write access to your OmniFocus database. It can create, modify, and delete tasks, projects, folders, and tags. Only connect it to AI clients and models you trust.

No data leaves your machine — all communication happens locally via osascript.

Tools

Tasks (23)

Tool Description
list_tasks List tasks with filters for status, flags, tags, projects, date ranges, and text search
get_task Get task details by ID, optionally including subtask hierarchy
create_task Create a task in inbox or a project, with tags, dates, and recurrence
update_task Update task properties (name, note, dates, flags, recurrence)
complete_task Mark a task as completed
uncomplete_task Re-open a completed task
drop_task Mark a task as dropped (cancelled)
delete_task Permanently delete a task
move_tasks Move tasks to a different project, parent task, or inbox
duplicate_tasks Duplicate tasks, optionally into a different project
set_task_tags Set, add, or remove tags on a task
add_task_notification Add an absolute or due-relative notification
remove_task_notification Remove a notification from a task
list_task_notifications List all notifications on a task
append_task_note Append text to a task's note
get_inbox_tasks Get all inbox tasks
get_flagged_tasks Get all available flagged tasks
get_today_completed_tasks Get tasks completed today
get_task_count Count tasks matching filters — use instead of list_tasks when you only need a number, not the full task data
convert_task_to_project Convert a task into a project, preserving subtasks
batch_create_tasks Create multiple tasks at once with subtask hierarchies
batch_complete_tasks Complete multiple tasks at once
batch_delete_tasks Delete multiple tasks at once

Projects (11)

Tool Description
list_projects List projects with filters for status, folder, and text search
get_project Get project details by ID or name
create_project Create a project with folder, sequential, SAL, tags, and review options
update_project Update project properties
complete_project Mark a project as done
drop_project Mark a project as dropped (cancelled)
move_project Move a project to a different folder
delete_project Permanently delete a project
get_project_tasks Get all tasks in a project
get_review_queue Get projects due for review
mark_reviewed Mark a project as reviewed

Folders (5)

Tool Description
list_folders List all folders
get_folder Get folder details including child folders and projects
create_folder Create a folder (supports nesting)
update_folder Update folder name or status
delete_folder Permanently delete a folder

Tags (5)

Tool Description
list_tags List all tags
get_tag Get tag details including child tags
create_tag Create a tag (supports nesting and allowsNextAction)
update_tag Update tag properties
delete_tag Permanently delete a tag

Perspectives (2)

Tool Description
list_perspectives List perspectives (built-in and/or custom)
get_perspective_tasks Get tasks shown in a specific perspective

Database (5)

Tool Description
get_database_summary Get counts of inbox items, projects, tags, folders, and task statistics
search Search across all items (tasks, projects, folders, tags) by name or note
dump_database Dump the entire database in a single call
save_database Explicitly save the database to disk
sync_database Trigger an OmniFocus sync to push local changes to OmniSync and pull updates from other devices. Call once at the end of a chain of mutations. The batch_* tools also accept sync: true to run a sync automatically after the batch completes.

Resources

URI Description
omnifocus://database/summary Database summary with counts
omnifocus://perspectives List of all perspectives

Prompts

Prompt Description
weekly-review Walk through your GTD weekly review: check projects due for review, process leftover inbox items, reassess flagged tasks, and get a structured summary. Marks projects as reviewed when done.
inbox-processing Process inbox items one-by-one using GTD methodology — delete non-actionable items, do anything under 2 minutes, and organize the rest into projects with tags and dates.
daily-planning Build a prioritized plan for today based on due dates, flagged items, and what you've already completed. Surfaces overdue tasks and estimates your workload.

Troubleshooting

"Not authorized" or no response from OmniFocus

Make sure Automation permissions are granted. Go to System Settings > Privacy & Security > Automation and ensure your terminal app (Terminal, iTerm, etc.) is allowed to control OmniFocus.

Changes not taking effect after rebuild

If you're developing locally, multiple MCP server processes may be running (from Claude Desktop, Claude Code, etc.). Kill them all and restart:

pkill -f "omnifocus-mcp-server"
# or if running from source:
pkill -f "omnifocus/mcp/dist/index.js"

Stale npx cache

If npx is running an old version, clear the cache:

npx clear-npx-cache
# then re-run your MCP client

OmniFocus 3 compatibility

OmniFocus 3 works if Omni Automation is enabled. Go to OmniFocus > Preferences > General and check "Omni Automation". Some features (like certain perspective types) may behave differently.

Tool calls are slow

Each tool call runs an osascript process to communicate with OmniFocus. This typically takes 200-500ms per call. Batch tools (batch_create_tasks, batch_complete_tasks, batch_delete_tasks) are much faster for bulk operations than calling individual tools in a loop.

Development

npm install
npm run build      # Compile TypeScript
npm run dev        # Run with tsx (hot reload)
npm test           # Run unit tests
npm run test:watch # Watch mode

Integration Tests

Tests against a real OmniFocus instance (creates and cleans up test items):

OMNIFOCUS_LIVE=1 npm run test:integration

Contributing

PRs welcome. Please run npm test before submitting and include tests for new tools.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选