OmniFocus MCP Server
A Model Context Protocol server that integrates OmniFocus with Claude Desktop, providing AI-powered access to tasks and projects for enhanced task management and weekly reviews.
Tools
get_active_tasks
Call this tool to get a list of all active (uncompleted) tasks from the user's OmniFocus. Use it when the user asks for their 'active tasks', 'current tasks', or 'open tasks'.
get_all_tasks
Call this tool to get a list of all tasks from OmniFocus, including completed ones. Use it when the user explicitly asks for 'all tasks' or 'completed tasks'.
get_active_projects
Call this tool to get a list of all active (not completed or dropped) projects from OmniFocus. Use it when the user asks for their 'active projects' or 'current projects'.
get_all_projects
Call this tool to get a list of all projects from OmniFocus, including completed and dropped ones. Use it when the user explicitly asks for 'all projects'.
README
OmniFocus MCP Server
A Model Context Protocol (MCP) server for integrating OmniFocus with Claude Desktop. This server provides Claude with access to your OmniFocus tasks and projects, enabling AI-powered task management and weekly reviews.
Features
- 🎯 OmniFocus Integration - Access tasks and projects from OmniFocus
- 🔧 Active Task Filtering - Get only uncompleted tasks, excluding templates and system items
- 🚀 TypeScript + MCP SDK - Type-safe and maintainable
- 🔒 Secure Automation - Uses official Omni Automation JavaScript API
- 📱 Claude Desktop Ready - Works seamlessly with Claude Desktop
Current Tools
omnifocus:get_all_tasks
Retrieve all tasks from OmniFocus with filtering options:
includeCompleted(boolean) - Include completed tasks (default: false)limit(number) - Maximum number of tasks to return (default: 100)
omnifocus:get_active_tasks
Retrieve only active (uncompleted) tasks, automatically filtering out:
- Tasks from "Templates" folders
- Tasks containing template placeholders (
«,») - Tasks with synced preferences markers (
⚙️)
omnifocus:get_projects
Retrieve all active projects from OmniFocus.
Prerequisites
- macOS with OmniFocus installed
- Node.js 23.10.0 or higher
- Claude Desktop application
- Automation permissions for OmniFocus
Installation
-
Clone the repository:
git clone https://github.com/mdoel/omnifocus-mcp cd omnifocus-mcp -
Install dependencies:
npm install -
Build the project:
npm run build -
Configure Claude Desktop:
Add this to your Claude Desktop MCP configuration:
{ "mcpServers": { "omnifocus": { "command": "/path/to/omnifocus/run-server.sh", "args": [] } } }Important: Replace
/path/to/omnifocus/with the actual path to your project directory. -
Grant automation permissions:
The first time you run the server, macOS will prompt you to grant automation permissions for OmniFocus. Click "Allow" when prompted.
Note: If you encounter permission issues, you may need to temporarily uncomment the
osascriptlines inrun-server.shto trigger the permission dialog. After granting permissions, comment those lines out again to avoid the dialog on every startup. -
Restart Claude Desktop to load the new MCP server.
Usage
Once configured, you can ask Claude to:
- "Get all my active tasks from OmniFocus"
- "Show me my projects"
- "What tasks do I have for today?"
- "Help me with my weekly review"
Architecture
Core Components
OmniFocusClient- Handles communication with OmniFocus via Omni AutomationOmniFocusJXA- Utility for building and executing JXA scriptsOmniFocusMCPServer- Main MCP server implementation
Directory Structure
src/
├── index.ts # Main entry point
├── server.ts # MCP server implementation
├── omnifocus/
│ ├── client.ts # OmniFocus automation client
│ └── omnifocus-jxa.ts # JXA script utilities
└── types/
└── omnifocus.ts # TypeScript definitions
Development
Building
# Build the project
npm run build
# Watch mode for development
npm run dev
Testing
You can test the server locally:
# Test with command line arguments
node dist/index.js all # Get all tasks
node dist/index.js active # Get active tasks only
node dist/index.js projects # Get projects only
Testing OmniFocus Automation
Test OmniFocus automation directly:
# Test basic connection
osascript -l JavaScript -e "Application('OmniFocus').running()"
# Test task retrieval
osascript -l JavaScript -e "
const app = Application('OmniFocus');
const doc = app.defaultDocument;
const tasks = doc.flattenedTasks();
console.log('Found ' + tasks.length + ' tasks');
"
Troubleshooting
Server Connection Issues
If Claude Desktop can't connect to the server:
- Check the script path in your Claude Desktop configuration
- Verify permissions - ensure the
run-server.shscript is executable:chmod +x run-server.sh - Check Node.js installation - ensure Node.js 23.10.0+ is installed
- Review logs - check Claude Desktop's MCP server logs for error messages
Permission Issues
If you get automation permission errors:
- Open System Preferences > Security & Privacy > Privacy
- Select Automation from the left sidebar
- Find your terminal/shell and check OmniFocus
- Restart your terminal and try again
OmniFocus Not Found
- Ensure OmniFocus is installed and running
- Verify the app name is "OmniFocus" (not "OmniFocus 3" or something similar)
- Check that OmniFocus is not in the trash or disabled
Performance Issues
If the server is slow or times out:
- The server may take time to process large OmniFocus databases
- Consider using the
limitparameter to reduce the number of tasks returned - Ensure OmniFocus is not performing other operations
Contributing
This project is designed to be extensible. To add new functionality:
- Add new tools in the
src/omnifocus/directory - Update the server to register new tools
- Test thoroughly with your OmniFocus data
- Submit a pull request with clear documentation
License
MIT License - see LICENSE file for details.
Support
For issues and questions:
- Check the troubleshooting section above
- Review the Claude Desktop MCP documentation
- Open an issue in this repository
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。