OpenFab MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenFab MCP Lint this FANUC .LS file and flag missing positions or bad motion commands."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenFab MCP
An open-source MCP toolkit for industrial manufacturing workflows, starting with FANUC robot programs and STEP CAD files.
OpenFab MCP v0.1.0 is an offline-first engineering toolkit. It turns common manufacturing engineering files into structured, auditable data and exposes the same capabilities through Python integration functions, a CLI, and an MCP server.
Problem
AI coding agents can already work effectively with source code and developer tooling, but traditional manufacturing engineering files and offline robot programs still lack an open, standardized, auditable tool layer for agents.
OpenFab starts with two practical formats:
FANUC
.LSrobot program sourceSTEP / STP CAD files
The goal of v0.1.0 is not robot control. It is a small, inspectable offline engineering workflow for parsing, analysis, linting, and draft generation.
Related MCP server: Fusion360 MCP Server
Architecture
Codex / Claude / MCP Clients
↓
OpenFab MCP
/ \
FANUC CAD
↓ ↓
.LS files STEP/STPInternally, the CLI and MCP server share the same service boundary:
CLI ─┐
├→ services.py → FANUC / STEP
MCP ─┘See docs/ARCHITECTURE.md for the integration design.
Current capabilities
FANUC .LS
parse
.LSsourceinspect program structure
preserve source-oriented program semantics without aggressive guessing
lint
UFRAME_NUM,UTOOL_NUM, andP[...]referencesdetect missing and duplicate positions
check
J/Lmotion formscheck basic speed formats
check
CNT/FINEtermination formsgenerate explicitly offline
.LSdrafts from structured input
STEP / STP
STEP schema and selected Part-21 header metadata
topology counts: solids, shells, faces, edges, wires, vertices, compsolids, compounds
bounding box
overall X / Y / Z dimensions
volume when reliably available
center of mass when reliably available
basic B-Rep statistics such as surface area and total edge length
STEP geometry is handled by Open CASCADE Technology through the cadquery-ocp-novtk package. See docs/CAD_STEP_LIMITS.md for explicit limits.
MCP tools
step_analyzefanuc_parse_lsfanuc_lint_lsfanuc_generate_ls_draft
CLI commands
openfab fanuc parse <file.ls> [--json]
openfab fanuc lint <file.ls> [--json]
openfab fanuc generate <draft.json> [-o output.ls] [--json]
openfab step analyze <file.step|file.stp> [--json]
openfab --versionThe MCP stdio entry point is:
openfab-mcpInstallation
OpenFab requires Python 3.11 or newer.
Base install: MCP server, CLI, and FANUC text functionality. This does not install OCCT/OCP.
pip install -e .Add STEP/STP analysis:
pip install -e ".[step]"Install all OpenFab runtime functionality:
pip install -e ".[all]"For development and tests, install runtime functionality plus development tools:
pip install -e ".[all,dev]"Examples
Parse a known-good offline FANUC example:
openfab fanuc parse examples/fanuc/sample_ok.ls --jsonLint the intentionally malformed example:
openfab fanuc lint examples/fanuc/sample_bad.ls --jsonGenerate an offline draft from structured JSON:
openfab fanuc generate examples/fanuc/draft.json -o openfab_draft.lsAnalyze the included 10 × 20 × 30 mm STEP box:
openfab step analyze examples/step/box_10x20x30.step --jsonThe repository examples are synthetic/offline fixtures and are not real production robot programs.
MCP server
Start the stdio server:
openfab-mcpThe server exposes the same integration functions used by the CLI. MCP protocol tests use the official MCP Python SDK v2 in-memory client (from mcp import Client) against the server object directly.
See docs/API.md for the current data/API notes.
Safety
OpenFab MCP v0.1.0 is designed for offline engineering analysis and draft preparation.
It:
does not connect to real FANUC controllers
does not upload programs
does not execute robot motion
does not validate reachability
does not validate collision safety
does not validate DCS or other safety systems
treats generated LS output as an offline draft only
Generated robot programs require review and validation by qualified personnel using appropriate FANUC tooling and simulation before any real-world use.
Testing
The release CI installs dependencies in a clean environment and runs the full test suite on Python 3.11, 3.12, and 3.13 on Ubuntu, plus Python 3.12 on a GitHub-hosted macOS ARM64 runner.
Local release checks:
pip install -e ".[all,dev]"
pytest
python -m compileall src
python -m buildDocumentation
License
OpenFab MCP is licensed under the Apache License 2.0. See LICENSE.
Third-party components retain their own licenses and copyright. See docs/THIRD_PARTY_LICENSES.md.
Available Tools
4 toolsfanuc_generate_ls_draftB
Generate an explicitly non-production FANUC LS offline draft from structured input.
Inputs: draft (required). Returns: object
fanuc_lint_lsB
Lint FANUC LS source offline and return structured diagnostics.
Inputs: path, text. Returns: object
fanuc_parse_lsA
Parse FANUC LS source from exactly one local .ls path or LS text string.
Inputs: path, text. Returns: object
step_analyzeA
Analyze a local STEP/STP file offline. No CAM, deployment, or robot control is performed.
Inputs: path (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
step_analyze is clearly distinct from the FANUC LS tools, and the three fanuc_ tools have reasonably distinct outputs: parse returns structure, lint returns diagnostics, generate produces a draft. fanuc_parse_ls and fanuc_lint_ls both consume LS source, so a small amount of overlap exists.
The FANUC tools follow a consistent fanuc_<verb>_ls pattern, but step_analyze breaks the convention by placing the object before the verb and omitting a domain prefix. The overall naming is readable and mostly predictable.
Four tools is appropriate for this narrow offline manufacturing scope. Each tool serves a distinct purpose: STEP analysis, LS parsing, LS linting, and LS draft generation.
The set covers the core offline workflow for STEP analysis and FANUC LS handling: parse, lint, and generate. Minor gaps exist, such as no direct STEP-to-LS conversion or LS editing utilities, but the explicit offline/non-production scope keeps the surface reasonable.
Maintenance
Related MCP Connectors
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
mtdt.io MCP: Salesforce DevOps platform connector (metadata deployments, backups and more)
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Related MCP Servers
- FlicenseAqualityBmaintenanceCross-OEM industrial machine intelligence. Normalizes telemetry across 16 manufacturer families (Fanuc, Siemens, Haas, DMG Mori, Mazak), enables plain-English operational automation, and produces tamper-evident work records. 14 MCP tools.14-
- AlicenseBqualityCmaintenanceConnects AI coding agents to Autodesk Fusion 360 for CAD/CAM automation, exposing 84 tools for sketching, modeling, assembly, inspection, export, and G-code post-processing through any MCP-compatible client.85MIT
- AlicenseNot gradedqualityCmaintenanceEnables conversational creation and editing of STEP CAD models through MCP clients like Codex, Claude, or Cursor, with real-time 3D browser preview and tools for primitives, booleans, mounting holes, flanges, and gripper bases.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients such as Claude Desktop, Cursor, and Copilot to connect over MCP STDIO to CAD/CAE/CAM tooling for natural-language parametric shape synthesis, CSG script generation, solid watertightness validation, error analysis, and autonomous correction.MIT