PyP6Xer MCP Server
Enables AI assistants to analyze Primavera P6 XER files for insights into critical paths, schedule health, and project performance. It provides 23 specialized tools for managing schedule data, resources, and earned value through local or remote interfaces.
README
PyP6Xer MCP Server
Primavera P6 schedule analysis for AI assistants. Load an XER file, ask questions about critical path, float, schedule quality, earned value — get answers in seconds.
Works with Claude Desktop, ChatGPT, Claude.ai, or self-hosted with the included web UI.
Live server: https://pyp6xer-mcp.fly.dev/mcp (open, no key needed)
PyPI: pip install pyp6xer-mcp
Loading your own files | Authentication | Development
Try it now
The server has three sample projects pre-loaded. Connect and start asking questions — no upload needed.
| Cache Key | Sector | Activities |
|---|---|---|
cairo-alex-road |
Roads | 57 |
hilal-oil-gas |
Oil & Gas | 31 |
terminal-building-airport |
Infrastructure | 66 |
Example prompts:
- "Show the critical path for cairo-alex-road"
- "Run a schedule health check on terminal-building-airport"
- "Analyze float distribution for terminal-building-airport"
Setup
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pyp6xer": {
"command": "uvx",
"args": ["pyp6xer-mcp"]
}
}
}
Runs locally via stdio. Load your own XER files by path: "Load /path/to/project.xer and analyze the critical path"
ChatGPT or Claude.ai
Add the remote server in your MCP settings:
https://pyp6xer-mcp.fly.dev/mcp
No API key needed. The sample projects above are ready to query. To analyze your own file, say "I need to upload a P6 schedule" — the AI will generate an upload link you can open in your browser.
Self-hosted (full stack with web UI)
git clone https://gitlab.com/articat1066/pyp6xer-mcp.git
cd pyp6xer-mcp
echo "OPENAI_API_KEY=sk-xxx" > .env
docker compose up
Open http://localhost:3000 — upload an XER file and start asking questions. The MCP server runs at http://localhost:5000 with sample projects auto-loaded.
Uses gpt-4o-mini by default. To change model or to use Claude, set ANTHROPIC_API_KEY and AI_MODEL=claude-sonnet-xxx in your .env.
MCP server only (no UI)
docker compose up pyp6xer-mcp
MCP endpoint at http://localhost:5000/mcp.
Loading your own XER files
Local file (Claude Desktop — file stays on your machine):
"Load /Users/me/Desktop/project.xer and show the critical path"
URL (any client):
"Load the XER file at https://example.com/project.xer"
Upload link (ChatGPT, Claude.ai — when you can't give a file path):
Ask the AI "I need to upload a schedule file." It calls the pyp6xer_get_upload_url tool, which returns a one-time upload link (valid 15 minutes). Open the link in your browser, upload your XER file, then come back to the chat. The file goes from your browser to the MCP server endpoint, not through the AI. It's held in memory for the session and lost on restart.
Direct HTTP upload (scripts, CI/CD):
curl -X POST -F "file=@project.xer" https://pyp6xer-mcp.fly.dev/upload
# Returns: {"cache_key": "upload_abc123", "activity_count": 250, ...}
# Use the cache_key with any analysis tool.
What it does
23 tools, 5 prompts, 3 resources. All tools are prefixed pyp6xer_.
| Category | Tools |
|---|---|
| File Operations (5) | load_file, write_file, clear_cache, export_csv, get_upload_url |
| Project/Activity (5) | list_projects, list_activities, get_activity, search_activities, update_activity |
| Schedule Analysis (6) | critical_path, float_analysis, schedule_quality, relationship_analysis, slipping_activities, schedule_health_check |
| Resource Management (2) | list_resources, resource_utilization |
| Progress/Performance (4) | progress_summary, earned_value, work_package_summary, wbs_analysis |
| Structure (1) | list_calendars |
See TOOLS.md for full parameter documentation.
Authentication
The hosted server at pyp6xer-mcp.fly.dev is open — no API key needed.
For self-hosted deployments, set API_KEY to enable authentication:
API_KEY=your_secret_key docker compose up
Clients then pass the key via query param, Bearer header, or x-api-key header:
{
"mcpServers": {
"pyp6xer": {
"url": "https://your-server.com/mcp?api_key=YOUR_KEY"
}
}
}
Development
git clone https://gitlab.com/articat1066/pyp6xer-mcp.git
cd pyp6xer_mcp
uv pip install -e ".[dev]"
pytest # 27 tests
python -m pyp6xer_mcp.cli # Run stdio (Claude Desktop)
python -m pyp6xer_mcp.cli streamable-http # Run HTTP server on port 5000
black --line-length 100 . # Format
ruff check . # Lint
Architecture
pyp6xer_mcp/ # Python MCP server
├── server.py # FastMCP instance
├── cli.py # Entry point + sample auto-load
├── core/parser.py # Shared XER parsing
├── tools/ # 23 MCP tools
├── prompts/ # 5 workflow prompts
├── resources/ # 3 MCP resources
└── http/ # Auth, upload, landing page
frontend/ # Next.js web UI (for self-hosted)
├── app/ # Pages + API routes (chat, tools)
├── components/ # Canvas, P6 upload, AI chat elements
└── Dockerfile
samples/ # Pre-loaded XER files (auto-load on startup)
Built on PyP6XER by Hassan Emam.
Built by
Paul Boucherat — portfolio · LinkedIn · GitLab · Buy me a coffee
If you're using this or have questions about P6 tooling, I'd like to hear from you.
Skills & Consulting
For AI-assisted P6 schedule analysis and consulting, see bouch.dev.
License
MIT — free for commercial and personal use.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。