Skip to main content
Glama

P6AI

AI driven Primavera P6 Professional (standalone SQLite) schedule building tool.

👥 For civil engineering friends unfamiliar with the software: see Guide for civil engineering friends

P6AI takes structured construction schedule JSON, first performs completeness / business / network (DAG) validation, and then writes the plan into the P6 Professional standalone edition's PPMDBSQLite.db in a single transaction, with automatic backup, automatic rollback, and automatic primary-key sequence alignment. After writing, open P6 and press F9 to complete the schedule calculation.

⚠️ Unofficial tool, not affiliated with Oracle. P6 Professional standalone edition (SQLite PMDB) only.


Features

  • Schedule validation: field completeness, WBS references, schedule validity, logic relationship types, circular dependency detection

  • Structure self-check: verify database tables / fields match the current P6 schema before writing, to prevent accidentally writing to an PPPM database

  • Safe writing: automatic backup + single transaction + full rollback on failure + NEXTKEY primary-key sequence alignment

  • Version adaptation: writes for the actual table structure of P6 Professional 23.12 standalone (including 22-character GUID and EPS hookup)

  • No third-party runtime dependencies (Python standard library only)

Related MCP server: project-mcp

Quick Start

# 1. 结构自检:确认目标库与本工具兼容
python -m p6ai check --db "C:\Users\<you>\Documents\PPMDBSQLite.db"

# 2. 校验计划 JSON(不写库)
python -m p6ai validate --plan plan.json

# 3. 写入 P6 数据库(自动备份)
python -m p6ai create --plan plan.json --db "C:\Users\<you>\Documents\PPMDBSQLite.db"

# 4. 打开 P6 Professional,打开新项目,按 F9 进度计算

Plan JSON Format

{
  "project_code": "PRJ-2026-001",
  "project_name": "某变电站土建及机电安装工程",
  "start_date": "2026-09-01 08:00:00",
  "calendar_name": "Corporate - Standard Full Time",
  "wbs_tree": [
    { "wbs_code": "WBS.1", "wbs_name": "土建工程", "parent": null },
    { "wbs_code": "WBS.1.1", "wbs_name": "桩基与地基处理", "parent": "WBS.1" }
  ],
  "tasks": [
    { "task_code": "A1010", "task_name": "场地平整及放线", "wbs_code": "WBS.1.1", "duration_days": 5 },
    { "task_code": "A1020", "task_name": "静压管桩施工及检测", "wbs_code": "WBS.1.1", "duration_days": 12.5 }
  ],
  "relationships": [
    { "pred_code": "A1010", "succ_code": "A1020", "type": "PR_FS", "lag_days": 0 }
  ]
}
  • Logical relationship types: PR_FS / PR_SS / PR_FF / PR_SF

  • duration_days may be a half, must be greater than 0

  • The whole network must be a Everywhere DAG (directed acyclic graph); no cycles is allowed

Safety Notes

  • P6 Professional must be fully closed during the write (if the database is occupied, the Write will be rejected and you will be notified)

  • Before each write, an automatic backup backup is created: PPMDBSQLite.db.bak_时间戳

  • The write is based on a reverse-validated table structure; for different P6 versions, check first

MCP Interface (AI Tools)

p6ai has a zero-dependency MCP server (std inside, using only the Python standard library), and any MCP-CP-capable AI client (Claude Routine, Codex, Cursor, etc.) can call it directly:

Tool

Description

validate_plan

Validate the plan JSON (fields, MCM, value, relationship types, cycles)

create_project

Validate and write the P6 database (automatic backup, single transaction, rollback on failure)

list_projects

Read-only list of projects in the database

check_database

Database structure self-check and version identification

Start server:

python -m p6ai serve
# 安装后也可直接:p6ai serve

Claude Desk extension`:

{
  "mcpServers": {
    "p6ai": {
      "command": "python",
      "args": ["-m", "p6ai", "serve"],
      "cwd": "C:\\path\\to\\p6ai"
    }
  }
}

Codex configuration for CLI2:

[mcp_servers.p6ai]
command = "python"
args = ["-m", "p6ai", "serve"]
cwd = "C:\\path\\to\\p6ai"

If python is not in PATH, replace command with a full path of your Python with. AI client can control / tool in natural languages, e.g. "validate that plan", "build this plan under P6"

Supported Environments

  • Primavera P6 Professional 6.12 (Standalone SQLite, PPMDB,2312.*)

  • Python 3.0+

Roadmap

  • MCP server: expose validation, creation, data listing, and self-check tools to AI clients

  • XER export and integer DCMA quality check

  • Multi-Multi-version schema adapter layer

License

MIT

Disclaimer

This tool is a community project, not associated with, or endorsed by Oracle Corporation or its products. Using P6 data by writing directly to the database carries risk; be sure backup yourself and put it in test.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for parsing, querying, and analyzing Primavera P6 XER files with 13 tools, 3 resources, and 2 prompts.
    13
    10
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that enables LLMs to read and analyze Microsoft Project schedules, including critical path, resources, and advanced construction planning layers (AWP and LPS) for work packages and Lean planning.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for COBie Excel validation, updates, and PDF extraction.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol

  • JSON tools MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kcwuy/p6ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server