MCP server and CLI for reading and writing OmniPlan (.oplx) and Microsoft Project (.mpp) schedule files
Project description
OmniPlan MCP
An MCP (Model Context Protocol) server and CLI for reading and writing OmniPlan (.oplx) and Microsoft Project (.mpp) schedule files.
macOS only — AppleScript bridge required for .mpp and all write operations.
Installation
pip install omniplan-mcp
Or install from source in editable mode:
cd /Users/cygnus/work/github/omniplan-mcp
pip install -e .
Usage
CLI mode (human-friendly)
Read and display a schedule:
# Read a complete schedule
omniplan-mcp read schedule.oplx
# Show a high-level summary
omniplan-mcp summary schedule.oplx
# Search for tasks by name
omniplan-mcp search schedule.oplx "design"
# List all tasks (table or tree view)
omniplan-mcp tasks schedule.oplx
omniplan-mcp tasks schedule.oplx --tree
# List resources or dependencies
omniplan-mcp resources schedule.oplx
omniplan-mcp dependencies schedule.oplx
Modify a schedule (requires the document to be open in OmniPlan):
# Find a task's ID by name
omniplan-mcp lookup "Task Name"
# Mark a task as complete
omniplan-mcp set-done 258
omniplan-mcp set-done 258 --subtree
# Add/remove dependencies
omniplan-mcp add-dep 260 258
omniplan-mcp rm-dep 260 258
# Set duration (seconds, days, hours, or minutes)
omniplan-mcp set-duration 258 3d
omniplan-mcp set-duration 258 28800
# Add a new child task
omniplan-mcp add-task 258 "Subtask" 2d
# Rename, delete, clear constraints
omniplan-mcp rename 258 "New Name"
omniplan-mcp delete 258
omniplan-mcp clear-constraint 258
# Save the document
omniplan-mcp save
# JSON output (read commands)
omniplan-mcp read schedule.oplx --json
omniplan-mcp summary schedule.oplx --json
Get help:
omniplan-mcp --help
omniplan-mcp read --help
MCP server mode (for AI tools)
Start the MCP server in stdio mode:
omniplan-mcp serve
Configure your MCP host (e.g., Claude Code) to use it:
{
"mcpServers": {
"omniplan": {
"command": "omniplan-mcp",
"args": ["serve"]
}
}
}
Architecture
src/omniplan_mcp/
├── __init__.py # Version (__version__ = "0.5.0")
├── __main__.py # CLI entry point: delegates to cli.py
├── cli.py # CLI subcommands (click)
├── server.py # MCP server: tool definitions + output formatters
└── parser.py # Two parsing paths + write operations (AppleScript bridge)
tests/
└── test_parser.py # Unit tests with in-memory .oplx ZIPs
Dual-mode design
The package provides two interfaces from the same codebase:
- CLI mode (
omniplan-mcp read ...,omniplan-mcp set-done ...) — human-friendly terminal output - MCP server mode (
omniplan-mcp serve) — JSON-RPC over stdio for AI tools
Both share the same parser (parser.py) and AppleScript bridge.
Key design decisions
-
Dual parser architecture:
.mppfiles open OmniPlan and read via AppleScript's in-memory object model..oplxfiles parse XML directly (no OmniPlan needed). Both return identical 6-tuples:(projects, resources, tasks, violations, assignments, dependencies). -
Two ID systems: XML (.oplx) uses string IDs like
"t258". AppleScript uses sequential integers starting at 1. All write operations strip thetprefix automatically. -
Write operations work on the open OmniPlan document: Tools like
add_dependency,set_task_duration,clear_constraint_dategenerate AppleScript that targetsdocument 1ofapplication "OmniPlan". The document must be open. -
Read tools work from file (.oplx or .mpp):
read,summary,search,tasks,resources,dependenciesparse the file on disk. -
list_dependenciesreads from the baseline scenario, not the editing scenario.
Omni Automation JavaScript vs JXA
evaluate_omniplan_script uses Omni Automation JavaScript (not JXA/AppleScript JS). See the full explanation in the MCP server documentation.
Percent-complete computation
.oplx files store completion as effort-done / effort ratio. Group tasks compute completion bottom-up from children. Task status is computed: 100% → "finished", else compare end date to today.
Development
# Install in editable mode
pip install -e .
# Run tests
python -m pytest tests/ -v
# Build distribution
python -m build
Testing
Tests use a hand-crafted .oplx ZIP in memory (no real files). Add new test functions in tests/test_parser.py with inline XML constants. Tests cover: parsing, resource filtering, tree building, string parent IDs, percent-complete from effort, outline_depth, task_status, and Actual.xml preference.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omniplan_mcp-0.5.0.tar.gz.
File metadata
- Download URL: omniplan_mcp-0.5.0.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f391835ca5fb2060027e38e10696aab3b160141728d2792aa9c7ddb137289fd
|
|
| MD5 |
efabb33bc8b9be134a18e44c7f90a6f2
|
|
| BLAKE2b-256 |
47e1a0a21efe09bac6885f50c6751735b9bc23751c69ef6b9cc3002eada0d5a3
|
Provenance
The following attestation bundles were made for omniplan_mcp-0.5.0.tar.gz:
Publisher:
publish.yml on cygnusyang/omniplan-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omniplan_mcp-0.5.0.tar.gz -
Subject digest:
8f391835ca5fb2060027e38e10696aab3b160141728d2792aa9c7ddb137289fd - Sigstore transparency entry: 1822369969
- Sigstore integration time:
-
Permalink:
cygnusyang/omniplan-mcp@e4e462cd70cfabfdc644c77df3227ff3aed7cc5d -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/cygnusyang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e4e462cd70cfabfdc644c77df3227ff3aed7cc5d -
Trigger Event:
push
-
Statement type:
File details
Details for the file omniplan_mcp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: omniplan_mcp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 36.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcfee17c71353102422a32aac185e5f57562334b021467b5d492f1c136298633
|
|
| MD5 |
98f45dfcbba01f9d8df61f567e28dd6c
|
|
| BLAKE2b-256 |
c244a977bbfb26361dc676bf9235a1598da424b6cc0c14b2f34b4fea85afbe5b
|
Provenance
The following attestation bundles were made for omniplan_mcp-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on cygnusyang/omniplan-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omniplan_mcp-0.5.0-py3-none-any.whl -
Subject digest:
bcfee17c71353102422a32aac185e5f57562334b021467b5d492f1c136298633 - Sigstore transparency entry: 1822369996
- Sigstore integration time:
-
Permalink:
cygnusyang/omniplan-mcp@e4e462cd70cfabfdc644c77df3227ff3aed7cc5d -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/cygnusyang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e4e462cd70cfabfdc644c77df3227ff3aed7cc5d -
Trigger Event:
push
-
Statement type: