omnifocus-mcp
omnifocus-mcp
OmniFocus 用の MCP サーバーで、Omni Automation JavaScript API 全体を LLM 呼び出し元に公開します。
macOS のみ対応。 同じマシンで OmniFocus が実行されている必要があります。実装全体は osascript -l JavaScript を介して OmniFocus 内で OmniJS スニペットを実行します — AppleScript の文字列生成は行わず、スクリプティング辞書の制限もありません。
前提条件
macOS (Omni Automation は macOS 専用です。他のプラットフォームではサーバーは起動しません)
OmniFocus がインストールされ、実行中であること
Node.js ≥ 20
Related MCP server: OmniFocus MCP Server
インストール
このパッケージは npm に @scardis/omnifocus-mcp として公開されています。
npx 経由 (インストール不要)
MCP クライアントの設定 (例: Claude Desktop の claude_desktop_config.json) に追加します:
{
"mcpServers": {
"omnifocus": {
"command": "npx",
"args": ["-y", "@scardis/omnifocus-mcp"]
}
}
}ソースから
git clone https://github.com/steveardis/omnifocus-mcp.git
cd omnifocus-mcp
npm install
npm run build次に MCP クライアントを設定します:
{
"mcpServers": {
"omnifocus": {
"command": "node",
"args": ["/absolute/path/to/omnifocus-mcp/dist/server.js"]
}
}
}利用可能なツール
読み取り
ツール | 説明 |
| status・folderId・flagged によるオプションのフィルタリング付きでプロジェクトを取得します。デフォルトでは完了/ドロップ済みを除外。上限 (デフォルト 100)。 |
| 安定 ID によるプロジェクトの全詳細を取得します |
|
|
| 安定 ID によるタスクの全詳細を取得します — defer/planned/due 日付、タグ、繰り返しルール、parentTaskId を含む |
| オプションの status フィルター付きでフォルダを取得します。上限 (デフォルト 200)。 |
| 安定 ID によるフォルダの全詳細を取得します。子フォルダとプロジェクトの ID を含む |
| オプションの status フィルター付きでタグを取得します。上限 (デフォルト 200)。 |
| 安定 ID によるタグの全詳細を取得します。子タグの ID を含む |
| 名前を安定 ID の候補に解決します — 黙って曖昧さを解消することはありません。すべての一致を返します |
書き込み
ツール | 説明 |
| 受信トレイ・プロジェクト内・サブタスクとしてタスクを作成します。defer/planned/due 日付、タグ、flagged、予定分数、繰り返しルールに対応。 |
| タスクの任意のフィールドを編集します。日付や繰り返しをクリアするには |
| タスクを完了としてマークします |
| タスクをドロップとしてマークします |
| タスクとすべてのサブタスクを完全に削除します |
| プロジェクトを作成します。フォルダ内にも作成可能。type・status・レビュー間隔・タグに対応。 |
| プロジェクトのフィールドを編集します |
| プロジェクトを完了としてマークします |
| プロジェクトをドロップとしてマークします |
| プロジェクトとそのすべてのタスクを完全に削除します |
| フォルダを作成します。ネストも可能 |
| フォルダ名を変更します |
| フォルダとサブツリー全体を完全に削除します |
| タグを作成します。ネストも可能 |
| タグ名またはステータスを編集します |
| タグと子タグを完全に削除します |
| タスクをプロジェクトに移動するか、別のタスクのサブタスクにします |
| プロジェクトをフォルダ内またはトップレベルに移動します |
アドレス指定モデル
このサーバーが返すすべてのエンティティには、安定した id フィールド (OmniFocus の id.primaryKey) が含まれます。以降の呼び出しでは名前ではなくこの ID を使用してください。名前は曖昧になる可能性がありますが、ID は曖昧になりません。
名前はあるが ID がない場合は、resolve_name を使用してください。これはリストを返します — 複数の候補が返された場合は、path フィールドを確認し、書き込み操作を進める前にユーザーに曖昧さを解消してもらってください。
他の OmniFocus MCP サーバーとの比較
注目すべき代替手段が 2 つあります: themotionmachine/OmniFocus-MCP と jqlts1/omnifocus-mcp-enhanced (上記のフォークで、追加のツールを備えています)。
スクリプティング API。 代替手段は JXA スクリプティング辞書または AppleScript を使用して OmniFocus を操作します。このサーバーは単一の JXA 呼び出し — Application('OmniFocus').evaluateJavascript() — を行い、すべてのロジックを OmniFocus 内で OmniJS (Omni Automation) として実行します。これにより、より制限されたスクリプティング辞書ではなく、Omni Automation API の全機能 (繰り返しルール、レビュー間隔、パースペクティブ、予測、添付ファイル、URL オートメーションなど) にアクセスできます。
引数の注入。 代替手段は文字列補間で osascript コマンドを構築するため、名前内のアポストロフィ、引用符、バックスラッシュ、ユニコードで壊れる可能性があります。このサーバーはすべての引数を JSON.stringify で JS リテラルにシリアライズします。
エンティティのアドレス指定。 代替手段は主に名前でエンティティを指定します。このサーバーはすべてのエンティティに対して安定した id (id.primaryKey) を返し、名前を ID 候補にマッピングする resolve_name を提供します — 名前が曖昧な場合に黙って 1 つを選択するのではなく、完全なパス付きですべての一致を返します。
完全な CRUD。 このサーバーは、タスク・プロジェクト・フォルダ・タグの作成、編集、完了、ドロップ、削除、移動をサポートします — さらに繰り返しルールと OmniFocus 4 の planned date にも対応。
開発
# Type-check without building
npm run typecheck
# Run unit tests (no OmniFocus required)
npm test
# Build
npm run buildテスト
ユニットテスト (OmniFocus 不要)
npm test統合テスト
⚠️ 統合テストは、実際の OmniFocus データベースに対して実行されます。
各テスト実行では、
__MCP_TEST_<uuid>__という名前の一時トップレベルフォルダが作成され、ティアダウン時に削除されます。ティアダウン前にテスト実行が中断された場合は、クリーンアップスクリプトを実行してください:npm run test:cleanup-fixtures
⚠️ 同期の警告: デフォルトでは、テストフィクスチャが他のデバイスに伝播するのを防ぐため、OmniFocus の同期が有効な場合、統合テストは実行を拒否します。最初に OmniFocus の同期を無効にするか、
MCP_TEST_ALLOW_SYNC=1を設定してオプトインしてください (フィクスチャは同期されます):# Default (refuses if sync enabled) npm run test:integration # With sync enabled (use carefully) MCP_TEST_ALLOW_SYNC=1 npm run test:integration
古いテストフィクスチャのクリーンアップ
npm run test:cleanup-fixturesこれにより、中断されたテスト実行によって OmniFocus に残された __MCP_TEST_*__ フォルダと、孤立した __mcp_*__ プロジェクト/タグがすべて削除されます。
コントリビューション
コントリビューションは歓迎します! 始め方は以下のとおりです:
リポジトリを フォークしてクローン します
依存関係をインストール:
npm installユニットテストを実行 (OmniFocus 不要):
npm test統合テストを実行 (macOS + OmniFocus が必要):
npm run test:integration
PR を提出する前に
npm run typecheck— エラーなしでパスする必要がありますnpm test— すべてのユニットテストがパスする必要がありますnpm run test:integration— すべての統合テストがパスする必要があります (macOS のみ)変更は焦点を絞ってください — PR ごとに 1 つの機能または修正
アーキテクチャ概要
サーバーは osascript -l JavaScript を介して OmniFocus 内で OmniJS スニペットを実行します。各ツールには 3 つの層があります:
スキーマ (
src/schemas/shapes.ts) — 入力検証と出力解析のための Zod スキーマスニペット (
src/snippets/*.js) — OmniFocus 内で実行される OmniJS コード。プレーンな ES5 JavaScript (インポートなし、TypeScript なし)。引数は__ARGS__プレースホルダーを介して注入されます。ツールハンドラー (
src/tools/*.ts) — 入力を検証し、runSnippet()を呼び出し、
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage tasks, Focus Zone, notes, projects, and task history from compatible AI assistants.
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
Give your AI agents the tools to build, manage, and run automation workflows.
Read and write your Teleprompter.com scripts and folders: list, create, update, and organize.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables 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.2
- AlicenseAqualityDmaintenanceEnables 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.216MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to read and write to OmniFocus database, allowing natural language task management, project creation, and GTD workflows.41MIT
- AlicenseAqualityBmaintenanceGives MCP-compatible AI assistants full, typed access to OmniFocus on macOS, enabling task management, project manipulation, inbox processing, and more via natural language.100501MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/steveardis/omnifocus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server