MCP for Primavera P6
io.github.nizarhamza由 GitHub 帳號 nizarhamza 發布v2.0.0更新於 Nov 5, 2026
Primavera P6 MCP server: critical path, DCMA checks, what-if and safe write-back to the P6 database
概覽
本機 Windows MCP 伺服器,讓助理讀取、分析並可選擇修改 Oracle Primavera P6 Professional 排程與 XER 檔案。
- 可以做什麼
- 瀏覽專案、EPS、WBS、行事曆、UDF 與排程選項
- 搜尋活動、檢視單一活動詳情、邏輯關係、前瞻視窗與里程碑
- 計算要徑、驅動路徑、浮時路徑、浮時來源與浮時分布
- 執行 DCMA 14 項健康檢查、懸空端點、多餘連結與進度順序異常檢查
- 比較更新或基準、審查更新完整性,並在記憶體中執行 CPM 假設分析與蒙地卡羅風險
- 產生 S 曲線、資源與成本彙總、分組彙總與 Excel 儀表板;檢視、匯入與匯出 XER 檔案
- 適用情境
- 適合規劃工程師與專案控制人員用自然語言詢問 P6 排程問題,並取得由排程資料計算出的答案,而非模型猜測。適用於排程品質稽核、每週更新審查、基準差異、延誤假設分析與風險分析,也可在未安裝 P6 的情況下單獨分析 XER 檔案。
- 執行需求
- Windows 10 或 11,並安裝 Oracle Primavera P6 Professional;已內建 Python。透過 Windows 安裝程式、可攜式 zip 或 .mcpb 套件安裝,接著在設定程式中選定 P6 資料庫(建議清單來自 P6 本身的連線清單)。僅 XER 模式不需要 P6 資料庫。支援 P6 Professional 單機版(SQLite)與 XER 檔案;不支援 P6 EPPM 以及執行於 SQL Server 或 Oracle 上的 P6。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP for Primavera P6,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[Latest release] [License: Apache 2.0] [Windows 10 and 11] [M8ven Score] [MCP for Primavera P6 MCP server]
MCP for Primavera P6: Primavera P6 MCP Server
MCP for Primavera P6 is a local Model Context Protocol (MCP) server that connects Claude, ChatGPT, Cursor, VS Code and any other MCP client to your Oracle Primavera P6 Professional schedules on Windows. It reads the P6 database itself (P6 Professional standalone, SQLite) or plain XER files and answers scheduling questions with real computations: critical path and driving path, total float, the DCMA 14-point check, look-ahead, baseline and update comparison, CPM what-if and Monte Carlo schedule risk. Unlike XER-only MCP servers, it can also write changes back to the P6 database: durations, logic, constraints, actuals, units and UDFs, each one previewed in a dry run, applied only after your confirmation, backed up first and recorded in an edit log.
MCP for Primavera P6 is an independent project. It is not affiliated with, endorsed or sponsored by Oracle. Oracle, Primavera and P6 are trademarks of Oracle and/or its affiliates.
Contents: What it does · Install · Connect your MCP client · Tools · Compared with XER-only servers · Safety · Privacy · P6 skills · FAQ · Troubleshooting
What it does
Ask your assistant "what drives the finish date?", "run a DCMA health check on the March update", "what changed since the last update?" or "what happens if procurement takes four more weeks?". The server computes the answer from the schedule; the model explains it. Dates and float come from P6's last schedule run (F9).
- Schedule analysis: projects and EPS, WBS roll-ups, activities filtered by status, float, dates, activity codes or UDFs, relationships with the project's lag calendar rule, critical path (total float or longest path), driving path, float paths, where an activity's float comes from, float distribution, look-ahead windows.
- Schedule quality: DCMA 14-point check with the project's own P6 thresholds, logic density and a weighted grade, comparison with earlier checks, out-of-sequence progress, dangling ends, redundant links.
- Comparisons, what-if and risk: two updates or a baseline compared activity by activity and link by link,
with slip causes and float erosion; an integrity review of an update against the previous one (questions to
raise, not proof); a CPM engine checked against P6's F9 (
p6_cpm_validatereports the match) for what-if scenarios and Monte Carlo risk, run in memory and never written. - Progress and reporting: S-curves and earned value at the data date, resource and cost summaries, groups by status, WBS or code, and a one-page Excel dashboard with native charts.
- XER files: inspect, import (new project, baseline, update), export, or analyse XER files alone in XER-only mode, without a P6 database or P6 installed.
- Edits (off by default): durations, constraints, actual dates, physical % complete, resource assignment units, activity UDF values, relationships, schedule options, EPS, deletes, backups and restore.
Install
MCP for Primavera P6 runs on Windows 10 or 11, next to P6 Professional. Nothing else to install: Python is bundled.
- Download
P6MCP-Setup-<version>.exefrom Releases and check it againstSHA256SUMS.txt(certutil -hashfile P6MCP-Setup-2.0.0.exe SHA256). - Run it. It installs for your Windows user only (no administrator rights) and, on its last page, offers to register the server with every MCP client it finds (Claude Desktop, Claude Code, Cursor, VS Code, LM Studio, Cline). Untick the ones you do not want.
- MCP for Primavera P6 Settings opens. Under Database, pick your P6 database (suggestions come from P6's own connection list), click Test connection (read only), then Use this database, and Save. The server never picks a database by itself: until you do this, every tool answers "No database configured".
- Restart your MCP client completely.
Release builds are not code signed yet: Windows SmartScreen may warn on first launch ("More info", "Run anyway").
Check the SHA-256 first. Other packages on the release page: a portable zip (no installation) and an
MCP bundle (.mcpb, server only) that Claude Desktop installs in one click; it is also the package listed in
the official MCP Registry as
io.github.nizarhamza/p6-mcp.
Connect your MCP client
The installer and Settings > MCP clients write the client configuration for you: they add (or repair, or
remove) only the p6mcp entry, after a timestamped backup, keeping every other entry, comment and the file's
formatting. The manual steps below are for reference. In every snippet, replace <you> with your Windows user
name (or copy the snippet from Settings > MCP clients > Other clients, which fills in the real path).
Claude Desktop
Either let the installer register it, or double-click the .mcpb bundle (Settings > Extensions shows it; pick
the database there), or edit %APPDATA%\Claude\claude_desktop_config.json:
Quit Claude Desktop completely (also from the notification area) and start it again. The P6 skills appear as prompts in the + menu.
Cursor
The installer registers it in %USERPROFILE%\.cursor\mcp.json, or add the same mcpServers entry as Claude
Desktop above to that file. Cursor lists the tools under Settings > MCP.
VS Code (GitHub Copilot agent mode)
The installer registers it in %APPDATA%\Code\User\mcp.json (VS Code Insiders: ...\Code - Insiders\User\mcp.json).
By hand, run MCP: Open User Configuration and add:
Then open Copilot Chat in Agent mode and pick the tools from the tools menu.
ChatGPT
ChatGPT cannot start a program on your PC, so there are two routes. Neither is tested by the maintainer yet: please report how it goes in an issue.
-
Codex (in the ChatGPT desktop app, or the Codex CLI) starts local MCP servers from
%USERPROFILE%\.codex\config.toml: -
ChatGPT chat reaches MCP servers over HTTPS only. OpenAI's Secure MCP Tunnel runs a small client on your PC that starts the server (stdio command above) and forwards ChatGPT's requests to it, without opening an inbound port; you then add a custom MCP server in ChatGPT with Tunnel as the connection. It needs an OpenAI platform API key and a ChatGPT plan or workspace that allows custom MCP servers. The tool results then pass through OpenAI's service, like any ChatGPT conversation.
Claude Code, LM Studio, Cline and other clients
The installer registers Claude Code (%USERPROFILE%\.claude.json), LM Studio (%USERPROFILE%\.lmstudio\mcp.json)
and Cline as well. For Claude Code by hand:
Any other client that starts stdio servers takes the mcpServers snippet above. Clients that need HTTP can use
the local HTTP transport. From the command line (the installer uses the same commands):
Tools
58 tools: 37 read-only (11 of them in the Basic profile), 2 that write a file, 18 write tools (off by default; a dry run, then your confirmation; a backup first) and 1 that changes the app's own settings. Generated from the code by tools/gen_docs.py.
Projects and structure
Activities and relationships
Critical path and float
Schedule quality
Progress and reporting
Comparison, what-if and risk
XER files
Edits (off by default)
Backups, log and diagnostics
Skill shop
Compared with XER-only MCP servers
Several MCP servers read Primavera P6 XER files; some can also edit an XER and export a new one to import back into P6. MCP for Primavera P6 works on the P6 Professional database itself, and reads XER files too.
"Varies" means some XER servers do it and others do not: check the one you are looking at.
Safety
- Tool profiles: Basic (11 read-only tools, suited to small local models) or Full (all 58).
- Writes are off by default. With the Full profile and "Allow write operations", every write takes two calls: a dry run that shows the plan and returns a single-use confirmation token, then, after your explicit yes, the same call with that token. Deleting a project or an activity and restoring a backup also need a confirmation text. If the database changed in between, the write is refused.
- A backup is taken before every write (with a retention you choose), writes are refused while P6 is running, and every write goes to the edit log with its parameters.
- Writes are refused on a P6 schema version the server was not tested with, unless you trust it explicitly.
- These rules are enforced by the server itself on every call, not only by the Settings window.
Writes go straight to the database and bypass P6's own application logic. The server updates the audit
fields (update_date, update_user, create_*) the way P6 does and never writes planned, early or late dates
or float: close P6 before writing, then open it and press F9. See SECURITY.md for the list of
what the write tools can change.
Privacy
The server runs only on your PC: no cloud component, no telemetry. Its only network requests go to GitHub: the updates (releases of this repository), which you can turn off under Logs and updates, and the skill shop (reads of its public catalog when you open the Skill shop page or ask for it, at the first start of the Settings app for the core set, on Restore core skills, and with automatic updates on for newer skill versions), which you can turn off under Tools and safety (the core set then comes from the copy shipped with the app).
The data returned by the tools goes to the AI model your MCP client uses, which may be a cloud service. For confidential schedules, use a local model (for example in LM Studio).
P6 skills
P6 skills are ready-made workflows that chain the tools into one fixed report: weekly update review, schedule quality audit, safe update import, update integrity audit, schedule risk, delay what-if, baseline variance, Excel dashboard and more. They all come from the skill shop. At its first start the Settings app installs the core set from the shop (when GitHub cannot be reached, from the copy of the core set shipped with the app, updated from the shop later). Restore core skills (Skills or Skill shop page) installs the core set again: missing skills come back and edited ones get the shop's version. With automatic updates on (Logs and updates), the tray app also installs newer shop versions of your shop skills, except the ones you edited here: those show Update available on the Skill shop page, and Update asks before replacing your changes.
Most skills need the Full tool profile (the import also needs writes). MCP clients > Install skills writes
each one as an Agent Skills folder p6-<name> (a SKILL.md and its reference files);
the client's AI uses a skill when your request matches its description, and Claude Code also runs it as
/p6-<name>:
Update skills refreshes them after an update or a change of the tool settings; Remove skills (and uninstalling) deletes only the files the app wrote. From the command line:
The server also offers them as MCP prompts: Claude Desktop lists them in the + menu, VS Code as
/mcp.p6mcp.<name>, Claude Code as /mcp__p6mcp__<name>. Claude Desktop has no skills folder: export a skill as
a zip file (Skills > Export) and upload it in Claude Desktop's settings to add it as a skill.
The Skills page of the Settings app lists them with whether the current tool settings offer them and where
they come from (Shop, Shop edited here, Yours). Turn a skill off, edit it, or add your own (New, or Copy to
my skills to start from a shop skill): a name, a title, a description that says what it does and when to use it
(clients pick a skill by it), inputs written as {input} in the instructions, the P6 tools to use, and up to 5
text reference files (checklists, thresholds, examples; never scripts). The P6 rules are appended to your
instructions. The Instructions page shows the instructions every client receives when it connects; turn
built-in lines off (the two-step write rule stays on) or add your own, such as "When you show an activity, write
it as Activity ID - Activity name". Click Save, then Update skills on the MCP clients page, and restart the MCP
client for the prompts.
Skill shop
The Skill shop page lists the P6 skills of the public catalog
nizarhamza/p6-mcp-shop: the core set maintained with the app and the
skills other users shared. Reading it needs no account; the app reads it only when you open the page or ask your
AI client (tools p6_shop_search, p6_shop_get and p6_shop_install, Full profile; an install shows the whole
skill first and needs your confirmation). Read a skill before installing it: it is instructions for the AI, and a
skill that uses write tools can change your schedule once you confirm the change. Turn the shop off under
Tools and safety.
To share one of your skills, select it on the Skills page and click Share on GitHub: the app copies the skill
to the clipboard and your browser opens the GitHub share form; sign in if asked (a free GitHub account is needed),
paste the skill in the Skill field and click Create (nothing is sent by the app itself). The maintainer reviews
it and, once approved, a GitHub Action checks it and publishes it in the catalog under the Apache-2.0 license.
Without a GitHub account, Export the skill to a zip file and send it; Import adds a zip (or any skill
folder with a SKILL.md and text files) after you review it.
Local HTTP transport
By default each client starts its own server (stdio). Under Server you can switch to a local HTTP server, hosted by the notification area app, for clients that need HTTP or to share one server:
- listens on
127.0.0.1only (http://127.0.0.1:<port>/mcp), with a port check; - every request needs
Authorization: Bearer <token>; the token lives in the Windows Credential Manager (shown masked, copy, regenerate); - Host and Origin headers are checked to block DNS rebinding.
Excel dashboard
Ask for example "export the dashboard of DEMO-A to D:\Reports\DEMO-A.xlsx" (Full profile). The template is built
into the server: p6_export_dashboard reads the last F9 and writes a finished workbook (values and native Excel
charts, no formulas), so press F9 in P6 first. An existing file is replaced only when you say so (overwrite).
Options: baseline (default the project baseline), baseline_dates (planned or current), milestones
(Activity IDs), near_critical_days (10: Delayed beyond it, At risk up to it), period (month or week),
prepared_by, revision, and for this export only company (shown in the sidebar) and colors
("primary,accent" in hex). Slip and variance are in working days, as P6 variance columns.
XER-only mode
Under Database > Data source, choose XER files only, add one or more XER files and click Load and
check. The files are read into a private read-only copy; every read tool works on it. Load two updates of the
same schedule to compare them: a Project ID already used by the first file gets a ~2 suffix.
FAQ
What is an MCP server for Primavera P6? MCP (Model Context Protocol) is the open standard AI assistants use to call tools. This server gives an assistant 58 tools that read and analyse Primavera P6 schedules, so you can ask questions in plain language and get answers computed from the schedule rather than guessed by the model.
Can the AI change my schedule? Only if you allow it. Writes are off by default; when on, each one is previewed in a dry run and applied only with a single-use token after your explicit yes, a backup is taken first, and P6 must be closed. Planned dates and float are never written: P6 computes them when you press F9.
Does my schedule leave my PC? The server runs locally and sends nothing anywhere. What the tools return goes to the AI model of your MCP client; with a cloud model that means its provider. For confidential projects use a local model, for example in LM Studio.
Which P6 versions and databases are supported? P6 Professional standalone (SQLite), tested with 25.12; other versions are read only until tested or trusted. XER files from P6 Professional 24.12 and from the server's own export. P6 EPPM and P6 Professional on SQL Server or Oracle are not supported.
Do I need P6 installed? Not for XER files: XER-only mode analyses them without P6 or a P6 database.
How does the DCMA 14-point check work?
p6_health_check runs the 14 DCMA checks on the last F9, with the thresholds set in P6's schedule check settings
for the project when they exist, else the DCMA defaults. The critical path test delays an activity in the
server's CPM engine and runs only when that engine matches P6's dates. See the
DCMA 14-point check guide.
Are the dates computed by the AI?
No. Dates and float come from P6's last schedule run. What-if and risk use the server's CPM engine, and
p6_cpm_validate shows how closely it matches P6's own dates on your project before you rely on it.
Which AI clients work? Claude Desktop, Claude Code, Cursor, VS Code, LM Studio and Cline are registered automatically; any MCP client that starts stdio servers or speaks Streamable HTTP works too. ChatGPT works through Codex or OpenAI's Secure MCP Tunnel (see ChatGPT).
Does it run on macOS or Linux? No. P6 Professional is a Windows program and the server is built for Windows 10 and 11.
Is it free? Yes, under the Apache License 2.0.
Tested versions
Troubleshooting
- "No database configured": open MCP for Primavera P6 Settings, select a database, Test connection, Use this database, Save.
- A tool is "not available in the Basic profile": switch to Full under Tools and safety, Save, restart the client.
- The client does not show the tools: restart it completely (also from the notification area), then check
MCP clients: the entry may need Repair. Ask the assistant to run
p6_diagnose. - "P6 (PM.exe) is running": close P6 before a write.
- "Unknown P6 schema": your P6 version was not tested; reads work. You can trust the schema under Database (after a backup).
- HTTP server error: Server shows the last error (often a port in use: pick another one).
- Logs: Logs and updates > Open log folder (
%LOCALAPPDATA%\P6MCP\logs). Settings live in%APPDATA%\P6MCP\config.json; backups, edit log and XER copies in%LOCALAPPDATA%\P6MCP.
Versions 1.x were called P6 MCP: the install folder, the program names and the settings folders keep that name, so updates and client registrations carry over.
Uninstall
Windows Settings > Apps > MCP for Primavera P6. The uninstaller removes the program, the p6mcp entries from your
MCP clients and the startup entry. Your settings, backups and logs are kept.
Development
Tests run on a synthetic P6 database and synthetic XER files built by the tests (tests/fixtures/make_db.py).
Never commit a real schedule, database, XER file or log. Building the installer and releasing:
docs/RELEASING.md. The landing site in site/ is generated from
site-src/pages by tools/build_site.py (a test fails when the two are out of step): edit the
sources, never the generated pages.
To contribute, start with an issue: see CONTRIBUTING.md and the code of conduct. Accessibility: ACCESSIBILITY.md.
License
Apache License 2.0. Copyright 2026 Nizar Hamza. See NOTICE.
Primavera and P6 are trademarks of Oracle. This project is not affiliated with or endorsed by Oracle.
來源:README.md,提交 6b0616b
工具
0版本歷史
1- v2.0.0最新Oct 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分