CATalyst
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Full-stack offline CATIA V5 knowledge engine & MCP Server for AI Agents: fused COM API, version-aligned User's Guide, CATNls settings, samples & win32com recipes (BYOD, SQLite FTS5). 面向 AI Agent 的 CATIA V5 全栈离线知识引擎与 MCP Server:融合 COM API、离线手册、CATNls 选项、官方样板与 win32com 实战配方。
CATalyst
Full-Stack Offline CATIA V5 Knowledge Engine & MCP Server for AI Agents
Turn CATIA V5's closed CHM Automation reference, multi-gigabyte offline HTML User's Guide, CATNls message catalogs, and official CAD/script samples into a sub-10ms, version-aligned, zero-hallucination local SQLite FTS5 knowledge base.
English · 简体中文
Why CATalyst Matters
Building reliable CATIA V5 automation with AI Agents has historically failed for four structural reasons:
- COM API Hallucination & Broken Inheritance: CATIA V5 ships with 80+ Frameworks and 1,100+ COM interfaces locked inside
V5Automation.chm. Raw HTML omits inherited members (e.g.,Paddoes not displayFirstLimitorDirectionOrientationinherited fromPrism), causing LLMs to invent methods or breakpywin32[out]tuple unpacking. - The Non-COM Blind Spot: A huge portion of real CATIA engineering lives outside COM Automation —
Tools > Optionssettings without aSettingController(e.g.,CatalogOption.CATSettings), batch protocols (CreateCatalogFromcsvCSV grammar,CNEXT -batch), and GUI-only architecture boundaries (e.g., PKTDocument Templatevs. UnresolvedPart Family). - Unusable Multi-Gigabyte Offline Docs: A full Dassault
Bxxdocinstallation exceeds 2.2 GB (78,000+ files) — 93% of which are binary.CATPart/.cgr/.modelassets and images. Naive recursive search times out, and raw FrontPage HTML explodes context windows. - Cross-Version Drift & Machine Coupling: Mixing documentation from R21/R27/R32 silently breaks scripts, while hardcoding local paths makes knowledge bases impossible to share across a team.
How CATalyst Solves It
CATalyst enforces a strict read-only knowledge plane (zero live win32com coupling, zero CATIA crash blast radius) built on a Decoupled Dual-DB + Portable Relative-Path Architecture:
[Core Open-Source DB: dist/catalyst.db (~9 MB)]
├── Official V5Automation.chm ──▶ Inheritance Fusion + IDL Signatures + 3,700+ Official Examples
└── Curated Community Recipes ──▶ AST-Verified, Sanitized Python win32com Industrial Patterns
│
[Optional Local Extension DB: dist/local/catalyst_docs.db (~120 MB, .gitignore)]
├── Bxxdoc/English/online/ ──▶ 12,000+ User's Guide & Tools>Options Pages (TOC + ix-* + Warnings)
├── Bxx/win_b64/msgcatalog/ ──▶ 237,000+ Cleaned CATNls UI Labels <-> Option Keys
└── samples/ & startup/ ──▶ Text Samples (Full Content) + Binary CAD Models (Relative Paths Only)
│
▼
┌────────────────────────────────┼────────────────────────────────┐
▼ ▼ ▼
MCP Server (10 Tools) CLI (catalyst_cli.py) Agent Skill
(Antigravity / Claude / Codex / IDEs) (< 300 Token Cards) (On-Demand Recall)
Key Architectural Breakthroughs
- Zero-Hallucination API Ground Truth: Recursively fuses parent inheritance chains (
Pad -> Prism -> SketchBasedShape -> Shape -> AnyObject), extracts full CHM member<dl><dd>descriptions /Parameters:/Returns:/Role:, builds a 6,871-edge COM Object Model Graph (from_interfaceshortest access chain), and supports CamelCase + bilingual CAD synonyms, bidirectional enum lookup,Selection.Searchgrammar, andpywin32[out]/CATSafeArrayVariantcalling hints. - Token-Efficient Adaptive Output & Round-Trip Elimination: Cuts MCP output size by 58%–88% without losing signature precision — strips JSON whitespace/empty keys, folds
AnyObjectboilerplate in overview mode (omitted_base_members), renders typed single-line signatures (detail="auto|summary|compact|full"+ optionaloutput_format="card"IDL cards), supports wildcard/comma member filtering (*Fillet*), inlines Enum definitions (referenced_enums), and fuses terminal creator signatures directly intonavigation_path(AddNewPad(iSketch: Sketch, iHeight: double) -> Pad) to eliminate extra tool round-trips. - Method-Level Calling Constraints & Caveats: Hot-loads verified calling caveats (
data/pitfalls.json+ staticCaveatMiner) for APIs where Dassault's underlying C++ implementation diverges from IDL declarations (e.g.,Material.PutIconrequiring a directory path ending with\to preventE_FAIL). Emits structuredpitfall_warningblocks with root-cause analysis and verified safe calling patterns. - Official Sample Code & Doc Linkage Reverse Index: Direct call-site mapping with return-type propagation across 2,415 sample scripts and 12,179 doc pages, uncovering 14,508 verified call sites and unfreezing 78+ previously unreferenced interfaces with exact line-number context.
- 2.24 GB Offline Docs Compressed to Sub-10ms FTS5: Multiprocess
lxmlETL parses 12,500+ HTML pages in seconds, extracts Dassault's nativeCATIA_P3_TOC.xmlhierarchy,<a name="ix-...">index tags,<a name="ToolsOptions...">anchors,awarning.gifofficial pitfalls,linked_docscross-references,linked_files, and content screenshots — stored via SQLite FTS5 External Content Tables (no duplicate text storage) with BM25 column weighting and CamelCase fallback (FavoriteCatalog->Favorite Catalog). - 100% Portable Relative-Path Index:
catalyst_docs.dbstores zero machine-specific absolute paths (portable_relative_paths: true) and carries acatia_releasewatermark (e.g.,B27). ConfigureCATALYST_DOC_ROOT/CATALYST_INSTALL_ROOTin MCPenvon any machine and CATalyst dynamically resolves localabs_pathfor HTML pages, embedded screenshots (for multimodalread_fileinspection), text.csv/.CATScript/.xmlsamples, and binary.CATPart/.CATProduct/.catalogtemplates. - Dual-Track Industrial Recipes: Bundles kernel-verified
win32comengineering recipes (headlessCNEXT -batchCatalog creation,CATBatGenXMLSet/CATBatImpXMLSet.CATSettingsXML round-trip,.txtDesignTable CRLF guard,Relation.Hiddenencapsulation, Catalog 3-mode architecture, STEP batch export, BOM/Inertia, Bounding Box, Drafting Title Block). - Graceful Plug-and-Play: Without
catalyst_docs.db, the 6 core API/Recipe tools work out of the box with zero configuration; once built locally, all 4 offline doc/settings/sample tools activate seamlessly.
Local Setup & Environment Isolation
- Local Database Initialization: Core (
dist/catalyst.db) and optional offline docs (dist/local/catalyst_docs.db) databases are built locally from your machine's CATIA V5 documentation and kept out of Git via.gitignore. - Upgrading Existing Databases:
v0.3.0→v0.3.1: No database rebuild required (zero schema changes — simply refresh/restart your MCP server).v0.2.x→v0.3.x: Rebuilddist/catalyst.dbviauv run python build.pyto populateobject_edgesand member descriptions (catalyst_docs.dbauto-healsdoc_api_linkson first query without re-unpackingBxxdoc).
- Isolated Virtual Environment by Default: Always use
uv sync/uv run(project-local.venv/).build.pyandbuild_docs.pywarn if invoked under global Python. - Zero System Side-Effects: Builders print resolved paths before reading local CATIA folders and never modify system
PATH, Windows Registry, or CATIA installation directories.
Quick Start
Requirements
| Dependency | Requirement | Notes |
|---|---|---|
| Python 3.10+ & uv | Required | Manages the project-local .venv/ automatically (all dependencies ship pre-built wheels; no C++ compiler needed). |
7-Zip (7z) |
Strongly Recommended (Required on Linux/macOS to unpack .chm) |
Fastest, space-in-path safe CHM unpacker (winget install 7zip.7zip / brew install p7zip / sudo apt install p7zip-full). If missing on Windows, the installer asks you whether to exit and install 7-Zip, specify a local 7z.exe, or explicitly continue with Windows hh.exe (--use-hh). |
| Local CATIA V5 Docs | Required (V5Automation.chm) / Optional (Bxxdoc) |
Auto-detected via CATEnv on Windows (release-aligned); if not found, the installer prompts you to enter or drag-and-drop the path (supports spaces and / or \). |
One-Click Installation (Recommended)
A single command syncs .venv, verifies 7-Zip (or asks your choice), auto-discovers or prompts for V5Automation.chm and optional release-aligned Bxxdoc, builds the local SQLite database(s), safely merges mcpServers.catalyst into your MCP client config (with .bak backup), and runs end-to-end verification:
# Windows (PowerShell)
git clone https://github.com/zedeeee/CATalyst.git
cd CATalyst
.\install.ps1
# If PowerShell blocks local scripts (Restricted ExecutionPolicy):
# powershell -ExecutionPolicy Bypass -File .\install.ps1
# Common options:
# .\install.ps1 --chm "D:\Dassault\B27\win_b64\code\bin\V5Automation.chm"
# .\install.ps1 --client claude # Built-in presets: antigravity (default), claude, cursor; or --config <path> for Codex / other MCP agents & IDEs
# .\install.ps1 --yes # Non-interactive (add --use-hh on Windows if 7-Zip is not installed)
# macOS / Linux (requires p7zip/7z to unpack CHM, or reuse a pre-built dist/catalyst.db)
./install.sh
Manual Step-by-Step Setup
1. Create Isolated Virtual Environment
git clone https://github.com/zedeeee/CATalyst.git
cd CATalyst
uv sync --extra dev
2. Initialize Core API Database (dist/catalyst.db, Required)
build.py automatically discovers local V5Automation.chm via CATEnv (<CATInstallPath>/code/bin/V5Automation.chm), displays detected paths for confirmation, and builds dist/catalyst.db locally (pass --chm for custom locations, --use-hh on Windows without 7-Zip, or --with-docs to build both databases together):
# Auto-detect V5Automation.chm via CATEnv (interactive confirmation before build)
uv run python build.py
# Or specify CHM explicitly, or build Core API + Offline Docs together:
uv run python build.py --chm "D:/Dassault/B27/win_b64/code/bin/V5Automation.chm"
uv run python build.py --with-docs
3. Build Local Offline Docs Extension (dist/local/catalyst_docs.db, Optional)
Run once against your version-aligned local CATIA documentation and install directory (pass top-level Bxxdoc / Bxx folders; paths are normalized automatically and never hardcoded into the resulting DB):
uv run python build_docs.py \
--doc-root "C:/Program Files/Dassault Systemes/B27doc" \
--install-root "C:/Program Files/Dassault Systemes/B27" \
--release B27
- Output defaults to
dist/local/catalyst_docs.db(ignored by.gitignore). - Supports
--modules cceug_C2,bascuctg_C2for targeted testing and--workers Nfor parallel tuning.
Fresh Machine Path Auto-Discovery (5-Tier Precedence)
On a fresh machine, CATalyst resolves local CATIA doc/install roots in strict priority order:
- Explicit CLI / MCP
env:CATALYST_DOC_ROOT&CATALYST_INSTALL_ROOT(accepts top-levelBxxdoc/Bxxfolders). - Machine-Local Config:
dist/local/paths.json(gitignored; saved automatically when runningbuild_docs.py, or set standalone viauv run python build_docs.py --set-pathswhen reusing a pre-builtcatalyst_docs.db). - Dassault Official
CATEnv: Auto-parses%ProgramData%\DassaultSystemes\CATEnv\*.txt(CATDocView&CATInstallPath) — works regardless of install drive (C:,D:,E:, etc.). - Standard Default Path:
C:\Program Files\Dassault Systemes\B*docandB*\win_b64. - Interactive Prompt / MCP Setup Hint: In an interactive terminal
build_docs.pyprompts for the directory; at MCP runtime, missing roots emitpath_setup_hintwhile keeping text search fully operational.
MCP Server Configuration
Running .\install.ps1 / ./install.sh automatically registers catalyst in your MCP client config (Antigravity ~/.gemini/config/mcp_config.json, Claude claude_desktop_config.json, Cursor ~/.cursor/mcp.json, or any other MCP-compatible Agent / AI IDE such as Claude Code & Codex via --config <path>). For manual setup, use:
{
"mcpServers": {
"catalyst": {
"command": "uv",
"args": [
"--directory",
"<path-to-CATalyst>",
"run",
"python",
"-m",
"src.mcp.server"
],
"env": {
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1",
"CATALYST_INSTALL_ROOT": "C:\\Program Files\\Dassault Systemes\\B27",
"CATALYST_DOC_ROOT": "C:\\Program Files\\Dassault Systemes\\B27doc"
}
}
}
}
Use native path separators for your OS (e.g.
\\in JSON on Windows,/on macOS/Linux).CATALYST_DOC_ROOTdefaults to a localBxxdocdirectory (and is optional if you only use the 6 core COM API/Recipe tools). When reusing a pre-builtcatalyst_docs.dbon another machine, you can swap the runtime prefix without rebuilding viaCATALYST_DOC_ROOToruv run python build_docs.py --set-paths --doc-root <prefix>(local directory preferred; optional SMB UNC orhttp(s)://base URL also supported).
Optional environment overrides:
CATALYST_DB_PATH: Custom path tocatalyst.db.CATALYST_DOCS_DB_PATH: Custom path to a shared/relocatedcatalyst_docs.db.CATALYST_7Z_PATH: Custom path to7z/7zaexecutable.CATALYST_OUTPUT_FORMAT: Default format forget_catia_interface(jsondefault compact JSON, orcardfor ultra-dense IDL text cards).CATALYST_PRETTY_JSON: Set to1to re-enableindent=2JSON formatting for human debugging.
MCP Server Tools
| Category | Tool | Purpose |
|---|---|---|
| COM API | get_catia_interface |
Adaptive interface lookup (detail: auto/summary/compact/full; output_format: json/card): supports exact/comma/wildcard member_name filtering (*Fillet*), base-member folding, from_interface navigation with terminal constructor signature, inline referenced_enums, implementation caveats (pitfall_warning), and linked official docs/samples |
| COM API | search_catia_api |
FTS5 BM25 search across interfaces, enums, properties, and methods (with reverse host lookup & 0-hit doc hint) |
| COM API | get_catia_enum |
Bidirectional enum lookup by enum name, integer value, or member name |
| COM API | get_catia_usecases |
Dual-track official VBScript tutorials + community Python win32com examples |
| COM API | search_catia_recipes |
Natural-language BM25 search over curated industrial automation recipes |
| COM API | get_catia_search_syntax |
Exact Selection.Search workbench prefixes and query grammar |
| Offline Docs | search_catia_docs |
BM25 search over User's Guide, Tools > Options, and Automation articles (category / module / solution filters) |
| Offline Docs | get_catia_doc_page |
Clean Markdown page body, section slicing, official warnings, linked_docs, linked_files, and resolved screenshot abs_path |
| Settings | search_catia_settings |
Search *.CATNls UI labels/keys with CamelCase fallback, cross-linked Tools > Options pages, and CATBatGen/ImpXMLSet hints |
| Samples | search_catia_samples |
Search official text samples (.csv, .CATScript, .txt, .xml) with full content + binary CAD templates (.CATPart, .catalog, etc.) with resolved abs_path |
CLI Usage
Every MCP capability has a symmetric command in catalyst_cli.py:
# Core COM API & Recipes
uv run python catalyst_cli.py get Pad --member GetDirection
uv run python catalyst_cli.py get Pad --from Application --format card --no-usecases
uv run python catalyst_cli.py get HybridShapeFactory --member "*Fillet*" --format card
uv run python catalyst_cli.py path Pad --from Application
uv run python catalyst_cli.py search "PartNumber" --type property
uv run python catalyst_cli.py enum CatProductSource --value 1
uv run python catalyst_cli.py recipe "CreateCatalogFromcsv"
uv run python catalyst_cli.py syntax --workbench PartDesign
# Offline Docs, CATNls Settings & Official Samples
uv run python catalyst_cli.py docs "Catalog Batch Mode" --category user_guide
uv run python catalyst_cli.py doc-page "cceug_C2/cceugbt0102.htm" --section "Batch Mode"
uv run python catalyst_cli.py settings "FavoriteCatalog"
uv run python catalyst_cli.py samples "BatchCatalog" --ext .csv --content
uv run python catalyst_cli.py samples "AISC_C" --ext .catpart
Project Structure
CATalyst/
├── data/
│ ├── recipes/ # Curated, AST-verified community recipes (JSON)
│ └── raw/ # Local extracted CHM HTML (.gitignore)
├── dist/
│ ├── catalyst.db # Locally built core COM API + Recipes SQLite DB (.gitignore)
│ └── local/ # Local portable catalyst_docs.db & paths.json (.gitignore)
├── docs/
│ ├── architecture.md # System architecture, schema, path discovery & troubleshooting
│ └── tutorial.md # Hands-on CLI & MCP usage guide
├── src/
│ ├── parser/ # CHM unpacker (7z/hh), HTML parser, inheritance tree, offline docs ETL
│ ├── engine/ # Thread-safe SQLite FTS5 engines (db.py, docs_db.py, local_config.py)
│ ├── mcp/ # FastMCP / MCPServer exposing 10 tools (server.py)
│ └── client/ # Optional host diagnostics
├── skills/catalyst-query/ # Agent Skill definition (SKILL.md)
├── tests/ # Automated tests (engine, FTS5, schema, portability, installer, MCP)
├── install.ps1 / install.sh # One-click installers (Windows / macOS / Linux)
├── install.py # Cross-platform installer & MCP registration engine
├── build.py # Core API DB builder + 8 smoke tests
├── build_docs.py # Offline docs/CATNls/samples extension builder + smoke tests
├── catalyst_cli.py # Symmetric CLI entrypoint
├── AGENTS.md # AI agent ground-truth policy & deployment runbook
├── README.md # English documentation (default)
└── README_CN.md # 简体中文文档
Documentation
- Architecture & Deployment Reference
- Hands-on Tutorial (CLI & MCP)
- Community Recipes Contribution Guide
- Agent Guidelines & Deployment Runbook
Verification & Testing
uv run pytest
Credits & License
- Co-architected and built with Google Antigravity & Gemini.
- Released under the MIT License.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found