CutOptim Engine

io.github.cutoptimPublished by GitHub account cutoptimv0.1.0Updated Oct 30, 2026

Cutting optimization: 2D panels, 1D bars, timber and true-shape nesting via the CutOptim API.

VerifiedStreamable HTTPWeb executableDeveloper ToolsData & Analytics

Overview

AI-generated overview

CutOptim Engine MCP server that lets an assistant run cutting and nesting optimization for panels, bars, timber and polygon parts via the CutOptim API.

What you can do
  • Optimize rectangular parts on sheets (2D panels) and get layout, cut plan and yield
  • Optimize lengths cut from bars, tubes and profiles, and timber parts grouped by cross-section
  • Nest free-form polygon parts on sheets with true-shape nesting
  • Validate 2D, 1D, timber and nesting requests for free without solving them
  • Poll asynchronous max-engine jobs and read the account's monthly usage and remaining quota
When to use it
Useful when an assistant has to plan material cutting or nesting for fabrication work — panel, bar, timber or irregular-part layouts — and you want the request checked before spending a paid call. Also handy for tracking how many optimization calls remain in the month.
Requirements
Either the hosted endpoint with an Authorization bearer header, or the local npm package run with npx on Node 18 or newer. A CutOptim API key is needed for the optimize tools, get_job and get_usage, supplied as CUTOPTIM_API_KEY or the Authorization header; without one only the validate tools work. Network access to the CutOptim API is required.
Before you install
Each optimize call is metered and billed against your key's quota, like calling the REST API directly; validate first to avoid wasted calls. The API key is a secret passed by environment variable or header. The public demo key cannot run true-shape nesting. Sizes are unit-agnostic, so mixing units across parts, stock and kerf gives wrong plans.

Installation

In SourceWeft

  1. Open CutOptim Engine in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.cutoptim%2Fengine/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "cutoptim-engine": {
      "type": "http",
      "url": "https://api.cutoptim.com/mcp"
    }
  }
}

README

[CutOptim]

CutOptim MCP server

Cutting optimization as tools for AI assistants: 2D panels, 1D bars, timber and true-shape nesting,
through the CutOptim Engine API and the Model Context Protocol.

MCP guide · API reference · Get a free test key


Two ways to connect

Hosted (no install) — point your MCP client at https://api.cutoptim.com/mcp with the header Authorization: Bearer <your API key>. Configurations for Claude Code, Cursor, VS Code and Claude Desktop are in the MCP guide.

Local (this package, stdio) — runs on your machine and calls the same API with your key:

json
{  "mcpServers": {    "cutoptim": {      "command": "npx",      "args": ["-y", "@cutoptim/mcp"],      "env": { "CUTOPTIM_API_KEY": "co_test_YOUR_KEY" }    }  }}

Claude Code: claude mcp add cutoptim --env CUTOPTIM_API_KEY=co_test_YOUR_KEY -- npx -y @cutoptim/mcp

VariableMeaning
CUTOPTIM_API_KEYyour key: co_live_…, co_test_… (never billed) or the public demo key. Without one, only the validate_* tools work.
CUTOPTIM_BASE_URLdefault https://api.cutoptim.com

Node 18 or newer.

Tools

ToolWhat it doesCost
optimize_2drectangular parts from sheets: layout, cut plan, yieldone API call
optimize_1dlengths from bars, tubes, profilesone API call
optimize_woodtimber parts by cross-sectionone API call
optimize_nestfree-form polygon parts on sheetsone API call
validate_2d · validate_1d · validate_wood · validate_nestcheck a request without solving itfree
get_jobread an async engine: "max" jobfree
get_usagecalls used and left this monthfree

The arguments of each tool are exactly the request body of its endpoint — the schemas are generated from the OpenAPI document. Every result carries a short summary for the assistant and the API's JSON answer as structuredContent.

Quota and billing

One tool call is one Engine API call: the same key, quota, rate limits and billing as calling the REST API yourself. The client sends an Idempotency-Key with every optimize call, so its own retries are never charged twice.

License and support

MIT. This repository is published from the CutOptim monorepo; report a bug in Issues or write to [email protected].

Source: README.md at commit d3bdc75

Tools

10

optimize_2d

Optimize 2D panels

Metered: one Engine API call. Cut rectangular parts from sheets (panels, plywood, glass, sheet metal) and get the layout, cut plan and yield. 2D panel optimization. Nest rectangular parts into rectangular sheets. Returns the placement of every part, the remaining offcuts, the guillotine cut plan and the yield metrics. Parts named in `matchedSets` (grain matching) are cut side by side from one piece of board, one kerf apart; each placed member says which set and position it is.

ParameterspartsrequiredstockrequiredengineincludeoptionsmatchedSets

optimize_1d

Optimize 1D bars

Metered: one Engine API call. Cut lengths from bars, tubes, profiles or rolls and get the cutting pattern per bar. 1D / linear optimization (bars, profiles, tube). Cut parts of a given length from stock bars. Returns the rods used, the position of every part along each rod, the leftover length and the yield metrics.

Parameterspartsrequiredstockrequiredengineincludeoptions

optimize_wood

Optimize timber

Metered: one Engine API call. Cut timber parts grouped by cross-section from matching stock lengths. Timber optimization (cross-section-aware 1D). Cut lengths from bars that have a CROSS-SECTION. Unlike `/v1/optimize/1d`, where every bar can serve every part, a 50×150 part can only come out of 50×150 stock — so the job is split by cross-section, each section is matched to its own stock and solved separately, and the response carries both per-section and job-wide totals. Fanning the same job out into several `/v1/optimize/1d` calls is not equivalent: it costs one call per section against your quota, moves the stock matching to your code, and cannot distinguish "no material of this section" from "did not fit" — which this endpoint reports separately as `unmatched` and `unplaced`. `sw` and `sh` may be given in either order: 50×100 and 100×50 are the same bar turned over and are matched as one section. The response reports the normalised short/long form.

Parameterspartsrequiredstockrequiredengineincludeoptions

optimize_nest

Nest true shapes

Metered: one Engine API call (needs an API key; not available with the demo key). Nest free-form polygon parts on sheets. True-shape (irregular / polygon) nesting. Pack ARBITRARY POLYGONS onto fixed sheets, letting parts interlock into each other's concave pockets — an L-bracket, a gasket, a laser-cut profile. This is a different class from the rectangular modes: a part is an outline (`polygon`, optional interior `holes`), not a width×height, so a bounding-box packer's notch-air is reclaimed. On a representative 272-part job it uses 6 sheets where the same parts by bounding box need 9 (−33 % material). Two things the rectangular API cannot express come for free here: per-sheet EXCLUSION ZONES (`stock[].exclusions` — a defect, a clamp footprint, a pre-printed area; a `quality`-0 zone is a no-go region for any part), and true-shape holes. Material partition (`material`) and the opaque `meta` passthrough work exactly as on the other modes. ⚠️ `density` is the placed POLYGON area over used sheet area — the honest fill, with concave pockets counted as empty. It is NOT comparable to a rectangular packer's `yieldPct` (which counts each bounding box as solid and so reads higher for a worse result); the cross-comparable metric is `sheetCount` on the same parts. A placed part carries the rigid transform (`rotation` in degrees, then `x`/`y` translation), NOT a re-emitted polygon: your input outline plus that transform reconstructs the placement exactly. Deterministic (a pinned seed); set `options.seed` to reproduce a layout. Engines: `lbf` (default) is synchronous and instant. Besides its own pass it tries the parts restricted to the right angles they allow, and their bounding boxes packed by an exact rectangle packer — which finds grids a sampling search misses (three 500-wide parts on a 1500-wide sheet at zero spacing) — and keeps whichever ranks best; on a tie, the plan that fills its sheets front to back, then the one with fewer parts off the right angles. `max` is ASY

Parameterspartsrequiredstockrequiredengineincludeoptions

validate_2d

Validate a 2D request

Free, no key needed: checks a 2D request without solving it. Same arguments as optimize_2d (field descriptions there). Validate a 2D request — free, no key, no quota, no solve. Schema-validate the SAME body `/v1/optimize/2d` takes, WITHOUT solving or spending a call. 200 `{valid:true, warnings}` (warnings flag parts that fit no stock — an approximate, solve-free probe), or 400 with the exact bad field path. Open like `/v1/health`: validate payloads during integration before you even have a key. The engine verdict matches the optimize path exactly, `engine: "max"` included: a body this endpoint accepts is one `/v1/optimize/2d` will accept, and one it refuses (400 for an option the max tier cannot model, 503 where that tier is not enabled) is refused there too.

ParameterspartsrequiredstockrequiredengineincludeoptionsmatchedSets

validate_1d

Validate a 1D request

Free, no key needed: checks a 1D request without solving it. Same arguments as optimize_1d (field descriptions there). Validate a 1D request — free, no key, no quota, no solve. Schema-validate the SAME body `/v1/optimize/1d` takes, WITHOUT solving or spending a call. See `/v1/validate/2d`.

Parameterspartsrequiredstockrequiredengineincludeoptions

validate_wood

Validate a timber request

Free, no key needed: checks a timber request without solving it. Same arguments as optimize_wood (field descriptions there). Validate a wood request — free, no key, no quota, no solve. Schema-validate the SAME body `/v1/optimize/wood` takes, WITHOUT solving or spending a call. Warnings flag parts with no matching-section stock long enough. See `/v1/validate/2d`.

Parameterspartsrequiredstockrequiredengineincludeoptions

validate_nest

Validate a nesting request

Free, no key needed: checks a nesting request without solving it. Same arguments as optimize_nest (field descriptions there). Validate a nest request — free, no key, no quota, no solve. Schema-validate the SAME body `/v1/optimize/nest` takes, WITHOUT solving or spending a call. Reports `engineEnabled` (whether the nesting engine is built into this deployment) and warns about parts whose bounding box fits no stock sheet. For `engine: "max"` the verdict matches the optimize path exactly: 400 for anything outside the preview scope, 503 where the async tier is not enabled, and otherwise a warning that the job will be asynchronous. See `/v1/validate/2d`.

Parameterspartsrequiredstockrequiredengineincludeoptions

get_job

Get an async job

Free (needs the key that submitted the job). Reads an engine "max" job; when it succeeded, the plan is in result. Poll an async max-engine job. Fetch the status (and, when finished, the plan) of a job submitted with `engine: "max"`. A job is `queued`, then `running`, then `succeeded` (with `result` = the same response shape a synchronous solve of that `mode` returns, carrying `engine: "max"` — a 2D plan for `mode: "2d"`, a nest for `mode: "nest"`) or `failed` (with `error`). Polling spends no quota, but the key must still be usable: a revoked key or a lapsed API subscription is refused with 403 here exactly as it is on every other authenticated path. A caller sees only its own jobs — a job id belonging to another account is reported as 401 "job not found", indistinguishable from one that does not exist, so ids cannot be probed.

ParametersjobIdrequired

get_usage

Get API usage

Free (needs an API key). Shows the plan, the calls used and left this month, and when the period ends. The account's current-month usage and quota. Read-only. Does not consume quota and does not send rate-limit headers. The period is the UTC calendar month.

Takes no parameters.

Version history

1
  1. v0.1.0LatestOct 22, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts