Labsco
mdoel logo

OmniFocus MCP Server

โ˜… 7

from mdoel

Integrate OmniFocus with Claude Desktop for AI-powered task management and weekly reviews.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

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.

Architecture

Core Components

  • OmniFocusClient - Handles communication with OmniFocus via Omni Automation
  • OmniFocusJXA - Utility for building and executing JXA scripts
  • OmniFocusMCPServer - 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');
"

Support

For issues and questions:

  • Check the troubleshooting section above
  • Review the Claude Desktop MCP documentation
  • Open an issue in this repository