MCP server for AI assistants
The Engine API as tools an AI assistant can call: optimize panels, bars, timber and true shapes from a chat, with your own API key and the same quota as the REST API.
The hosted server
CutOptim runs a remote MCP server next to the REST API. Add it to your assistant once, and it can plan cuts in a chat: "cut these 14 cabinet parts from 2800 × 2070 boards with a 4 mm kerf" becomes an optimize_2d call and comes back as a plan with a sheet table.
| URL | https://api.cutoptim.com/mcp |
| Transport | Streamable HTTP, stateless (every request is a POST answered with JSON; no session, no event stream) |
| Authentication | Authorization: Bearer <API key> — the same key as the REST API (authentication) |
| Without a key | listing the tools and the four validate_* tools work; any other tool answers the API's 401 as a tool error |
To try it without an account, use the public demo key co_demo_b326fe824d746355a23c8a5d3a3b52eb: small 2D, 1D and timber jobs, rate-limited, never billed (nesting, async jobs and usage need your own key). For your own integration, create a free test key (co_test_…, never billed) on your dashboard.
Connect your assistant
Claude Code — one command (add --scope user to have it in every project):
claude mcp add --transport http cutoptim https://api.cutoptim.com/mcp \
--header "Authorization: Bearer co_demo_b326fe824d746355a23c8a5d3a3b52eb"Cursor — in ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"cutoptim": {
"url": "https://api.cutoptim.com/mcp",
"headers": { "Authorization": "Bearer co_demo_b326fe824d746355a23c8a5d3a3b52eb" }
}
}
}VS Code (Copilot agent mode) — in .vscode/mcp.json:
{
"servers": {
"cutoptim": {
"type": "http",
"url": "https://api.cutoptim.com/mcp",
"headers": { "Authorization": "Bearer co_demo_b326fe824d746355a23c8a5d3a3b52eb" }
}
}
}Claude Desktop — its configuration file starts local servers, so a small bridge forwards to the hosted server (mcp-remote, a community package started by npx; needs Node 18+). In claude_desktop_config.json (Settings → Developer → Edit Config), then restart the app:
{
"mcpServers": {
"cutoptim": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.cutoptim.com/mcp",
"--header", "Authorization:${CUTOPTIM_AUTH}"],
"env": { "CUTOPTIM_AUTH": "Bearer co_demo_b326fe824d746355a23c8a5d3a3b52eb" }
}
}
}A connector added by URL on claude.ai cannot send an API key header (those connectors sign in with OAuth, which this server does not offer yet), so use one of the configurations above or the local package below. Keep a live key out of shared project files: a user-level configuration or an environment variable is the safer place.
Local (stdio)
If your client starts local servers rather than connecting to a URL, run the open-source package @cutoptim/mcp instead (MIT, Node 18+, source on GitHub). It runs on your machine over stdio, offers the same tools and calls the same API with your key, read from CUTOPTIM_API_KEY. No bridge is needed, so this is the simpler setup for Claude Desktop (claude_desktop_config.json) and works the same in Cursor (mcp.json):
{
"mcpServers": {
"cutoptim": {
"command": "npx",
"args": ["-y", "@cutoptim/mcp"],
"env": { "CUTOPTIM_API_KEY": "co_demo_b326fe824d746355a23c8a5d3a3b52eb" }
}
}
}Claude Code:
claude mcp add cutoptim --env CUTOPTIM_API_KEY=co_demo_b326fe824d746355a23c8a5d3a3b52eb -- npx -y @cutoptim/mcpWithout a key only the validate_* tools work; CUTOPTIM_BASE_URL overrides the default https://api.cutoptim.com. Quota and billing are exactly those of the hosted server: one tool call is one API call. Both the hosted server and the package are listed in the official MCP Registry as io.github.cutoptim/engine, so clients that browse the registry can find it by that name.
Tools
Each tool is one Engine API endpoint, and its arguments are that endpoint's request body — the input schemas are generated from the OpenAPI document, so any field you can send to the REST API you can send to the tool:
| Tool | What it does | Cost |
|---|---|---|
optimize_2d | Optimize 2D panels | One metered call |
optimize_1d | Optimize 1D bars | One metered call |
optimize_wood | Optimize timber | One metered call |
optimize_nest | Nest true shapes | One metered call |
validate_2d | Validate a 2D request | Free, no key |
validate_1d | Validate a 1D request | Free, no key |
validate_wood | Validate a timber request | Free, no key |
validate_nest | Validate a nesting request | Free, no key |
get_job | Get an async job | Free, needs a key |
get_usage | Get API usage | Free, needs a key |
The request fields are explained in the mode guides: 2D, 1D, timber, nesting. Sizes are unit-free numbers — keep one unit across parts, stock and kerf (units).
What a tool returns
- A short summary the assistant can read out: parts placed, sheets or bars, yield, a table per sheet, unplaced parts, warnings and the calls left this month.
structuredContent— the API's JSON answer, unchanged, matching the tool's output schema (the endpoint's response schema); the same JSON also comes as a text block.- With
include: ["svg"]the drawing is attached as animage/svg+xmlresource (see outputs). engine: "max"answers with a job id; the assistant polls it withget_job(async jobs).- An API error is a tool error carrying the status, the stable code, the message and
details(errors), so the assistant can correct the request and try again.
Quota, limits and safety
- One tool call is one API call. An
optimize_*call counts against your monthly quota exactly like the REST request;validate_*,get_jobandget_usageare free. Test keys are never billed. - The REST limits apply unchanged: the same rate limits, concurrency and request size (errors, retries and limits). If the connection drops while a plan is being computed, the call is not counted.
- The optimize tools are marked as not read-only, so an assistant that asks before running a tool asks before each metered call. Ask it to run
validate_*first when a request is large or uncertain. - The API receives only the tool arguments the assistant sends, never your conversation.