Skip to main content
Glama
omnifocus-mcp
by steveardis

omnifocus-mcp

An MCP server for OmniFocus that exposes the full Omni Automation JavaScript API to LLM callers.

macOS only. Requires OmniFocus running on the same machine. The entire implementation runs OmniJS snippets inside OmniFocus via osascript -l JavaScript — no AppleScript string generation, no scripting dictionary limitations.

Prerequisites

  • macOS (Omni Automation is macOS-only; the server will not start on other platforms)

  • OmniFocus installed and running

  • Node.js ≥ 20

Related MCP server: omnifocus-mcp

Install

The package is published to npm as @scardis/omnifocus-mcp.

Via npx (no install required)

Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "omnifocus": {
      "command": "npx",
      "args": ["-y", "@scardis/omnifocus-mcp"]
    }
  }
}

From source

git clone https://github.com/steveardis/omnifocus-mcp.git
cd omnifocus-mcp
npm install
npm run build

Then configure your MCP client:

{
  "mcpServers": {
    "omnifocus": {
      "command": "node",
      "args": ["/absolute/path/to/omnifocus-mcp/dist/server.js"]
    }
  }
}

Available Tools

Read

Tool

Description

list_projects

Projects with optional filtering by status, folderId, flagged. Default excludes done/dropped. Limit (default 100).

get_project

Full project detail by stable ID

list_tasks

Tasks scoped by projectId, folderId, inbox: true, or all: true with optional status/tag/due/flagged filters. Limit (default 200).

get_task

Full task detail by stable ID — includes defer/planned/due dates, tags, repetition rule, parentTaskId

list_folders

Folders with optional status filter. Limit (default 200).

get_folder

Full folder detail by stable ID, including child folder and project IDs

list_tags

Tags with optional status filter. Limit (default 200).

get_tag

Full tag detail by stable ID, including child tag IDs

resolve_name

Resolve a name to stable ID candidates — never silently disambiguates; returns all matches

Write

Tool

Description

create_task

Create a task in inbox, project, or as subtask. Supports defer/planned/due dates, tags, flagged, estimated minutes, and repetition rules.

edit_task

Edit any task field. Pass null to clear dates or repetition. Omitted fields are unchanged.

complete_task

Mark a task complete

drop_task

Mark a task dropped

delete_task

Permanently delete a task and all subtasks

create_project

Create a project, optionally in a folder. Supports type, status, review interval, tags.

edit_project

Edit project fields

complete_project

Mark a project complete

drop_project

Mark a project dropped

delete_project

Permanently delete a project and all its tasks

create_folder

Create a folder, optionally nested

edit_folder

Rename a folder

delete_folder

Permanently delete a folder and entire subtree

create_tag

Create a tag, optionally nested

edit_tag

Edit tag name or status

delete_tag

Permanently delete a tag and child tags

move_task

Move a task to a project or make it a subtask of another task

move_project

Move a project to a folder or to top level

Addressing model

Every entity returned by this server includes a stable id field (id.primaryKey from OmniFocus). Use this ID in subsequent calls rather than names. Names can be ambiguous; IDs are not.

If you have a name but not an ID, use resolve_name. It returns a list — if multiple candidates are returned, inspect the path field and ask the user to disambiguate before proceeding with any write operation.

Comparison with other OmniFocus MCP servers

Two notable alternatives exist: themotionmachine/OmniFocus-MCP and jqlts1/omnifocus-mcp-enhanced (a fork of the above with additional tools).

Scripting API. The alternatives use the JXA scripting dictionary or AppleScript to drive OmniFocus. This server makes a single JXA call — Application('OmniFocus').evaluateJavascript() — and runs all logic as OmniJS (Omni Automation) inside OmniFocus. This gives access to the full Omni Automation API surface (recurrence rules, review intervals, perspectives, forecast, attachments, URL automation, etc.) rather than the more limited scripting dictionary.

Argument injection. The alternatives construct osascript commands via string interpolation, which can break on apostrophes, quotes, backslashes, and unicode in names. This server serializes all arguments with JSON.stringify into a JS literal.

Entity addressing. The alternatives address entities primarily by name. This server returns a stable id (id.primaryKey) for every entity and provides resolve_name to map a name to ID candidates — returning all matches with full paths rather than silently picking one when names are ambiguous.

Full CRUD. This server supports creating, editing, completing, dropping, deleting, and moving tasks, projects, folders, and tags — plus repetition rules and OmniFocus 4's planned date.

Development

# Type-check without building
npm run typecheck

# Run unit tests (no OmniFocus required)
npm test

# Build (compiles TypeScript and copies snippets into dist/)
npm run build

Publishing a new version is documented in RELEASING.md.

Testing

Unit tests (no OmniFocus required)

npm test

Integration tests

⚠️ Integration tests run against your real OmniFocus database.

Each test run creates a temporary top-level folder named __MCP_TEST_<uuid>__ and deletes it on teardown. If a test run is interrupted before teardown, run the cleanup script:

npm run test:cleanup-fixtures

⚠️ Sync warning: By default, integration tests refuse to run if OmniFocus sync is enabled, to prevent test fixtures from propagating to your other devices. Disable OmniFocus sync first, or set MCP_TEST_ALLOW_SYNC=1 to opt in (fixtures will sync):

# Default (refuses if sync enabled)
npm run test:integration

# With sync enabled (use carefully)
MCP_TEST_ALLOW_SYNC=1 npm run test:integration

Clean up stale test fixtures

npm run test:cleanup-fixtures

This removes any __MCP_TEST_*__ folders and orphaned __mcp_*__ projects/tags left in OmniFocus from interrupted test runs.

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork and clone the repo

  2. Install dependencies: npm install

  3. Run unit tests (no OmniFocus needed): npm test

  4. Run integration tests (requires macOS + OmniFocus): npm run test:integration

Before submitting a PR

  • npm run typecheck — must pass with no errors

  • npm test — all unit tests must pass

  • npm run test:integration — all integration tests must pass (macOS only)

  • Keep changes focused — one feature or fix per PR

Architecture overview

The server runs OmniJS snippets inside OmniFocus via osascript -l JavaScript. Each tool has three layers:

  • Schema (src/schemas/shapes.ts) — Zod schemas for input validation and output parsing

  • Snippet (src/snippets/*.js) — OmniJS code that runs inside OmniFocus. Plain ES5 JavaScript (no imports, no TypeScript). Arguments are injected via __ARGS__ placeholder.

  • Tool handler (src/tools/*.ts) — Validates input, calls runSnippet(), parses the result

When adding a new tool:

  1. Define input/output schemas in src/schemas/shapes.ts and export from src/schemas/index.ts

  2. Create the OmniJS snippet in src/snippets/

  3. Add the snippet name to ALLOWED_SNIPPETS in src/runtime/snippetLoader.ts

  4. Create the tool handler in src/tools/ and register it in src/tools/index.ts

  5. Add unit tests for schemas and integration tests that run against OmniFocus

Writing OmniJS snippets

Snippets run inside OmniFocus's JavaScript runtime, not Node.js. Key constraints:

  • ES5-style JavaScript — use var, function(){}, no arrow functions in older OmniFocus versions

  • No imports — all OmniJS globals (flattenedTasks, flattenedProjects, moveTasks, etc.) are available directly

  • Return JSON — always return JSON.stringify({ ok: true, data: ... })

  • Error pattern — throw named errors (NotFoundError, ValidationError) which the bridge catches and wraps

License

MIT

Available Tools

27 tools
complete_projectB

Mark a project as done (complete). Returns the updated project detail.

Inputs: id (required).

complete_taskB

Mark a task complete by its stable ID. Returns the updated task detail.

Inputs: id (required).

create_folderA

Create a new OmniFocus folder. Omit parentFolderId to create at the top level; provide parentFolderId to nest it inside an existing folder.

Inputs: name (required), parentFolderId.

create_projectA

Create a new OmniFocus project. Omit folderId to create at the top level; provide folderId to place it inside a folder. Optionally set type (parallel/sequential/singleActions), status (active/onHold), review interval, and tags.

Inputs: name (required), note, type, status, +6 more.

create_tagA

Create a new OmniFocus tag. Omit parentTagId to create at the top level; provide parentTagId to nest it under an existing tag.

Inputs: name (required), parentTagId.

create_taskA

Create a new task. Placement: omit projectId and parentTaskId for inbox; provide projectId to add to a project; provide parentTaskId to create a subtask. Providing both projectId and parentTaskId is an error.

Inputs: name (required), note, tagIds, dueDate, +7 more.

delete_folderA

Permanently and recursively delete an OmniFocus folder. THIS ACTION CANNOT BE UNDONE. The ENTIRE subtree is destroyed: all child folders, all projects within those folders, and all tasks within those projects. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the folder and all of its contents.

Inputs: id (required).

delete_projectA

Permanently delete a project and ALL its tasks. THIS ACTION CANNOT BE UNDONE. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the project, and inform them that all tasks within the project will also be deleted.

Inputs: id (required).

delete_tagA

Permanently delete an OmniFocus tag. THIS ACTION CANNOT BE UNDONE. All child tags are also deleted, and all tasks/projects that held this tag have it removed automatically. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the tag and all its child tags.

Inputs: id (required).

delete_taskA

Permanently delete a task and all its subtasks. THIS ACTION CANNOT BE UNDONE. Before calling this tool you MUST ask the user to explicitly confirm they want to permanently delete the task, and inform them that all subtasks will also be deleted.

Inputs: id (required).

drop_projectA

Mark a project as dropped. Returns the updated project detail.

Inputs: id (required).

drop_taskA

Mark a task dropped by its stable ID. Returns the updated task detail.

Inputs: id (required).

edit_folderB

Rename an existing OmniFocus folder by its ID.

Inputs: id (required), name (required).

edit_projectA

Edit an existing project. Only provided fields are changed. Pass null for deferDate, dueDate, or reviewInterval to clear them. When tagIds is provided it replaces the full tag set.

Inputs: id (required), name, note, type, +6 more.

edit_tagA

Edit an existing OmniFocus tag. Provide id plus any combination of name (rename) and status (active/onHold/dropped).

Inputs: id (required), name, status.

edit_taskA

Edit an existing task by its stable ID. Only fields included in the call are changed; omitted fields are left unchanged. When tagIds is provided it replaces the full tag set. To clear a date field, pass clearDeferDate, clearPlannedDate, or clearDueDate set to true. Pass null for estimatedMinutes to clear it. To set a repetition rule, pass repetitionRule with frequency/interval/method. To clear repetition, pass clearRepetitionRule: true.

Inputs: id (required), name, note, tagIds, +10 more.

get_folderA

Get full detail for a folder by its stable ID. Returns path, parentId, status, child folder IDs, and immediate project IDs.

Inputs: id (required).

get_projectA

Get full detail for a project by its stable ID. Returns note, folder path, status, type, dates, review metadata, and tag IDs.

Inputs: id (required).

get_tagA

Get full detail for a tag by its stable ID. Returns path, parentId, status, and child tag IDs.

Inputs: id (required).

get_taskA

Get full detail for a task by its stable ID. Returns note, status, flagged, defer/due/completion dates, estimated minutes, container info, tag IDs, and parentTaskId (null for top-level tasks, set to the parent task's ID for subtasks).

Inputs: id (required).

list_foldersA

List folders in OmniFocus. By default, all folders (active and dropped) are returned. Optional filter.status ('active' | 'dropped') restricts to that status. Results are capped at limit (default 200). Each folder includes id, name, full path (ancestors joined with ▸), parentId, and status.

Inputs: limit, filter.

list_projectsA

List projects in OmniFocus. By default, done and dropped projects are excluded — pass filter.status to override. Optional filter fields: status (array of status strings), folderId (restricts to that folder's subtree), flagged (boolean). Results are capped at limit (default 100). Each project includes folderId and flagged in addition to id, name, folderPath, status, and type.

Inputs: limit, filter.

list_tagsA

List tags in OmniFocus. By default, all tags (active, onHold, and dropped) are returned. Optional filter.status ('active' | 'onHold' | 'dropped') restricts to that status. Results are capped at limit (default 200). Each tag includes id, name, full path (ancestors joined with ▸), parentId, and status.

Inputs: limit, filter.

list_tasksA

List tasks in OmniFocus within a scope. Provide exactly one of: projectId (tasks in a project), folderId (tasks across all projects in a folder), inbox (inbox tasks), or all (every task). By default, complete and dropped tasks are excluded — pass filter.status to override. Optional filter fields: flagged (boolean), status (array of status strings), tagId (string), dueBeforeDate (ISO datetime). Results are capped at limit (default 200). Each returned task includes dueDate and tagIds.

Inputs: scope (required), limit, filter.

move_projectA

Move a project to a different folder or to the top level. Pass folderId as a string to move into a folder, or null to move to the top level. Throws a not-found error if either ID does not exist.

Inputs: id (required), folderId (required).

move_taskA

Move a task to a different project (making it a top-level task) or make it a subtask of another task. Exactly one of projectId or parentTaskId must be provided. Throws a not-found error if any ID does not exist.

Inputs: id (required), projectId, parentTaskId.

resolve_nameA

Resolve an entity name to its stable ID(s). Returns ALL matches — never silently picks one. If multiple candidates are returned, ask the user or caller to disambiguate using the path field before proceeding with a write operation.

Inputs: type (required), query (required), scope.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 27 tools

    Disambiguation5/5

    Each tool targets a distinct resource/action combination: folders, tags, projects, and tasks each have their own CRUD and lifecycle tools. Overlapping verbs like complete, drop, and delete are clearly differentiated by their status-only versus destructive semantics.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun snake_case pattern: list_projects, get_task, create_folder, edit_tag, delete_project, complete_task, drop_project, and move_task. The naming style is uniform across all resources, making the set predictable and easy to navigate.

    Tool Count2/5

    27 tools exceeds the 25+ threshold and feels heavy even though the server covers four distinct OmniFocus entity types. Each tool has a clear purpose, but the overall surface is larger than a typical well-scoped MCP server needs.

    Completeness4/5

    The tool set provides strong lifecycle coverage for folders, tags, projects, and tasks, including list/get/create/edit/delete plus task/project state transitions and moves. Minor gaps exist, such as no direct way to move folders or tags after creation and no explicit reopen/restore operation, but most workflows are well supported.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers