p6xer MCP Server

io.github.osama-ata由 GitHub 账号 osama-ata 发布v0.1.3更新于 Oct 24, 2026

An MCP server for Primavera P6 XER files.

已验证STDIO仅桌面效率与工作流数据与分析

概览

AI 生成的概览

让助手解析和分析 Primavera P6 XER 进度文件,包括关键路径、资源和挣值。

可以做什么
基于 PyP6XER 构建,提供 13 个工具读取 .xer 进度文件:解析文件得到项目列表和状态分布、列出活动和 WBS 层级、查找关键路径活动、按 DCMA 风格规则检查进度质量,以及查看资源、分配、日历和关系。还可计算 PV、EV、AC、CPI、SPI、EAC 等挣值指标和汇总统计。另提供 3 个资源和 2 个提示模板,用于生成项目、活动和资源摘要及报告大纲。
适用场景
适合助手需要检查或汇报以 XER 文件保存的 Primavera P6 项目进度时使用,例如进度质量审查、关键路径问题、资源利用检查或挣值报告。适用于项目控制和计划管理场景,而非一般文件处理。
运行要求
作为本地 stdio 进程运行,通常通过 uvx 或 pip 启动,需要 Python 3.10 或更高版本以及 mcp 和 pyp6xer 包。API 密钥从环境变量 P6XER_API_KEY 读取;P6XER_ENDPOINT 可选,用于指向 p6xer 服务,否则默认使用本地守护进程。P6XER_LOG_LEVEL 可选,用于设置日志级别。仅支持桌面客户端。
安装前请注意
该服务器要求名为 P6XER_API_KEY 的密钥,请将其视为敏感信息,避免在共享配置中泄露。设置 P6XER_ENDPOINT 可能把进度数据发送到远程服务,而非保留在本地。这些工具会读取和分析 XER 文件;在用于生产进度前,请确认是否有操作会写入或修改文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 p6xer MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

P6XER MCP Server

mcp-name: io.github.osama-ata/p6xer-mcp-server

[PyPI version] [Python 3.12+] [License: MIT] [MCP]

A full-featured Model Context Protocol (MCP) server for Primavera P6 XER files, built on PyP6XER.

Exposes 13 Tools, 3 Resources, and 2 Prompts so any MCP-compatible AI client (Claude Desktop, Claude Code, Cursor, etc.) can interactively parse, query, and analyze .xer schedule files.


🚀 Features

🔧 Tools (13)

ToolDescription
parse_xer_fileParse an XER file — project list, totals, status breakdowns
get_project_activitiesActivities with filters: project_id, project_short_name, status, task_type
get_critical_pathCritical path activities (float ≤ 0), sorted by early start
analyze_resource_utilizationPlanned/actual hours & costs per resource; over-allocation flags
check_schedule_qualityDCMA-style check: missing logic, long durations, high float, unresourced tasks
get_resourcesList resources, optionally filtered by type
get_resource_assignmentsResource–activity assignments with enriched names and costs
get_wbsWork Breakdown Structure hierarchy
get_relationshipsPredecessor/successor relationships enriched with task codes
get_calendarsCalendar definitions with hours-per-period data
get_schedule_summaryAt-a-glance stats: counts, date range, critical count
get_earned_valueEVM: PV, EV, AC, CV, SV, CPI, SPI, EAC per project
get_activity_detailFull detail for one activity (preds + succs + resources)

📋 Resources (3)

URIDescription
xer-project://{file_path}/{project_id}Detailed text summary of a specific project
xer-activities://{file_path}Activities summary with status breakdown and duration stats
xer-resources://{file_path}Resources summary with type breakdown and assignment stats

💬 Prompts (2)

PromptTypes
analyze_xer_projectgeneral · schedule · resources · progress · quality
xer_reporting_promptexecutive · detailed · critical_path · resource · milestone

� Install from Store

Via PyPI (uvx — no install needed)

bash
uvx p6xer-mcp-server

Via PyPI (pip)

bash
pip install p6xer-mcp-serverp6xer-mcp-server

Via Smithery

Search for p6xer-mcp-server on smithery.ai and click Install. It will generate the correct Claude Desktop config automatically.

Via GitHub MCP Registry

The server is listed in the GitHub MCP Registry. In Claude Code:

bash
claude mcp add p6xer -- uvx p6xer-mcp-server

Claude Desktop config (after PyPI install)

json
{  "mcpServers": {    "p6xer": {      "command": "uvx",      "args": ["p6xer-mcp-server"]    }  }}

�📦 Installation

bash
# Clone the repogit clone https://github.com/osama-ata/p6xer-mcp-server.gitcd p6xer-mcp-server
# Install with uv (recommended)uv sync
# Or with pippip install "mcp[cli]>=1.6.0,<2.0.0" pyp6xer

🏃 Running

Development / MCP Inspector:

bash
uv run mcp dev src/p6xer_mcp_server/server.py

Stdio (Claude Desktop / Claude Code):

bash
uv run p6xer-mcp-server

🔌 Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "p6xer": {      "command": "uvx",      "args": ["p6xer-mcp-server"]    }  }}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

🔌 Claude Code (CLI)

bash
claude mcp add p6xer -- uvx p6xer-mcp-server

💬 Example Prompts

Once connected:

Parse project.xer and give me an overview of all projects
What are all the critical path activities, sorted by start date?
Run a DCMA schedule quality check on project.xer
Calculate earned value metrics — what are the CPI and SPI?
Show all resource assignments for "John Smith"
What are the predecessors and successors of activity A1000?
List all over-allocated labor resources
Generate an executive summary report for project.xer

📊 Tool Reference

Filter parameters (most tools accept)

  • project_id – numeric P6 project ID (e.g. "1234")
  • project_short_name – project short name string (e.g. "PROJ1")

Status codes

TK_NotStart · TK_Active · TK_Complete

Task types

TT_Task · TT_Mile · TT_FinMile · TT_WBS

Resource types

RT_Labor · RT_Mat · RT_Equip


🗂️ Project Structure

p6xer-mcp-server/├── src/│   └── p6xer_mcp_server/│       ├── __init__.py│       └── server.py       # All tools, resources, and prompts├── manifest.json           # MCPB bundle manifest├── mcp.json                # MCP registry metadata├── smithery.yaml           # Smithery registry configuration├── pyproject.toml└── README.md

📋 Requirements

  • Python ≥ 3.10
  • mcp[cli] >= 1.6.0, < 2.0.0
  • pyp6xer >= 1.16.0

📄 License

MIT


🚢 Publishing to PyPI (GitHub Actions + Trusted Publishing)

This repository includes a release workflow at .github/workflows/publish-to-pypi.yml based on the PyPA guide and pypa/gh-action-pypi-publish.

1) Configure Trusted Publishers

Create trusted publishers for this exact workflow file:

Use these values:

  • Owner: osama-ata
  • Repository: p6xer-mcp-server
  • Workflow file: publish-to-pypi.yml
  • Environment: pypi (for PyPI), testpypi (for TestPyPI)
  • Project name: p6xer-mcp-server

2) Create GitHub Environments

In repository settings, create two environments:

  • pypi
  • testpypi

Recommended security setup:

  • Require manual approval for pypi
  • No approval required for testpypi

3) Build locally (optional sanity check)

bash
python -m pip install --upgrade build twinepython -m buildpython -m twine check dist/*

4) Release flow

  • Push to main: publishes to TestPyPI
  • Push tag v* (for example v0.1.1): publishes to PyPI
bash
git tag v0.1.1git push origin v0.1.1

来源:README.md,提交 416ec11

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分