plm-upload-mcp

v1.9.0
plm-upload-mcp Checked 19 hours ago Published 1 day ago

MCP server to read the LionsBot PLM (SKU folders, component metadata, extracted drawing metadata, product & staging BOMs) bulk-upload SolidWorks exports…

An MCP server for the LionsBot PLM. It reads the PLM — SKU folders, full component metadata, extracted drawing/BOM metadata, and product & staging BOMs — and bulk-uploads local files (SolidWorks STEP/PDF exports) into it, matched to a component by SKU, makes components' Drive folders and uprevs staging prototypes. It runs on your own machine, so it reads your exported files straight off disk, and it signs in as you with your PLM/hub login — every read is row-level-security scoped to you, and every uploaded file is tagged with who uploaded it.

Summary extracted from the README.

plm-upload-mcp

An MCP server for the LionsBot PLM. It reads the PLM — SKU folders, full component metadata, extracted drawing/BOM metadata, and product & staging BOMs — and bulk-uploads local files (SolidWorks STEP/PDF exports) into it, matched to a component by SKU, makes components' Drive folders and uprevs staging prototypes. It runs on your own machine, so it reads your exported files straight off disk, and it signs in as you with your PLM/hub login — every read is row-level-security scoped to you, and every uploaded file is tagged with who uploaded it.

Pair it with your SolidWorks MCP: that MCP knows each part's SKU and exports the files; this MCP takes {path, sku} pairs and pushes them into the PLM.

Setup

Add one entry to your Claude MCP config (Claude Desktop: claude_desktop_config.json; Claude Code: .mcp.json or claude mcp add). Use your own PLM email + password:

{
  "mcpServers": {
    "plm-upload": {
      "command": "npx",
      "args": ["-y", "plm-upload-mcp@latest"],
      "env": {
        "PLM_EMAIL": "you@lionsbot.com",
        "PLM_PASSWORD": "your-plm-password"
      }
    }
  }
}

That's all. npx -y plm-upload-mcp@latest fetches and runs the latest version on every start; no clone, no build.

Your login is the same one you use for the Hardware Tools hub / PLM. Uploads are attributed to you and require a @lionsbot.com account.

Tools

upload_files

Uploads one or more files, each paired with its target SKU.

  • files: array of { path, sku, category? }
    • path — absolute local path to the file
    • sku — component SKU, e.g. MNT-1234-A0; it must already exist in the PLM
    • category — optional: Compliance | Datasheet | Quotation | Software | Drawing | 3D file (left out = the PLM guesses from the file name)

Each file lands in PLM storage and is mirrored into that SKU's Google Drive folder on the part's own drive (staging or main, from the component; created automatically if it doesn't exist). A SKU that isn't in the PLM is refused, so a typo never leaves a stray folder. Re-uploading a file with the same name replaces it in place — no duplicate pile-up on re-runs.

A PDF is then read like an upload in the PLM's Files tab: a LionsBot drawing of that SKU fills the part's title-block fields (material, colour, drawing REV, manufacturing method). An injection moulded X revision then shows in Injection Mold Staging. Another company's PDF, or a drawing of another SKU, is uploaded but not read.

Example ask: "Upload C:\exports\bracket.step to SKU MNT-1234-A0 and C:\exports\bracket.pdf to the same SKU."

create_folder

Finds or creates the [SKU] Name Drive folder of components already in the PLM, on each part's own drive, and links it to the component. Unknown SKUs are refused. Only needed for an empty folder: an upload makes the folder too.

  • skus: array of component SKUs

uprev_component

Uprevs a staging prototype to its next X revision (MNT-1234-X1 → MNT-1234-X2), the same as Uprev in the PLM: a new component carrying the old one's details, with its own staging Drive folder; the old revision stays as history.

  • sku: the current staging SKU (X0–X98; releasing to A0 is a promotion request in the PLM)
  • drawing_pdf: optional path to the new revision's drawing PDF
  • step: optional path to the new revision's STEP model
  • proceed_despite_warnings: optional, see below

The files are uploaded to the new revision, renamed to carry its SKU (an older revision's SKU in the name is swapped, else [SKU] is put in front), and the drawing is read into the PLM. The PDF is checked before anything is created: if its title block still shows the old SKU, no SKU or REV, or another part, nothing is uprevved and the warnings come back. Claude shows them to you; say go ahead and it calls again with proceed_despite_warnings: true. The warnings are kept in the part's history.

Example ask: "Uprev MNT-1234-X1 with C:\exports\bracket.pdf and C:\exports\bracket.step."

list_component_files

Lists the files currently in a component's Drive folder.

  • sku: component SKU
  • bucket: main or staging (default: the part's own drive)

Read-only tools

All read tools query the PLM as you (RLS-scoped) — you only ever see what you're allowed to see. bucket / classification values are main (confirmed), staging (unconfirmed), or all (default).

list_sku_folders

Every component SKU with its Google Drive folder — the SKU→folder map (SKU, name, category, type, revision, status, staging flag, folder id/URL). Filters: bucket, category, with_folder_only, limit, offset.

get_component_metadata

Full component metadata (every column, incl. cost/supply, drawing-extracted fields, CAD provenance, compliance, and the extract_meta block). Pass a single sku for one part, or omit it to page through all. Filters: search, bucket, category, status, limit, offset.

list_bom_extract_metadata

The metadata machine-extracted from each part's drawing/BOM PDF (extract_meta): the Lionsbot-custom flag, SKU/drawing match check, per-field extracted values, and source file + who/when. Only extracted parts are returned. Filters: sku, bucket, limit, offset.

list_boms

BOMs across all products, each product carrying its BOM(s) + line items and a derived staging flag (a product is staging while its working BOM still contains any staging component). Working BOMs only by default. Filters: product_sku, classification, include_snapshots, include_rows, max_rows_per_bom.

Config overrides (rarely needed)

Baked to production defaults; override via env only if the PLM backend moves:

env default
PLM_GATEWAY https://gateway-production-c13d.up.railway.app
PLM_ANON_KEY (prod anon key)
PLM_EDGE_URL https://plm-edge-production.up.railway.app

Requirements

Node.js 18+ (for built-in fetch).