Skip to main content
Glama

omnifocus-cli

CI Release Python Coverage Container License

Independent OmniFocus 4 automation with a production CLI, a secure HTTPS API, and a container-first MCP server.

omnifocus-cli syncs directly with an OmniFocus WebDAV endpoint, reads encrypted .ofocus bundles, exposes a clean of command-line interface, runs as an MCP server for Claude-compatible hosts, and can serve a private HTTPS JSON API for n8n and other automation clients.

It does not require OmniFocus.app, macOS, AppleScript, or Omni Automation. If a host can reach your OmniFocus WebDAV bundle and provide the right credentials, omnifocus-cli can run there headlessly.

Why This Project

  • Native-feeling CLI for day-to-day task management

  • MCP server over stdio for LLM tooling and local assistants

  • HTTPS JSON API for n8n-style automations, protected by mandatory TLS 1.3+ and Bearer auth

  • Direct WebDAV sync without AppleScript or Omni Automation glue

  • No dependency on OmniFocus.app or macOS at runtime

  • Headless/container-friendly operation on servers, CI runners, and agent boxes

  • Hermetic tests, strict typing, and 100% coverage enforcement

  • Podman-friendly runtime image with a non-root default user

Related MCP server: MCP OmniFocus

No OmniFocus App Required

omnifocus-cli talks to the sync bundle directly.

  • Required: WebDAV access to the .ofocus bundle and, when enabled, the encryption passphrase

  • Not required: OmniFocus.app installed locally

  • Not required: macOS

  • Not required: System Automation permissions

  • Supported deployment shape: local workstation, remote Linux box, CI job, or long-lived MCP host

Quick Start

Build the runtime image

podman build --target runtime -t of .

Create a persistent cache

mkdir -p .of-cache

Run CLI commands

# Runs anywhere with network access to the WebDAV bundle
podman run --rm \
  -v "$PWD/.of-cache":/cache \
  -e OF_CACHE_DIR=/cache \
  -e OF_WEBDAV_URL \
  -e OF_WEBDAV_USER \
  -e OF_WEBDAV_PASS \
  of sync

podman run --rm \
  -v "$PWD/.of-cache":/cache \
  -e OF_CACHE_DIR=/cache \
  -e OF_WEBDAV_URL \
  -e OF_WEBDAV_USER \
  -e OF_WEBDAV_PASS \
  of tasks --inbox

Run as an MCP host process

podman run --rm -i \
  -v "$PWD/.of-cache":/cache \
  -e OF_CACHE_DIR=/cache \
  -e OF_WEBDAV_URL \
  -e OF_WEBDAV_USER \
  -e OF_WEBDAV_PASS \
  of

Run as a private HTTPS API

podman run --rm \
  -p 127.0.0.1:8443:8443 \
  -v "$PWD/certs":/tls:ro \
  -e OF_HTTP_API_KEY=replace-me \
  -e OF_HTTP_TLS_CERT_FILE=/tls/cert.pem \
  -e OF_HTTP_TLS_KEY_FILE=/tls/key.pem \
  of http

Inspect the CLI surface

podman run --rm --pull=always of --help
podman run --rm --pull=always of --version

Documentation

Command Model

The project exposes three native Python entrypoints:

  • of for CLI usage

  • of-mcp for direct MCP usage

  • of-http for direct HTTPS API usage

The container image ships with a launcher:

  • podman run --rm of sync Runs the CLI

  • podman run --rm of add "Task name" Runs the CLI

  • podman run --rm -i of Starts the MCP server over stdio

  • podman run --rm -i of mcp Starts the MCP server explicitly

  • podman run --rm of http Starts the HTTPS API with mandatory TLS and Bearer auth

CLI Usage

The full CLI surface lives in docs/cli.md.

High-level command groups:

  • tasks

  • projects

  • folders

  • tags

  • sync

Current Surface

Today the project supports:

  • direct WebDAV sync of OmniFocus bundles

  • tasks, projects, folders, and tags

  • project review workflow over MCP

  • HTTPS JSON API for tasks, projects, folders, tags, review, and sync

  • MCP over stdio

  • headless/container-first deployment

Not yet implemented:

  • perspectives

  • statistics commands

  • dedicated inbox subcommands

MCP Integration

The detailed MCP tool catalog lives in docs/mcp.md.

Container behavior

The runtime image starts the MCP server when you run it without a command:

podman run --rm -i of

That is the correct shape for MCP hosts that manage a long-lived stdio subprocess. If you track :latest, prefer podman pull or --pull=always before running so a cached local image does not mask a newer published release.

Claude-compatible configuration

{
  "mcpServers": {
    "omnifocus": {
      "command": "podman",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/absolute/path/to/repo/.of-cache:/cache",
        "-e",
        "OF_CACHE_DIR=/cache",
        "-e",
        "OF_WEBDAV_URL",
        "-e",
        "OF_WEBDAV_USER",
        "-e",
        "OF_WEBDAV_PASS",
        "of:latest"
      ]
    }
  }
}

Set the variables in your MCP host's explicit environment configuration; do not put credential values in command arguments or embed them in OF_WEBDAV_URL.

MCP deployment notes

  • Mount a persistent cache directory for better warm-start performance

  • Reuse a long-lived container when your MCP host supports it

  • Use podman run --rm -i of mcp only if you want an explicit MCP selector

Environment Variables

Variable

Required

Description

OF_WEBDAV_URL

Yes

WebDAV bundle URL. Embedded credentials remain supported for compatibility but are not recommended.

OF_WEBDAV_USER

No

Explicit WebDAV username. Overrides URL-embedded credentials.

OF_WEBDAV_PASS

No

Explicit WebDAV password. Overrides URL-embedded credentials.

OF_ENCRYPTION_PASSPHRASE

No

Bundle decryption passphrase. Defaults to the WebDAV password.

OF_CACHE_DIR

No

Cache directory. Defaults to a repo-local .of-cache/ when detectable, otherwise /tmp/of-cache.

Every sensitive variable also accepts a mutually exclusive _FILE form (for example, OF_WEBDAV_PASS_FILE). The file is read as UTF-8 and is suitable for a container secret mount. Prefer it to an environment variable or URL-embedded credentials.

Distribution

The project ships as:

  • a Python package with of and of-mcp

  • a container image for CLI and MCP usage

  • a GitHub Release with wheel and sdist artifacts

  • a GHCR runtime image published by the release workflow

The runtime container is based on python:3.14-slim, runs as a non-root user, and is published for both linux/amd64 and linux/arm64. PyPI publishing is intentionally out of scope for the current release process.

Development

For local setup, quality checks, and release workflow details, see CONTRIBUTING.md.

Changelog

Release notes live in CHANGELOG.md.

Author

Maciej Szymczak
maciej@szymczak.at

Available Tools

25 tools
add_folderC

Create a new OmniFocus folder.

Inputs: name (required), parent_folder_id.

add_projectC

Create a new OmniFocus project.

Inputs: name (required), due, note, defer, +3 more.

add_tagC

Create a new OmniFocus tag.

Inputs: name (required), note, parent_tag_id.

add_taskC

Create a new OmniFocus task.

Inputs: name (required), due, note, defer, +7 more.

complete_projectB

Mark a project as completed by ID or fuzzy name.

Inputs: query (required).

complete_taskC

Mark a task as completed by ID or fuzzy name.

Inputs: query (required).

drop_folderC

Drop a folder by ID.

Inputs: folder_id (required).

drop_tagC

Drop a tag by ID.

Inputs: tag_id (required).

get_folderA

Get a single folder by its OmniFocus ID.

Inputs: folder_id (required).

get_folder_treeB

Return the nested folder hierarchy with direct child projects.

Inputs: no named parameters.

get_projectB

Get a single project by its OmniFocus ID.

Inputs: project_id (required).

get_tagB

Get a single tag by its OmniFocus ID.

Inputs: tag_id (required).

get_taskB

Get a single task by its OmniFocus ID.

Inputs: task_id (required).

list_foldersB

List all OmniFocus folders.

Inputs: no named parameters.

list_projectsC

List OmniFocus projects.

Inputs: tag, status, tag_id.

list_projects_for_reviewC

List active and inactive projects that are due for review.

Inputs: limit, due_only.

list_tagsC

List OmniFocus tags/contexts.

Inputs: all.

list_tasksB

List active OmniFocus tasks. Optionally filter by inbox, today (due today or overdue), flagged, project name (substring), or tasks with a due date.

Inputs: due, tag, inbox, limit, +10 more.

mark_project_reviewedB

Stamp a project as reviewed and recalculate next review when possible.

Inputs: project_id (required), reviewed_at.

search_tasksB

Fuzzy search tasks by name or ID.

Inputs: query (required), limit.

sync_nowB

Trigger a full sync from the WebDAV server.

Inputs: no named parameters.

update_folderB

Rename or move a folder under another folder.

Inputs: folder_id (required), name, clear_parent, parent_folder_id.

update_projectC

Update a project's fields, status, or folder assignment.

Inputs: project_id (required), due, name, note, +7 more.

update_tagC

Rename or move a tag under another tag.

Inputs: tag_id (required), name, note, clear_parent, +1 more.

update_taskC

Update a task's fields or mark it dropped.

Inputs: task_id (required), due, name, note, +13 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 25 tools

    Disambiguation4/5

    The tools are mostly cleanly separated by resource type (tags, folders, projects, tasks) and action. A few boundaries are slightly blurry, such as update_task being able to mark a task dropped versus complete_task, and project review tools overlapping with list_projects/get_project.

    Naming Consistency4/5

    Nearly all tools use a predictable snake_case verb_noun pattern such as list_tags, get_folder, add_project, update_task, and drop_tag. Minor deviations like sync_now and mark_project_reviewed are still understandable and do not significantly harm consistency.

    Tool Count4/5

    Twenty-five tools is on the heavy side, but the domain naturally covers four resource types (tags, folders, projects, tasks) plus review and sync operations. The count is mostly justified, though there is some room to consolidate.

    Completeness4/5

    Core lifecycle coverage is strong: tags and folders have full CRUD/drop support, tasks have list/search/get/add/update/complete, and projects have add/get/update/complete plus review support. Minor gaps remain, such as no explicit drop_project and limited search beyond tasks.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol (MCP) server that integrates with OmniFocus to enable Claude (or other MCP-compatible AI assistants) to interact with your tasks and projects.
      7
      808 npm
      256
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables automation and management of OmniFocus tasks, projects, and tags using natural language and programmable interfaces from VS Code, command line, or any MCP-compatible client.
      12
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI-powered task management in OmniFocus with support for project reviews, planned dates, repeating tasks, custom perspectives, hierarchical subtasks, and advanced filtering. Perfect for Claude AI integration with comprehensive CRUD operations for tasks, projects, and folders.
      31
      3
      MIT