omniplan-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omniplan_mcp-0.1.0/LICENSE +21 -0
- omniplan_mcp-0.1.0/PKG-INFO +279 -0
- omniplan_mcp-0.1.0/README.md +254 -0
- omniplan_mcp-0.1.0/pyproject.toml +40 -0
- omniplan_mcp-0.1.0/setup.cfg +4 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp/__init__.py +34 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp/__main__.py +39 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp/parser.py +492 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp/server.py +392 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/PKG-INFO +279 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/SOURCES.txt +14 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/dependency_links.txt +1 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/entry_points.txt +2 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/requires.txt +1 -0
- omniplan_mcp-0.1.0/src/omniplan_mcp.egg-info/top_level.txt +1 -0
- omniplan_mcp-0.1.0/tests/test_parser.py +115 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cygnus Yang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: omniplan-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server for reading OmniPlan (.oplx) and Microsoft Project (.mpp) schedule files
|
|
5
|
+
Author: Cygnus Yang
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/cygnusyang/omniplan-mcp
|
|
8
|
+
Project-URL: Repository, https://github.com/cygnusyang/omniplan-mcp
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/cygnusyang/omniplan-mcp/issues
|
|
10
|
+
Keywords: mcp,omniplan,project-management,microsoft-project,schedule,claude
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: mcp>=1.0.0
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="https://img.shields.io/badge/macOS-required-blue" alt="macOS">
|
|
28
|
+
<img src="https://img.shields.io/badge/python-≥3.10-blue" alt="Python">
|
|
29
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
30
|
+
<img src="https://img.shields.io/github/v/release/cygnusyang/omniplan-mcp" alt="Release">
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
# OmniPlan MCP Server
|
|
34
|
+
|
|
35
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that lets Claude read and analyze project schedule files — **OmniPlan (.oplx)** and **Microsoft Project (.mpp)** formats.
|
|
36
|
+
|
|
37
|
+
Ask Claude questions like:
|
|
38
|
+
- *"What's the current project schedule?"*
|
|
39
|
+
- *"List all milestones and their dates"*
|
|
40
|
+
- *"Show me tasks related to the robotic arm"*
|
|
41
|
+
- *"What's the overall progress percentage?"*
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
| Feature | Description |
|
|
46
|
+
|---------|-------------|
|
|
47
|
+
| 📂 **Read .mpp** | Parse Microsoft Project files via OmniPlan bridge |
|
|
48
|
+
| 📂 **Read .oplx** | Direct XML parsing (no OmniPlan needed) |
|
|
49
|
+
| 🏛️ **Full hierarchy** | Groups, tasks, milestones with dates and progress |
|
|
50
|
+
| 🔍 **Search** | Find tasks by keyword across the entire schedule |
|
|
51
|
+
| 👤 **Resources** | List all human resources and assignments |
|
|
52
|
+
| 📊 **Summary** | Phase overview, progress statistics, timeline |
|
|
53
|
+
| 🔒 **Safe concurrency** | Cross-process lock prevents conflicts when multiple Claude sessions run |
|
|
54
|
+
|
|
55
|
+
## Prerequisites
|
|
56
|
+
|
|
57
|
+
| Requirement | Notes |
|
|
58
|
+
|-------------|-------|
|
|
59
|
+
| **macOS** | Required (for AppleScript/OmniPlan bridge) |
|
|
60
|
+
| **Python 3.10+** | For running the MCP server |
|
|
61
|
+
| **OmniPlan** | Only needed for `.mpp` files; `.oplx` works without it |
|
|
62
|
+
|
|
63
|
+
### Install OmniPlan (optional — only for .mpp files)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
brew install --cask omniplan
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> **First run**: macOS may prompt for Accessibility/Automation permissions when OmniPlan is called via AppleScript. Grant them in **System Settings → Privacy & Security → Automation**.
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
### 1. Install
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Option A: One-line installer (recommended)
|
|
77
|
+
curl -fsSL https://raw.githubusercontent.com/cygnusyang/omniplan-mcp/main/install.sh | bash
|
|
78
|
+
|
|
79
|
+
# Option B: Manual clone
|
|
80
|
+
git clone https://github.com/cygnusyang/omniplan-mcp.git
|
|
81
|
+
cd omniplan-mcp
|
|
82
|
+
pip install -e .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Configure Claude Code
|
|
86
|
+
|
|
87
|
+
Add to your `~/.claude/settings.json`:
|
|
88
|
+
|
|
89
|
+
<details>
|
|
90
|
+
<summary><b>uv run (recommended)</b></summary>
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"omniplan": {
|
|
96
|
+
"command": "uv",
|
|
97
|
+
"args": [
|
|
98
|
+
"run",
|
|
99
|
+
"--directory", "/Users/yourusername/.local/share/omniplan-mcp",
|
|
100
|
+
"omniplan-mcp"
|
|
101
|
+
],
|
|
102
|
+
"env": {}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary><b>pip install (after PyPI publish)</b></summary>
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"mcpServers": {
|
|
115
|
+
"omniplan": {
|
|
116
|
+
"command": "uvx",
|
|
117
|
+
"args": ["omniplan-mcp"],
|
|
118
|
+
"env": {}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
<details>
|
|
126
|
+
<summary><b>Direct Python</b></summary>
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"mcpServers": {
|
|
131
|
+
"omniplan": {
|
|
132
|
+
"command": "/path/to/python3",
|
|
133
|
+
"args": ["-m", "omniplan_mcp"],
|
|
134
|
+
"env": {
|
|
135
|
+
"PYTHONPATH": "/path/to/omniplan-mcp/src"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
### 3. Restart Claude Code
|
|
144
|
+
|
|
145
|
+
The MCP server will start automatically. You can now ask Claude about your project files!
|
|
146
|
+
|
|
147
|
+
## Usage Examples
|
|
148
|
+
|
|
149
|
+
### Read a project schedule
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
你:帮我读取 PLB1011 项目计划,看看有哪些阶段
|
|
153
|
+
Claude:调用 read_schedule → 显示完整任务树
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### List milestones
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
你:列出所有里程碑节点
|
|
160
|
+
Claude:调用 list_milestones → 显示所有 ◇ 里程碑
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Search for tasks
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
你:搜索所有关于"机械臂"的任务
|
|
167
|
+
Claude:调用 search_tasks → 显示匹配的任务列表
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Project summary
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
你:这个项目的整体进度怎么样?
|
|
174
|
+
Claude:调用 schedule_summary → 显示阶段概览和进度统计
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Tools Reference
|
|
178
|
+
|
|
179
|
+
| Tool | Description | Parameters |
|
|
180
|
+
|------|-------------|------------|
|
|
181
|
+
| `read_schedule` | Full task hierarchy with dates and progress | `filepath` (required), `format`: tree/flat/json |
|
|
182
|
+
| `list_milestones` | All milestone tasks | `filepath` |
|
|
183
|
+
| `list_resources` | All human resources | `filepath` |
|
|
184
|
+
| `search_tasks` | Search tasks by keyword | `filepath`, `keyword` |
|
|
185
|
+
| `schedule_summary` | Phase overview and progress stats | `filepath` |
|
|
186
|
+
|
|
187
|
+
## How It Works
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
.mpp file ──→ OmniPlan (AppleScript) ──→ .oplx (XML) ──→ MCP Server ──→ Claude
|
|
191
|
+
↑
|
|
192
|
+
.oplx file ───────────────┴─── direct XML parsing ──────┘
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### For .oplx files
|
|
196
|
+
Direct XML parsing — fast, no external dependencies.
|
|
197
|
+
|
|
198
|
+
### For .mpp files
|
|
199
|
+
1. MCP server opens the `.mpp` file in OmniPlan via AppleScript
|
|
200
|
+
2. Exports to `.oplx` format
|
|
201
|
+
3. Parses the exported XML
|
|
202
|
+
4. Cleans up temporary files
|
|
203
|
+
|
|
204
|
+
> A **cross-process file lock** prevents AppleScript conflicts when multiple Claude Code sessions run simultaneously.
|
|
205
|
+
|
|
206
|
+
## Project Structure
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
omniplan-mcp/
|
|
210
|
+
├── install.sh # One-click installer
|
|
211
|
+
├── pyproject.toml # Package metadata (PyPI-ready)
|
|
212
|
+
├── README.md # This file
|
|
213
|
+
├── LICENSE # MIT license
|
|
214
|
+
├── .gitignore
|
|
215
|
+
├── src/
|
|
216
|
+
│ └── omniplan_mcp/
|
|
217
|
+
│ ├── __init__.py # Package version
|
|
218
|
+
│ ├── __main__.py # CLI entry point
|
|
219
|
+
│ ├── server.py # MCP server (tools & handlers)
|
|
220
|
+
│ ├── parser.py # .mpp / .oplx file parsing
|
|
221
|
+
│ └── lock.py # Cross-process file lock
|
|
222
|
+
└── tests/
|
|
223
|
+
└── test_parser.py # Unit tests
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Development
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Clone
|
|
230
|
+
git clone https://github.com/cygnusyang/omniplan-mcp.git
|
|
231
|
+
cd omniplan-mcp
|
|
232
|
+
|
|
233
|
+
# Install in editable mode
|
|
234
|
+
pip install -e .
|
|
235
|
+
|
|
236
|
+
# Run tests
|
|
237
|
+
python -m pytest tests/
|
|
238
|
+
|
|
239
|
+
# Run the server directly (stdio)
|
|
240
|
+
python -m omniplan_mcp
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Publishing to PyPI
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Install build tools
|
|
247
|
+
pip install build twine
|
|
248
|
+
|
|
249
|
+
# Build
|
|
250
|
+
python -m build
|
|
251
|
+
|
|
252
|
+
# Upload to TestPyPI first
|
|
253
|
+
twine upload --repository testpypi dist/*
|
|
254
|
+
|
|
255
|
+
# Upload to PyPI
|
|
256
|
+
twine upload dist/*
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Requirements
|
|
260
|
+
|
|
261
|
+
- **Python 3.10+**
|
|
262
|
+
- **macOS** (for OmniPlan AppleScript bridge)
|
|
263
|
+
- **OmniPlan** (only for `.mpp` files; optional for `.oplx`)
|
|
264
|
+
|
|
265
|
+
## Limitations
|
|
266
|
+
|
|
267
|
+
- `.mpp` parsing requires OmniPlan to be installed
|
|
268
|
+
- Only supports macOS (AppleScript dependency)
|
|
269
|
+
- Does not modify `.mpp` files — read-only
|
|
270
|
+
|
|
271
|
+
## License
|
|
272
|
+
|
|
273
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
274
|
+
|
|
275
|
+
## Related
|
|
276
|
+
|
|
277
|
+
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
278
|
+
- [OmniPlan](https://www.omnigroup.com/omniplan/)
|
|
279
|
+
- [Claude Code MCP Servers](https://docs.anthropic.com/en/docs/claude-code/mcp-servers)
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://img.shields.io/badge/macOS-required-blue" alt="macOS">
|
|
3
|
+
<img src="https://img.shields.io/badge/python-≥3.10-blue" alt="Python">
|
|
4
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
5
|
+
<img src="https://img.shields.io/github/v/release/cygnusyang/omniplan-mcp" alt="Release">
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# OmniPlan MCP Server
|
|
9
|
+
|
|
10
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that lets Claude read and analyze project schedule files — **OmniPlan (.oplx)** and **Microsoft Project (.mpp)** formats.
|
|
11
|
+
|
|
12
|
+
Ask Claude questions like:
|
|
13
|
+
- *"What's the current project schedule?"*
|
|
14
|
+
- *"List all milestones and their dates"*
|
|
15
|
+
- *"Show me tasks related to the robotic arm"*
|
|
16
|
+
- *"What's the overall progress percentage?"*
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
| Feature | Description |
|
|
21
|
+
|---------|-------------|
|
|
22
|
+
| 📂 **Read .mpp** | Parse Microsoft Project files via OmniPlan bridge |
|
|
23
|
+
| 📂 **Read .oplx** | Direct XML parsing (no OmniPlan needed) |
|
|
24
|
+
| 🏛️ **Full hierarchy** | Groups, tasks, milestones with dates and progress |
|
|
25
|
+
| 🔍 **Search** | Find tasks by keyword across the entire schedule |
|
|
26
|
+
| 👤 **Resources** | List all human resources and assignments |
|
|
27
|
+
| 📊 **Summary** | Phase overview, progress statistics, timeline |
|
|
28
|
+
| 🔒 **Safe concurrency** | Cross-process lock prevents conflicts when multiple Claude sessions run |
|
|
29
|
+
|
|
30
|
+
## Prerequisites
|
|
31
|
+
|
|
32
|
+
| Requirement | Notes |
|
|
33
|
+
|-------------|-------|
|
|
34
|
+
| **macOS** | Required (for AppleScript/OmniPlan bridge) |
|
|
35
|
+
| **Python 3.10+** | For running the MCP server |
|
|
36
|
+
| **OmniPlan** | Only needed for `.mpp` files; `.oplx` works without it |
|
|
37
|
+
|
|
38
|
+
### Install OmniPlan (optional — only for .mpp files)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
brew install --cask omniplan
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> **First run**: macOS may prompt for Accessibility/Automation permissions when OmniPlan is called via AppleScript. Grant them in **System Settings → Privacy & Security → Automation**.
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
### 1. Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Option A: One-line installer (recommended)
|
|
52
|
+
curl -fsSL https://raw.githubusercontent.com/cygnusyang/omniplan-mcp/main/install.sh | bash
|
|
53
|
+
|
|
54
|
+
# Option B: Manual clone
|
|
55
|
+
git clone https://github.com/cygnusyang/omniplan-mcp.git
|
|
56
|
+
cd omniplan-mcp
|
|
57
|
+
pip install -e .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Configure Claude Code
|
|
61
|
+
|
|
62
|
+
Add to your `~/.claude/settings.json`:
|
|
63
|
+
|
|
64
|
+
<details>
|
|
65
|
+
<summary><b>uv run (recommended)</b></summary>
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"omniplan": {
|
|
71
|
+
"command": "uv",
|
|
72
|
+
"args": [
|
|
73
|
+
"run",
|
|
74
|
+
"--directory", "/Users/yourusername/.local/share/omniplan-mcp",
|
|
75
|
+
"omniplan-mcp"
|
|
76
|
+
],
|
|
77
|
+
"env": {}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
</details>
|
|
83
|
+
|
|
84
|
+
<details>
|
|
85
|
+
<summary><b>pip install (after PyPI publish)</b></summary>
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"omniplan": {
|
|
91
|
+
"command": "uvx",
|
|
92
|
+
"args": ["omniplan-mcp"],
|
|
93
|
+
"env": {}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary><b>Direct Python</b></summary>
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"omniplan": {
|
|
107
|
+
"command": "/path/to/python3",
|
|
108
|
+
"args": ["-m", "omniplan_mcp"],
|
|
109
|
+
"env": {
|
|
110
|
+
"PYTHONPATH": "/path/to/omniplan-mcp/src"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
</details>
|
|
117
|
+
|
|
118
|
+
### 3. Restart Claude Code
|
|
119
|
+
|
|
120
|
+
The MCP server will start automatically. You can now ask Claude about your project files!
|
|
121
|
+
|
|
122
|
+
## Usage Examples
|
|
123
|
+
|
|
124
|
+
### Read a project schedule
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
你:帮我读取 PLB1011 项目计划,看看有哪些阶段
|
|
128
|
+
Claude:调用 read_schedule → 显示完整任务树
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### List milestones
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
你:列出所有里程碑节点
|
|
135
|
+
Claude:调用 list_milestones → 显示所有 ◇ 里程碑
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Search for tasks
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
你:搜索所有关于"机械臂"的任务
|
|
142
|
+
Claude:调用 search_tasks → 显示匹配的任务列表
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Project summary
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
你:这个项目的整体进度怎么样?
|
|
149
|
+
Claude:调用 schedule_summary → 显示阶段概览和进度统计
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Tools Reference
|
|
153
|
+
|
|
154
|
+
| Tool | Description | Parameters |
|
|
155
|
+
|------|-------------|------------|
|
|
156
|
+
| `read_schedule` | Full task hierarchy with dates and progress | `filepath` (required), `format`: tree/flat/json |
|
|
157
|
+
| `list_milestones` | All milestone tasks | `filepath` |
|
|
158
|
+
| `list_resources` | All human resources | `filepath` |
|
|
159
|
+
| `search_tasks` | Search tasks by keyword | `filepath`, `keyword` |
|
|
160
|
+
| `schedule_summary` | Phase overview and progress stats | `filepath` |
|
|
161
|
+
|
|
162
|
+
## How It Works
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
.mpp file ──→ OmniPlan (AppleScript) ──→ .oplx (XML) ──→ MCP Server ──→ Claude
|
|
166
|
+
↑
|
|
167
|
+
.oplx file ───────────────┴─── direct XML parsing ──────┘
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### For .oplx files
|
|
171
|
+
Direct XML parsing — fast, no external dependencies.
|
|
172
|
+
|
|
173
|
+
### For .mpp files
|
|
174
|
+
1. MCP server opens the `.mpp` file in OmniPlan via AppleScript
|
|
175
|
+
2. Exports to `.oplx` format
|
|
176
|
+
3. Parses the exported XML
|
|
177
|
+
4. Cleans up temporary files
|
|
178
|
+
|
|
179
|
+
> A **cross-process file lock** prevents AppleScript conflicts when multiple Claude Code sessions run simultaneously.
|
|
180
|
+
|
|
181
|
+
## Project Structure
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
omniplan-mcp/
|
|
185
|
+
├── install.sh # One-click installer
|
|
186
|
+
├── pyproject.toml # Package metadata (PyPI-ready)
|
|
187
|
+
├── README.md # This file
|
|
188
|
+
├── LICENSE # MIT license
|
|
189
|
+
├── .gitignore
|
|
190
|
+
├── src/
|
|
191
|
+
│ └── omniplan_mcp/
|
|
192
|
+
│ ├── __init__.py # Package version
|
|
193
|
+
│ ├── __main__.py # CLI entry point
|
|
194
|
+
│ ├── server.py # MCP server (tools & handlers)
|
|
195
|
+
│ ├── parser.py # .mpp / .oplx file parsing
|
|
196
|
+
│ └── lock.py # Cross-process file lock
|
|
197
|
+
└── tests/
|
|
198
|
+
└── test_parser.py # Unit tests
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Development
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Clone
|
|
205
|
+
git clone https://github.com/cygnusyang/omniplan-mcp.git
|
|
206
|
+
cd omniplan-mcp
|
|
207
|
+
|
|
208
|
+
# Install in editable mode
|
|
209
|
+
pip install -e .
|
|
210
|
+
|
|
211
|
+
# Run tests
|
|
212
|
+
python -m pytest tests/
|
|
213
|
+
|
|
214
|
+
# Run the server directly (stdio)
|
|
215
|
+
python -m omniplan_mcp
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Publishing to PyPI
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Install build tools
|
|
222
|
+
pip install build twine
|
|
223
|
+
|
|
224
|
+
# Build
|
|
225
|
+
python -m build
|
|
226
|
+
|
|
227
|
+
# Upload to TestPyPI first
|
|
228
|
+
twine upload --repository testpypi dist/*
|
|
229
|
+
|
|
230
|
+
# Upload to PyPI
|
|
231
|
+
twine upload dist/*
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Requirements
|
|
235
|
+
|
|
236
|
+
- **Python 3.10+**
|
|
237
|
+
- **macOS** (for OmniPlan AppleScript bridge)
|
|
238
|
+
- **OmniPlan** (only for `.mpp` files; optional for `.oplx`)
|
|
239
|
+
|
|
240
|
+
## Limitations
|
|
241
|
+
|
|
242
|
+
- `.mpp` parsing requires OmniPlan to be installed
|
|
243
|
+
- Only supports macOS (AppleScript dependency)
|
|
244
|
+
- Does not modify `.mpp` files — read-only
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
MIT License — see [LICENSE](LICENSE) for details.
|
|
249
|
+
|
|
250
|
+
## Related
|
|
251
|
+
|
|
252
|
+
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
253
|
+
- [OmniPlan](https://www.omnigroup.com/omniplan/)
|
|
254
|
+
- [Claude Code MCP Servers](https://docs.anthropic.com/en/docs/claude-code/mcp-servers)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "omniplan-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server for reading OmniPlan (.oplx) and Microsoft Project (.mpp) schedule files"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Cygnus Yang" }
|
|
13
|
+
]
|
|
14
|
+
keywords = ["mcp", "omniplan", "project-management", "microsoft-project", "schedule", "claude"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Office/Business :: Scheduling",
|
|
24
|
+
"Topic :: Software Development :: Build Tools",
|
|
25
|
+
]
|
|
26
|
+
requires-python = ">=3.10"
|
|
27
|
+
dependencies = [
|
|
28
|
+
"mcp>=1.0.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/cygnusyang/omniplan-mcp"
|
|
33
|
+
Repository = "https://github.com/cygnusyang/omniplan-mcp"
|
|
34
|
+
"Bug Tracker" = "https://github.com/cygnusyang/omniplan-mcp/issues"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
omniplan-mcp = "omniplan_mcp.__main__:main"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
OmniPlan MCP Server
|
|
4
|
+
|
|
5
|
+
A Model Context Protocol (MCP) server that reads and analyzes project schedule files
|
|
6
|
+
in OmniPlan (.oplx) and Microsoft Project (.mpp) formats.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Read .mpp files via OmniPlan AppleScript bridge
|
|
11
|
+
- Read .oplx files via direct XML parsing
|
|
12
|
+
- List milestones, resources, tasks
|
|
13
|
+
- Search tasks by keyword
|
|
14
|
+
- Project schedule summary with progress stats
|
|
15
|
+
|
|
16
|
+
## Usage (as CLI)
|
|
17
|
+
|
|
18
|
+
pip install -e .
|
|
19
|
+
omniplan-mcp
|
|
20
|
+
|
|
21
|
+
## Usage (as MCP server)
|
|
22
|
+
|
|
23
|
+
Add to Claude Code settings.json:
|
|
24
|
+
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"omniplan": {
|
|
27
|
+
"command": "uv",
|
|
28
|
+
"args": ["run", "--directory", "/path/to/omniplan-mcp", "omniplan-mcp"],
|
|
29
|
+
"env": {}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Entry point for the omniplan-mcp server.
|
|
3
|
+
|
|
4
|
+
Run directly:
|
|
5
|
+
python -m omniplan_mcp
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import asyncio
|
|
9
|
+
|
|
10
|
+
import mcp.server.stdio
|
|
11
|
+
from mcp.server import NotificationOptions
|
|
12
|
+
|
|
13
|
+
from . import __version__
|
|
14
|
+
from .server import server
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main():
|
|
18
|
+
"""Run the MCP server over stdio transport."""
|
|
19
|
+
asyncio.run(_run())
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
async def _run():
|
|
23
|
+
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
|
|
24
|
+
await server.run(
|
|
25
|
+
read_stream,
|
|
26
|
+
write_stream,
|
|
27
|
+
InitializationOptions(
|
|
28
|
+
server_name="omniplan-mcp",
|
|
29
|
+
server_version=__version__,
|
|
30
|
+
capabilities=server.get_capabilities(
|
|
31
|
+
notification_options=NotificationOptions(),
|
|
32
|
+
experimental_capabilities={},
|
|
33
|
+
),
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
main()
|