CutOptim Engine

io.github.cutoptim由 GitHub 账号 cutoptim 发布v0.1.0更新于 Oct 30, 2026

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

已验证Streamable HTTP可网页运行开发者工具数据与分析

概览

AI 生成的概览

CutOptim Engine MCP 服务器,让助手通过 CutOptim API 对板材、型材、木材和异形零件进行切割与排样优化。

可以做什么
  • 优化板材上的矩形零件(2D 面板),返回排版、切割方案与出材率
  • 优化从棒料、管材和型材中切出的长度,以及按截面分组的木材零件
  • 在板材上对自由形状多边形零件进行真形排样
  • 免费校验 2D、1D、木材和排样请求,不实际求解
  • 轮询异步 max 引擎任务,并查看账户当月用量与剩余配额
适用场景
适合助手需要为加工场景规划材料切割或排样时使用,例如板材、棒料、木材或异形零件的布局,并希望在消耗付费调用前先校验请求。也适合查看当月剩余优化调用次数。
运行要求
可使用托管端点并携带 Authorization Bearer 头,或在 Node 18 及以上用 npx 运行本地 npm 包。优化工具、get_job 和 get_usage 需要 CutOptim API 密钥,通过 CUTOPTIM_API_KEY 或 Authorization 头提供;没有密钥时只有校验工具可用。需要能访问 CutOptim API 的网络。
安装前请注意
每次优化调用都按次计费并消耗密钥配额,与直接调用 REST API 相同,建议先校验以免浪费调用。API 密钥属于机密,通过环境变量或请求头传入。公开演示密钥无法运行真形排样。尺寸不绑定单位,若零件、原料和锯缝混用单位会得到错误方案。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CutOptim Engine,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.cutoptim%2Fengine/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "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].

来源:README.md,提交 d3bdc75

工具

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.

输入参数parts必填stock必填engineincludeoptionsmatchedSets

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.

输入参数parts必填stock必填engineincludeoptions

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.

输入参数parts必填stock必填engineincludeoptions

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

输入参数parts必填stock必填engineincludeoptions

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.

输入参数parts必填stock必填engineincludeoptionsmatchedSets

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`.

输入参数parts必填stock必填engineincludeoptions

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`.

输入参数parts必填stock必填engineincludeoptions

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`.

输入参数parts必填stock必填engineincludeoptions

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.

输入参数jobId必填

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.

无需输入参数。

版本历史

1
  1. v0.1.0最新Oct 22, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分