Content
# CATIA MCP Server
> Author: **Tian Xiaochong**
A Model Context Protocol (MCP) server for Dassault Systèmes **CATIA V5** (and V6 through compatible COM interface) Windows automation control.
It encapsulates almost all common CATIA operations — document management, 2D sketching, 3D part design, assembly, drafting, parameters & formulas, measurements/analysis, export/view control — as strongly-typed MCP tools. Any MCP-compatible client (Claude Code, Claude Desktop, Continue, etc.) can directly drive CATIA without writing custom glue code.
## Architecture
```
Claude / MCP Client
│ stdio / SSE (MCP JSON-RPC)
▼
catia_mcp/server.py (FastMCP)
│
▼
catia_mcp/tools/*.py (business logic)
│
▼
win32com.client → CATIA.Application (COM)
```
## Environment Requirements
- **Windows** system with CATIA V5 (or V6) installed and registered as a COM server
- **Python 3.11+**
- `pywin32` (included in dependencies)
> **Tip:** If CATIA does not appear as a COM server, run `cnext.exe /regserver` as administrator in the CATIA `bin` directory.
## Installation
```bash
# Clone or copy this folder
cd catia-mcp
# Install dependencies
pip install -e .
# Or use uv
uv pip install -e .
```
## Usage
### 1. stdio (default — for Claude Code / Claude Desktop)
```bash
python -m catia_mcp
```
Add to Claude Code:
```bash
claude mcp add catia -- python -m catia_mcp
```
Or in Claude Desktop's `settings.json`:
```json
{
"mcpServers": {
"catia": {
"command": "python",
"args": ["-m", "catia_mcp"]
}
}
}
```
### 2. Streamable HTTP (for remote / web clients)
```bash
python -m catia_mcp streamable-http
```
Then connect to `http://localhost:8000/mcp`.
## Tool List
| Category | Tools |
|------|------|
| **Metadata / Connection** | `catia_status`, `ensure_catia_visible` |
| **Documents** | `list_documents`, `get_active_document_info`, `open_document`, `new_document`, `save_document`, `save_as_document`, `close_document`, `close_all_documents`, `get_document_type` |
| **Sketches** | `create_sketch_on_plane`, `add_point`, `add_line`, `add_circle`, `add_rectangle`, `add_arc`, `close_sketch`, `get_sketch_elements` |
| **Part Design** | `create_pad`, `create_pocket`, `create_shaft`, `create_hole`, `create_fillet`, `create_chamfer`, `create_mirror`, `create_pattern`, `create_rib`, `create_slot`, `add_body`, `insert_in_body` |
| **Assembly** | `create_product`, `add_component`, `add_existing_component`, `update_product`, `get_product_tree`, `apply_constraint`, `move_component`, `explode_product`, `activate_product` |
| **Measurements** | `measure_distance`, `measure_length`, `measure_area`, `measure_volume`, `measure_inertia`, `get_bounding_box` |
| **Parameters** | `list_parameters`, `get_parameter_value`, `set_parameter_value`, `add_parameter`, `add_formula`, `update` |
| **Drafting** | `create_drawing`, `create_sheet`, `create_view`, `add_dimension`, `add_annotation`, `update_sheet_links` |
| **Export / View** | `export_to_stl`, `export_to_step`, `export_to_iges`, `export_to_pdf`, `capture_screenshot`, `fit_all_in`, `update_view` |
## Example Prompts
> *The following are example natural language requests that can be sent to Claude after connecting the MCP server.*
1. **Open a part and create a simple bracket**
> "Create a new part, sketch a 50×30 rectangle on the XY plane, extrude it to 10 mm, and then create a 5 mm hole in the center."
2. **Drive parameters**
> "Set parameter `Length_1` to 120 mm and update the model."
3. **Assembly operations**
> "Create a new product, add an existing component from `C:\Parts\Base.CATPart`, and add a new component and move it 50 mm along the X direction."
4. **Export**
> "Export the current document as `C:\Export\model.stp` in STEP AP214 format."
5. **Measurements**
> "Measure the volume and bounding box of the current PartBody."
## Development
```bash
# Code linting
ruff check catia_mcp
# Run with MCP Inspector (requires Node)
npx -y @modelcontextprotocol/inspector
# If using HTTP transport, connect to http://localhost:8000/mcp
```
## Troubleshooting
| Issue | Solution |
|------|----------|
| Cannot find `CATIA.Application` | Ensure CATIA is installed. Run `cnext.exe /regserver` as administrator in the CATIA `bin` folder. |
| `No active document` | CATIA must have an open document, or use `new_document` / `open_document` first. |
| `Active document is not a Part document` | Some tools only work with `.CATPart`; switch to a part document or create one with `new_document("Part")`. |
| Sketch or feature fails | Ensure the sketch is on a valid support plane and the profile is closed where required. |
## License
MIT
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.