OmniFocus MCP Server

OmniFocus MCP Server

Enables comprehensive management of OmniFocus on macOS through 17 specialized tools for projects, tasks, and organization. Users can create, update, and filter items or navigate the interface using natural language via the Model Context Protocol.

Category
访问服务器

README

OmniFocus MCP Server

An MCP (Model Context Protocol) server that provides tools for interacting with OmniFocus on macOS.

Note: This is a personal project. You're welcome to fork, clone, and adapt it for your own use, but I'm not accepting pull requests or feature requests. Issues are used for internal tracking.

Features

This server provides 21 comprehensive tools for managing OmniFocus (v0.8.3 API):

Project Management (5 tools)

  • get_projects - Get all projects with filtering (by ID, query, status) and optional full notes
  • create_project - Create new projects with optional folder placement and review intervals
  • update_project - Update single project (all properties: name, note, status, folder, review interval, etc.)
  • update_projects - Batch update multiple projects (safe fields only: status, folder, review settings)
  • delete_projects - Delete one or multiple projects (accepts single ID or list)

Task Management (6 tools)

  • get_tasks - Get tasks with comprehensive filtering (by ID, project, parent, tags, status, dates, flags, text search, inbox-only)
  • create_task - Create tasks with all properties (due dates, defer dates, flags, tags, estimated time, notes, parent tasks)
  • update_task - Update single task (all properties: name, note, dates, flags, tags, status, project, parent, etc.)
  • update_tasks - Batch update multiple tasks (safe fields only: dates, flags, tags, status, project)
  • delete_tasks - Delete one or multiple tasks (accepts single ID or list)
  • reorder_task - Change task order relative to siblings (before/after positioning)

Folder & Organization (2 tools)

  • get_folders - Get all folders with hierarchy
  • create_folder - Create folders with optional parent folder

Tags (4 tools)

  • get_tags - Get all available tags
  • create_tag - Create new tags with optional parent nesting
  • update_tag - Update tag name or active status
  • delete_tags - Delete one or multiple tags

Perspectives (2 tools - OmniFocus Pro)

  • get_perspectives - List all perspectives with type and ID information
  • switch_perspective - Switch to a different perspective view

UI Navigation (2 tools)

  • set_focus - Focus on one or more projects/folders, or clear focus
  • get_focus - Get the currently focused items

Key Changes in v0.8.3:

  • v0.8.3: Enhanced focus (multi-item, get_focus), enriched perspectives, tag CRUD, blind agent eval (36/36), docstring improvements
  • v0.8.2: AppleScript injection hardening, consistent server error handling, dead code removal, complexity refactoring
  • v0.8.1: 35x get_projects() performance optimization via batch AppleScript reads, tag filtering fix, integration test infrastructure improvements
  • v0.7.3: Performance benchmarks, release workflow automation, scripts audit, project review optimizations (task health, opt-in lastActivityDate, AppleScript query filter)
  • v0.7.2: CHANGELOG date validation, TaskPaper import for fixtures, performance optimization for get_tasks/get_projects, test fixture refactoring complete, test count synchronization
  • v0.7.1: Test fixtures infrastructure with automatic cleanup, E2E test refactoring, ~7.8× performance improvement
  • v0.7.0: Added set_focus() UI navigation tool, fixed AppleScript focus/tab management bugs
  • v0.6.7: Fixed unit test timeout issue, fixed test coverage check script
  • v0.6.6: Release process infrastructure, interactive quality check slash commands, workflow enforcement and documentation
  • v0.6.5: Fixed AppleScript DONE status bug, added GitHub Actions CI, comprehensive testing documentation
  • v0.6.3-v0.6.4: Trunk-based workflow with RC tags, comprehensive hygiene checks for releases
  • v0.6.2: Added Claude Code hooks for automated workflow enforcement (prevents commits to main, monitors CI failures)
  • v0.6.0: Consolidated 40+ functions into 16 comprehensive tools. All updates now go through update_task() and update_project() instead of specialized functions. See CHANGELOG.md for migration guide.

Prerequisites

  • macOS (OmniFocus is macOS-only)
  • OmniFocus app installed
  • Python 3.10 or higher
  • UV package manager (recommended) or pip

Installation

Stable Release (Recommended)

Install from a specific version tag for stability:

# Clone this repository
git clone https://github.com/s-morgan-jeffries/omnifocus-mcp.git
cd omnifocus-mcp

# Checkout latest stable release
git checkout v0.8.3  # Or latest version from releases

# Option 1: Using UV (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -e .

# Option 2: Using pip
python3 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"

Development / Latest Features

Use the main branch for the latest unreleased features (always releasable, tests pass):

# Clone this repository
git clone https://github.com/s-morgan-jeffries/omnifocus-mcp.git
cd omnifocus-mcp
# main branch is default - always releasable but may have unreleased features

# Install with UV or pip (same as above)

Note: Main branch follows trunk-based development - it's always releasable and tests pass, but may contain features not yet included in a tagged release. For production use, install from a specific version tag.

Configuration

For Claude Desktop

Add this server to your Claude Desktop configuration file:

Location: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "omnifocus": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/omnifocus-mcp",
        "run",
        "omnifocus-mcp"
      ]
    }
  }
}

Or if using a virtual environment directly:

{
  "mcpServers": {
    "omnifocus": {
      "command": "/absolute/path/to/omnifocus-mcp/venv/bin/python",
      "args": [
        "-m",
        "omnifocus_mcp.server_fastmcp"
      ]
    }
  }
}

Important: Replace /absolute/path/to/omnifocus-mcp with the actual absolute path to this directory.

For Other MCP Clients

Any MCP-compatible client can use this server by launching it with:

python -m omnifocus_mcp.server_fastmcp

The server communicates via stdin/stdout using the MCP protocol.

Usage Examples

Once configured, you can ask Claude (or any MCP client) to interact with OmniFocus:

Project Management:

  • "Show me all my OmniFocus projects"
  • "Search for projects related to 'budget'" → uses get_projects(query="budget")
  • "Create a new project called 'Q1 Planning' in my Work folder"
  • "What projects are due for review?"

Task Management:

  • "Add a task 'Review Q4 numbers' with a due date next Friday, flagged as important"
  • "Show me all available tasks that are overdue"
  • "Do I have a mortgage payment due this week?" → uses get_tasks(query="mortgage", due_relative="this_week")
  • "Mark task task-001 as complete"
  • "Move this task to my Personal project"
  • "Set time estimate for task-001 to 90 minutes"

Inbox & Quick Capture:

  • "Add 'Call dentist' to my inbox"
  • "Show me what's in my inbox" → uses get_tasks(inbox_only=True)

Organization:

  • "Add the 'urgent' tag to task-001"
  • "Create a new folder called 'Personal Goals' inside 'Life'"
  • "Make task-002 a subtask of task-001"

GTD Review:

  • "Set the review interval for this project to 2 weeks"
  • "Mark project proj-001 as reviewed"

Perspectives (Pro):

  • "Switch to my 'Daily Worklist' perspective"
  • "What perspectives do I have available?"

Development

Running Tests

The project has comprehensive test coverage with 544 tests (406 passing, 138 skipped). See docs/guides/TESTING.md for detailed breakdown and procedures.

# Activate virtual environment
source venv/bin/activate

# Run all tests
pytest tests/

# Run with coverage report
pytest tests/ --cov=src/omnifocus_mcp --cov-report=term-missing

# Run specific test file
pytest tests/test_omnifocus_client.py -v

Testing the Server

You can test the server locally:

# Run the server (it will wait for MCP protocol messages on stdin)
python -m omnifocus_mcp.server_fastmcp

Debugging

The server logs to stderr, which Claude Desktop captures. To see logs:

  1. Open Claude Desktop
  2. Go to the menu and enable developer mode
  3. View logs in the developer console

Permissions

The first time you run this server, macOS may prompt you to grant permissions for:

  • Accessibility access (to control OmniFocus via AppleScript)
  • Automation permissions for OmniFocus

Grant these permissions to allow the server to function properly.

Troubleshooting

"Operation not permitted" errors

  • Check System Settings > Privacy & Security > Automation
  • Ensure the terminal or Claude Desktop has permission to control OmniFocus

"OmniFocus is not running" errors

  • Make sure OmniFocus app is running
  • Try restarting OmniFocus and the MCP server

Server not appearing in Claude Desktop

  • Check the configuration file syntax (must be valid JSON)
  • Verify the absolute paths are correct
  • Restart Claude Desktop after changing configuration
  • Check Claude Desktop logs for error messages

License

MIT

Contributing

Contributions welcome! Please see CONTRIBUTING.md for:

  • Development workflow and TDD requirements
  • Before-commit checklist
  • Code quality standards
  • How to run tests

For quick contributions: Open an issue or PR with your proposal.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选