P6-MCP
Primavera P6 MCP Server
A fully featured MCP server for Oracle Primavera P6. Point any MCP-compatible AI client at your XER files or a live P6 EPPM instance and start asking questions in plain language.
✨ Highlights
- 138 tools across one unified surface — the same tool works against both XER files and live P6 EPPM with no changes to your prompt
- Full XER parser — lossless read and write of Oracle Primavera XER format including all tables, CP1252 encoding, and calendar data
- DCMA 14-point schedule assessment — automated compliance check with pass/fail per metric and actionable findings
- Critical path & float analysis — forward/backward pass, driving path, near-critical activities, negative float detection
- Earned Value Management — CPI, SPI, EAC, TCPI, S-curves, and period performance from XER or live P6
- Resource utilization — histogram, leveling report, overallocation detection across all assignments
- Baseline comparison & schedule diff — compare any two XER snapshots or XER vs live P6 project
- Safe mutation by default — write-back tools are disabled until you set
P6MCP_ENABLE_MUTATION=true; all mutations requireconfirm=True - Three transports — stdio for desktop clients, Streamable HTTP and SSE for remote/Docker deployments
- Works with every major MCP client — Claude Desktop, Cursor, Windsurf, VS Code, Zed, Continue, OpenAI Agents SDK
🚀 60-Second Quickstart
Claude Desktop / Claude Code:
{
"mcpServers": {
"p6-mcp": {
"command": "uvx",
"args": ["p6-mcp", "serve", "--transport", "stdio"],
"env": {
"P6MCP_WORKSPACE_DIRS": "/path/to/your/xer/files"
}
}
}
}
Cursor / Windsurf / VS Code:
{
"mcp": {
"servers": {
"p6-mcp": {
"command": "uvx",
"args": ["p6-mcp", "serve", "--transport", "stdio"],
"env": { "P6MCP_WORKSPACE_DIRS": "/path/to/your/xer/files" }
}
}
}
}
Docker (HTTP transport):
docker run -p 8000:8000 -v /path/to/xer:/data ghcr.io/shamshirialireza/p6-mcp
CLI:
p6-mcp inspect schedule.xer # table inventory and project list
p6-mcp dcma schedule.xer # DCMA 14-point report
p6-mcp diff old.xer new.xer # compare two schedules
p6-mcp export schedule.xer --format xlsx --output report.xlsx
📦 Installation
# Recommended — no install needed, always latest
uvx p6-mcp
# pip
pip install p6-mcp
# With optional extras (Excel export, charts, HTTP transport)
pip install "p6-mcp[excel,charts,http]"
# Docker
docker pull ghcr.io/shamshirialireza/p6-mcp:latest
📊 Tool Groups
| Group | Tools |
|---|---|
| File & Workspace | list_xer_files, open_schedule, validate_xer, get_file_header, get_table_inventory, get_raw_table, clear_cache |
| Projects & EPS | get_projects, get_project_detail, get_project_codes, get_schedule_options, get_data_date |
| WBS | get_wbs, get_wbs_detail, get_wbs_rollup, get_wbs_budgets, get_wbs_notes, get_wbs_steps |
| Activities | get_activities, search_activities, get_activity_detail, get_milestones, get_constraints, get_udfs, get_expenses |
| Relationships | get_relationships, get_predecessors, get_successors, get_driving_path, analyze_logic_health |
| Critical Path | get_critical_path, get_near_critical, get_float_paths, get_negative_float, get_float_distribution, recompute_cpm |
| Schedule Quality | run_dcma_assessment, check_schedule_quality, get_schedule_health_score, get_invalid_dates, get_out_of_sequence |
| Progress | get_progress_summary, get_behind_schedule_activities, get_lookahead, get_activity_variances |
| Resources & Roles | get_resources, get_roles, get_resource_assignments, analyze_resource_utilization, get_resource_histogram |
| Cost & EVM | get_cost_summary, get_cash_flow, get_earned_value, get_earned_value_curve, get_past_period_actuals |
| Calendars | get_calendars, get_calendar_detail, calendar_working_days_between, is_working_day, compare_calendars |
| Baselines | get_baselines, compare_to_baseline, diff_schedules, get_schedule_trend |
| Export | export_data, export_workbook, export_gantt_mermaid, export_network_dot, export_ics_milestones |
| Mutation | update_activity, add/remove_relationship, add/delete_activity, assign_resource, write_xer (opt-in) |
| Live P6 EPPM | p6_list_connections, p6_open_project, p6_run_schedule_job, p6_apply_actuals, p6_create_baseline, +14 more |
| Meta | list_capabilities, explain_field, get_enum_values |
🔌 Backend Support
| Capability | XER Files | Live P6 EPPM |
|---|---|---|
| Read schedule data | ✅ | ✅ |
| Critical path & float | ✅ | ✅ |
| DCMA 14-point assessment | ✅ | ✅ |
| Earned value & cost | ✅ | ✅ |
| Resource utilization | ✅ | ✅ |
| Baseline comparison | ✅ | ✅ |
| Export (xlsx, csv, Gantt) | ✅ | ✅ |
| Write back / mutate | ✅ | ✅ |
| Schedule & level jobs | ❌ | ✅ |
| Apply actuals | ❌ | ✅ |
| Store period performance | ❌ | ✅ |
⚙️ Configuration
| Environment Variable | Default | Description |
|---|---|---|
P6MCP_WORKSPACE_DIRS |
— | Colon-separated directories containing XER files |
P6MCP_OUTPUT_DIR |
/tmp/p6mcp_output |
Where exports and reports are written |
P6MCP_ENABLE_MUTATION |
false |
Enable write-back tools |
P6MCP_AUTH_TOKEN |
— | Bearer token for HTTP transport |
P6MCP_CACHE_SIZE |
10 |
Number of schedules to keep in memory |
P6MCP_LOG_JSON |
false |
Emit structured JSON logs |
See .env.example for a full template including P6 EPPM connection setup.
🔒 Security
- XER file access restricted to
P6MCP_WORKSPACE_DIRS— path traversal blocked - Mutation disabled by default; requires
P6MCP_ENABLE_MUTATION=trueplusconfirm=Trueper call - HTTP transport supports bearer token auth via
P6MCP_AUTH_TOKEN - P6 EPPM credentials never logged
📄 License
MIT © Alireza Shamshiri
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 p6_mcp-1.0.2.tar.gz.
File metadata
- Download URL: p6_mcp-1.0.2.tar.gz
- Upload date:
- Size: 348.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1f0deca8966116865b217a3ec8257544c95af9d2e456606221555a93eea18e
|
|
| MD5 |
86654f7114094aec938df7bed3d36fdf
|
|
| BLAKE2b-256 |
05c7bcbe04b8ce83470e1d0e2a11d48518fe923d12e02be73a6cddd267cc593f
|
Provenance
The following attestation bundles were made for p6_mcp-1.0.2.tar.gz:
Publisher:
release.yml on shamshirialireza/P6-MCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p6_mcp-1.0.2.tar.gz -
Subject digest:
bc1f0deca8966116865b217a3ec8257544c95af9d2e456606221555a93eea18e - Sigstore transparency entry: 2837557854
- Sigstore integration time:
-
Permalink:
shamshirialireza/P6-MCP@d9ac5c94bd59cbc90f399ac979b6e80f02e1b98c -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/shamshirialireza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9ac5c94bd59cbc90f399ac979b6e80f02e1b98c -
Trigger Event:
push
-
Statement type:
File details
Details for the file p6_mcp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: p6_mcp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 200.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7254cde3a3c5d046bb5a1bf202a478f26a8d331d61a2cd0f4f870b631ea2809
|
|
| MD5 |
7d4dafc2341ac0b6dcca11dba6374ed5
|
|
| BLAKE2b-256 |
4ec6d4872bbdb7f7a7cb294fc6c85486185e44bd9bd5ba38b0e8b5870121ef79
|
Provenance
The following attestation bundles were made for p6_mcp-1.0.2-py3-none-any.whl:
Publisher:
release.yml on shamshirialireza/P6-MCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p6_mcp-1.0.2-py3-none-any.whl -
Subject digest:
b7254cde3a3c5d046bb5a1bf202a478f26a8d331d61a2cd0f4f870b631ea2809 - Sigstore transparency entry: 2837558017
- Sigstore integration time:
-
Permalink:
shamshirialireza/P6-MCP@d9ac5c94bd59cbc90f399ac979b6e80f02e1b98c -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/shamshirialireza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9ac5c94bd59cbc90f399ac979b6e80f02e1b98c -
Trigger Event:
push
-
Statement type: