P6 MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Primavera P6 Professional database (standalone SQLite).
Name projects by Project ID (p6_list_projects) and activities by Activity ID.
Durations and float are in days of each activity's calendar.
Lag days use the project's lag calendar option (see lag_rule).
Dates and float come from the last P6 schedule run (F9); edits do not reschedule.
Writes take two calls: dry_run=true (default) returns the plan and a confirmation_token; after the user's explicit yes, repeat the call with dry_run=false and that token (and confirmation_text if asked). P6 must be closed. Then ask the user to press F9 in P6.
p6_diagnose explains configuration errors.
Planned dates are never written; new activities come from p6_add_activities or p6_import_xer.
List tools return {total, offset, returned, next_offset, rows}: pass offset=next_offset for the next page (null = last). Rows leave null values out (an absent key means null): detail='full' gives every key, fields= keeps the keys named.
Overview first: p6_project_summary.
Use p6_sql_select only when no other tool fits.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| p6_list_projectsA | Projects, one page: {total, offset, returned, next_offset, rows}. Row: Project ID, name, data date, planned start, scheduled finish, status (of the project WBS node), baseline_of, and the EPS node holding it: eps_id, eps_name, eps_path (EPS names from the top, joined with ' > '); all three None for a project outside every EPS node. EPS nodes are never listed; baselines only with include_baselines=True (baseline_of is set); exclude_templates=True leaves out the P6 template projects (status WS_Template, or no EPS node). eps= an EPS ID: the projects of that EPS node and of every EPS below it. order: 'project' (Project ID) or 'eps' (EPS tree order as p6_list_eps order='tree', then Project ID; projects outside every EPS node last). |
| p6_list_wbsA | WBS tree in P6 order (each node before its children), one page; also root (the start node; unplaced = activities outside the tree). Row: ids, depth (project node 0), wbs_code as P6 shows it ('PRJ.5.1'), names, children, and with rollups=True its whole subtree: activity counts by status, open (LOE and WBS summary left out), min_tf_d and negative_float of open activities, start and finish (actual, else early), budget_units and actual_units (labor plus nonlabor), units_pct (P6 Units % Complete) and bl_planned_pct (baseline planned units at the data date / baseline budget units x 100, matched by Activity ID, linear between planned dates as p6_progress_curve; None without a baseline, data date or units). baseline= a Project ID (default the project baseline; the result names it). parent= starts at that WBS code, full or relative ('5.1'); max_depth counts levels below it. |
| p6_query_activitiesA | Search activities, one page {total, offset, returned, next_offset, rows} ordered by start (actual, else early) then Activity ID. Dates YYYY-MM-DD (finish_before includes that day). wbs_name_contains matches the name of the activity's own WBS node only (a whole branch: p6_list_wbs or a code filter). Durations and float in days of each activity's calendar. code_type (activity code type name, e.g. 'Discipline'; the project's own type wins over an EPS or global one) keeps activities with a code of that type; code_value narrows it by path ('CON.MEC'), short name ('MEC': every match) or name, with child codes unless include_child_codes=False; code_filter tells what matched. fields= keeps task_code plus the fields named, for smaller pages. udf_filter: UDF conditions (labels as p6_list_udfs shows them), all to hold; a date alone covers the whole day; udf_filter (info) tells what was used. udfs: labels added to each row as udfs {label: value} (None when empty; kept whole in brief rows). |
| p6_get_activityA | Full detail of one activity: the list fields (see p6_query_activities), secondary constraint, remaining, expected, suspend and resume dates, calendar (hours_per_day converts hours to days), WBS (wbs_code as in p6_list_wbs, wbs_path names), predecessors and successors (first 50 of each, with predecessor_count / successor_count; page further with p6_get_relationships), assignments (resource and role, quantities and costs as stored), activity codes, UDFs and notebooks (first 50 of each), lag_rule and schedule_state. Brief (default): no null values in the activity and its list rows, and the links without direction (the list says it) and without other_project when it is this project. Link lags in days (lag_d); explain=True adds lag_h (hours). |
| p6_get_relationshipsA | Relationships of an activity, one page: {total, offset, returned, next_offset, rows, lag_rule}. direction: pred, succ or both. Lag in days (lag_d; explain=True adds lag_h in hours); lag_rule tells which calendar converts lag days (project schedule option, predecessor calendar by default). fields= keeps task_pred_id and the keys named. |
| p6_critical_pathA | Critical activities of the last F9, one page; also definition, mode_used, threshold_d (the project's total float threshold in project calendar days; explain=True adds threshold_h), counts, schedule_state, note. mode: project (default: the project setting, total float <= its threshold or longest path), total_float (that threshold) or longest_path (P6's driving path flag). float_threshold_days forces total float <= that; min_float_days keeps total float > that (neither with longest_path): min_float_days=0 with float_threshold_days=10 lists the near critical activities. LOE and WBS summary are left out (even when P6 flags them), completed ones unless include_completed=True. Order: total float then start, or float path order. counts (open activities, every page): open, total_float, longest_path, negative_float, excluded_summary (LOE and WBS summary meeting the definition, not listed). fields= as in p6_query_activities. |
| p6_health_checkA | DCMA 14 point assessment of the last F9: checks (the names check= takes; critical_path_test runs this server's CPM engine, not when it does not match the F9), each {count, denominator, pct, threshold, pass (None = not evaluated), sample}; key_dates and logic_density (not scored). Open = not completed; LOE and WBS summary left out. Thresholds: the project's Check Schedule settings, else DCMA defaults; thresholds= overrides by check, high_float_days the high float limit. missed_tasks and bei need a baseline (baseline=, else the project baseline); baseline_dates 'current' (actual, else early finish) or 'planned'. duration_basis (high_duration): remaining or original. Also summary, score, weighted_score (grade A to F). check= returns one check's items as a page instead of the report. A full run saves a snapshot (save_snapshot=False skips it); compare_with 'latest', 'previous' or a snapshot id adds compare ({error} when it cannot be made, e.g. no earlier snapshot): totals, checks (counts, pass, items entered and left), changed, weighted_score, warnings, snapshots. explain=True adds every definition. |
| p6_lookaheadA | Look-ahead of a project, one page; also window, weeks, data_date, counts (categories and critical, all pages), critical_definition. The window starts at the data date (or from_date; a date alone at 00:00) and lasts days= (default 14) or weeks=, half-open [from, to). Listed: not started activities starting in it or spanning it, open ones finishing in it, every in-progress one (include_in_progress=False keeps those finishing in it) and, with include_completed=True, completed ones whose actual dates overlap it. Open activities use remaining dates (early when empty); LOE and WBS summary left out. Row: window (categories met), critical (open and critical under the project definition), fcst_start / fcst_finish (actual, else remaining), start_week / finish_week (week of the window, 1 = first 7 days; None outside). critical_only=True keeps the critical ones. wbs_name_contains and code filters as in p6_query_activities. Order: start, finish, Activity ID. |
| p6_project_summaryA | One-call overview of a project: project (name, calendar); dates (data date, planned start, must finish by, scheduled finish, last F9, activity span; finish minus must finish in calendar and working days); activities (by status and type, open); relationships (internal, to and from other projects); critical (open counts as p6_critical_path, threshold_d); percent_complete (primary = units: actual / at completion labor and nonlabor units, P6 Units % Complete; physical weighted by budget units, duration, activities, units_vs_physical_mismatch); baseline (baseline= else the project baseline; finish variance = finish minus the baseline's, calendar and working days; planned units % at the data date, spi_units = earned / baseline planned units, as p6_progress_curve); cost (P6 earned value at the data date: BAC, PV, EV, AC, CV, SV, CPI, SPI, ETC, EAC by eac_method plus eac_variants, VAC, TCPI, by_source; null without costs, PV, SV, SPI without a baseline); counts. Working days: project calendar. explain=True adds threshold_h. |
| p6_float_analysisA | Total and free float distribution of the open activities (not completed, LOE and WBS summary left out) of the last F9, in days of each activity's calendar. Buckets from edges_days (default -20, -10, -5, 0, 5, 10, 20, 44; 0 is always added): below the first edge, [a, b) below zero, exactly 0, (a, b] above zero, above the last edge, so every value falls in exactly one bucket (compared in hours, never rounded). Each bucket: total_float and free_float counts, their % of the activities, and samples (the limit lowest floats, default 5, from offset). no_value counts activities without a float; all_ranges_covered checks that bucket counts plus no_value equal the activities. stats: min, max, mean and median in days, total floats that are not whole days, negative, zero, critical (project definition). include_milestones=False leaves milestones out; wbs_name_contains and code_type / code_value / include_child_codes filter as in p6_query_activities (code_filter in the result, as there). |
| p6_diagnoseA | Start here when a tool reports a configuration problem. Shows the server settings in force (database, tool profile, writes allowed, restart needed), the P6 schema and version detected, whether P6 is running, the backup and edit log folders, the network cache of the CPM engine (engine_cache: on or off, projects kept, hits and misses) and data_source (the source in use, the saved choice, and since when this server process was switched with p6_use_database). Works without a database. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| lookahead-brief | Short look-ahead of a P6 project: activities in progress, starting and finishing in the next weeks, critical ones first, by week of the window, with fixed follow-up actions. Use when the user asks what is coming up, for a look-ahead or for a short-term plan. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Each tool targets a distinct reporting need: listing projects/WBS, querying and fetching activities, relationships, critical path, DCMA health check, look-ahead, project summary and float distribution are clearly different outputs. The only mild overlaps are p6_project_summary and p6_health_check aggregating figures that p6_critical_path and p6_float_analysis also report, plus both criticality tools touching negative float, but the descriptions make the boundaries workable.
All names share a consistent p6_ prefix, but the rest mixes conventions: verb_noun forms (list_projects, query_activities, get_activity, get_relationships) sit beside bare noun phrases (critical_path, health_check, lookahead, project_summary, float_analysis) and a lone verb (diagnose). It is still readable, but an agent cannot infer the action from the name alone for half the set.
Eleven tools is comfortably within a well-scoped range, and each one covers a distinct analytical view (structure, search, detail, logic, criticality, quality, time-phased, roll-up, float, diagnostics). No tool feels redundant or like padding.
For a read-only P6 analysis server the surface is broad, but there are real gaps: descriptions repeatedly reference p6_list_eps and p6_list_udfs, which are not part of the tool set, so an agent cannot resolve EPS IDs or UDF labels through a dedicated call. There is also no resource/role or baseline-listing tool, leaving some discovery paths as dead ends unless data is embedded in other responses.