MCP

Integrate Packing Optimizer directly into your AI workflows via MCP.

The Model Context Protocol (MCP) endpoint allows you to connect Packing Optimizer directly to your AI agents, enabling them to calculate 3D bin packing optimizations without leaving their environment.

Just getting started?

Take a look at our quick start page.

Not sure which endpoint to use?

Take a look at our features for more information.


Establishing Connection

Connectivity
Base url
https://www.packing-optimizer.live
Path
/mcp
Method
POST

All API requests must be made over HTTPS.

Authentication

This endpoint supports two authentication methods:

Basic Auth
Use your standard username and API password.
OAuth 2.0

Supports Dynamic Client Registration (DCR) and Authorization Code Flow.

Most AI clients handle this automatically upon MCP server registration. For manual setups, use these configurations:

  1. Registration URL: https://packing-optimizer.live/register/
  2. Auth URL: https://packing-optimizer.live/authorize/
  3. Token URL: https://packing-optimizer.live/token/
  4. Authorization server base: https://packing-optimizer.live/mcp
  5. Resource: https://packing-optimizer.live/mcp
  6. Required Scopes: read

Basic Auth:
curl --user username:api_password -d @input.json -H "Content-Type: application/json" https://www.packing-optimizer.live/mcp


The Request

Available Tools

The following tools are available via this MCP server.

pack_cuboid_items

This follows the packToMixedBins functionality.

All parameters described in the Pack to Mixed Bins documentation are available via this tool. The only difference is that the parameters are passed in a JSON-RPC format, as shown in the example below.

Example


{
  "method": "tools/call",
  "params": {
    "name": "pack_cuboid_items",
    "arguments": {
      "bins": [
        {
          "type": "Box",
          "width": 1.0,
          "depth": 1.0,
          "height": 1.0,
          "maxWeight": 100
        }
      ],
      "items": [
        {
          "id": "item1",
          "width": 0.5,
          "depth": 0.5,
          "height": 0.5,
          "weight": 10
        }
      ]
    }
  }
}

The Response

Response

The response follows the standard JSON-RPC format, with the result contained as a string within the "result" field.

Example


{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{...}" 
      }
    ]
  }
}