MCP for Primavera P6

Find the driving path in Primavera P6 with Claude

Ask Claude what drives an activity and get the chain of driving predecessors back to its root cause, computed from P6's own dates, then see where the total float comes from and test a change.

Tools: p6_driving_path, p6_float_origin, p6_float_paths, p6_schedule_whatif · Profile: Full

Why it is slow in P6

P6 flags driving relationships and can show the longest path, but answering "why is this milestone on that date?" still means tracing predecessors level by level with Trace Logic, checking each link's lag on the right calendar, and noticing when an SS or FF link, a constraint or an actual date takes over. On a path of twenty activities that is half an hour of clicking, and easy to get wrong.

What the server computes

p6_driving_path works backward from the target on the early dates of the last F9. A link drives when its gap is zero (within 5 minutes): the predecessor's date plus the lag, counted on the calendar your project's lag option names, reaches the successor's date. It follows every driving predecessor, level by level, and stops at the root of each chain, with its type:

  • data date: an in-progress or open activity whose remaining work starts at the data date;
  • constraint: an early constraint (start on or after, and the like) sets the date;
  • actual date or completed predecessor: progress already recorded;
  • open start: no predecessor drives it, the logic is missing;
  • unexplained: nothing in the network explains the date; worth a look in P6.

Ask for the driving path

What drives MS-1100 - Project completion in DEMO-SS225? Show the driving path root first, with dates and total float.

The assistant calls p6_driving_path(project="DEMO-SS225", target="MS-1100"). On the demo project the path has 24 activities over 17 levels. An excerpt, root first:

DEMO-SS225, synthetic data, data date 26 Oct 2026. Every row has a total float of -36 days.
ActivityEarly startEarly finishDrives through
PRC-TR-1040 - Power transformers 225/63 kV - manufacturing26 Oct 20262 Apr 2027FS (root: data date)
PRC-TR-1050 - Power transformers 225/63 kV - factory acceptance test5 Apr 20279 Apr 2027FS
PRC-TR-1060 - Power transformers 225/63 kV - shipping and delivery to site12 Apr 20271 Jun 2027FS
MS-1040 - Power transformers delivered to site1 Jun 20271 Jun 2027FS
CON-HV-1040 - Power transformer TR1 installation and oil filling2 Jun 202729 Jun 2027SS 10 d
CON-HV-1050 - Power transformer TR2 installation and oil filling16 Jun 202713 Jul 2027FS
COM-ENR-1050 - Trial operation1 Sep 202728 Sep 2027FS
MS-1100 - Project completion5 Oct 20275 Oct 2027target

The answer to "why 5 October 2027?" is therefore the transformer manufacturing still in progress: its remaining work starts at the data date and nothing earlier in the network can pull the chain forward. Note the SS 10 d link between the two transformer installations: a lag that a manual trace can easily read on the wrong calendar.

Useful variations:

  • "Trace only 5 levels" sets max_depth=5.
  • "Include completed activities" adds the completed part of the path, which P6 also places under retained logic.
  • "Is the driving path the same as P6's float path 1?" compares with p6_float_paths, when the project was scheduled with multiple float paths.

Where the float comes from

The driving path explains the early dates. The total float comes from the late dates, which are set by the successors and finally by a constraint or the project's must finish by date.

Why does MS-1100 - Project completion have -36 days of total float?

p6_float_origin(project="DEMO-SS225", task_code="MS-1100") answers that the float comes from the project must finish by date, 16 August 2027: the late finish is pinned there while the early finish is 5 October 2027, 36 working days later. For an activity in the middle of the network, it walks forward along the successor links that set its late dates and names the source: a constraint, the must finish by date, or an open end.

Negative float with no constraint in sight

When the source is the must finish by date, removing a constraint on an activity will not help: only a shorter driving path, or a later must finish by date agreed with the client, changes it. That distinction matters in a delay discussion.

Test a change on the driver

What if PRC-TR-1040 - Power transformers manufacturing finishes 15 working days earlier? Show the new project finish and the milestones that move.

p6_schedule_whatif applies the change in memory, runs the server's CPM engine and compares the result with P6's last F9: project finish before and after, milestones, and the activities that become or stop being critical. Nothing is written to the database. Before relying on it, p6_cpm_validate shows how closely the engine reproduces P6's dates on your project.

Setup in Claude

  1. Install the server: the installer registers it with Claude Desktop and Claude Code (install steps).
  2. In the Settings window, choose the Full tool profile: the driving path and float origin tools are not in the Basic set.
  3. Press F9 in P6, then restart Claude and ask the questions above with your own Project ID and Activity IDs.

The same prompts work in Cursor, VS Code and any MCP client: the server does the tracing, the model writes the explanation.