Skip to content

Reference

MCP server

A stdio Model Context Protocol server that gives an assistant the solver and both catalogs, over the public REST API.

MCP clientClaude Desktop,or any MCP clientstdiocarton-pack-pro11 tools, 3 resources,2 promptsno database accessHTTPS · Bearer/api/v1the same routesthe web app usesSolverpack jobstoredOne API key is the whole grant: its scopes, its organization and its plan ceilings apply unchanged.Revoking the key turns the server off.
An HTTP client of /api/v1, with no privilege of its own.

Install

1 — build it
pnpm --filter @cartonpackpro/mcp-server build
echo "$PWD/packages/mcp-server/dist/index.js"   # the path for "args"
2 — claude_desktop_config.json, or .mcp.json at a repository root
{
  "mcpServers": {
    "carton-pack-pro": {
      "command": "node",
      "args": ["/absolute/path/to/packages/mcp-server/dist/index.js"],
      "env": {
        "CARTON_PACK_PRO_BASE_URL": "https://carton.example.com",
        "CARTON_PACK_PRO_API_KEY": "cpp_live_7Qk2nR4vT8xW1yZ3aB5cD6eF9gH0jK2mN4pQ6rS8"
      }
    }
  }
}
KeyValue
argsOne absolute path to the built dist/index.js. A relative path cannot resolve — the client chooses its own working directory.
CARTON_PACK_PRO_BASE_URLYour instance origin, no trailing path; /api/v1 is appended. Defaults to http://localhost:3000.
CARTON_PACK_PRO_API_KEYRequired. A key from /api-keys, ideally named for the machine it runs on. Revoking it is the whole of turning the server off.
CARTON_PACK_PRO_TIMEOUT_MSOptional. 1000 to 300000, default 30000.

Tools

ToolScopeReturns
pack_orderwriteSolves an order. Cartons, contents, steps, billable weight, 3D link. Files a pack job unless save is false.
compare_cartonswriteSame order against two or more carton sets. Count, billable weight, cost and fill side by side. Files nothing by default.
list_cartonsreadThe packaging catalog: interior dimensions, usable volume after padding, on hand, unit cost.
get_carton_stockreadWith no argument, every carton at or below its reorder point, worst shortfall first. With a SKU, that one.
list_itemsreadThe product catalog, paginated, with dimensions and handling constraints.
search_itemsreadFinds a SKU by code, name or category. What resolves an order written in words.
list_pack_jobsreadHistory, newest first. Reference, order number, cartons, units, billable weight.
get_pack_jobreadOne stored plan in full. Takes our reference, the job id, or your order number.
create_cartonwriteAdds a packaging type. Counts against the carton-type ceiling.
create_itemwriteAdds a SKU with its shipping footprint. Counts against the item ceiling.
get_usagereadPlan, consumption this month, and every ceiling.

Every tool is scoped to the organization that owns the key, and every plan ceiling that applies to the API applies here: a solve through pack_order spends one pack job. A read-only key answers every question but cannot solve or write.

Resources and prompts

URIContents
cartonpackpro://cartonsEvery active carton, as JSON.
cartonpackpro://itemsEvery active item, as JSON.
cartonpackpro://openapiThe live OpenAPI document, for the routes these tools do not wrap.
pack-this-orderPrompt. Turns a pasted order — email, pick list, spreadsheet row — into a plan with packing steps.
which-cartonPrompt. Picks a carton for a SKU list, then compares the realistic alternatives.

Troubleshooting

StatuscodeCause
no toolsargsThe path is relative, or dist/index.js does not exist yet. Build, fix the path, restart the client.
exits at launchConfigErrorCARTON_PACK_PRO_API_KEY is unset, or the base URL is not an absolute http(s) URL. The reason is on stderr.
401unauthorizedKey revoked, mistyped, or from another instance.
403forbiddenRead-only key. Scopes are fixed at creation, so make a new key.
402plan_limit_reachedA ceiling. get_usage names which; the monthly one resets on the first of the UTC month.
429rate_limitedPer-key bucket. The message says how long to wait.
MCP server · Carton Pack Pro