Skip to content

Connect ShipBob to ChatGPT: Automate Fulfillment & Inventory

Learn how to connect ShipBob to ChatGPT using a managed MCP server. Automate fulfillment, track inventory, and orchestrate orders with natural language.

Yuvraj Muley Yuvraj Muley · · 10 min read
Connect ShipBob to ChatGPT: Automate Fulfillment & Inventory

If you want to connect ShipBob to ChatGPT so your AI agents can automate fulfillment workflows, track shipments in real time, and audit inventory levels, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and ShipBob's REST APIs. You can either spend weeks building and hosting this integration yourself, or use a managed infrastructure layer like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses Claude, check out our guide on connecting ShipBob to Claude or explore our broader architectural overview on connecting ShipBob to AI Agents.

Giving a Large Language Model (LLM) read and write access to a global fulfillment platform like ShipBob is a massive engineering challenge. You have to handle complex inventory pagination, map dynamic fulfillment center logic to MCP tool definitions, and deal with multi-step shipping label workflows. Every time ShipBob updates an endpoint or adds a new warehouse feature, your custom server code must be updated and redeployed.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for ShipBob, connect it natively to ChatGPT, and execute complex supply chain workflows using natural language.

Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::

The Engineering Reality of the ShipBob API

A custom MCP server is essentially a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against ShipBob's highly specific supply chain data models is exceptionally painful.

If you decide to build a custom MCP server for ShipBob, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with ShipBob:

Inventory Catalog vs. Inventory Levels

ShipBob strictly separates the concept of a product (the catalog item) from its physical presence in a warehouse (the inventory level). If an AI agent asks "How many large blue shirts do we have?", a naive implementation might point the LLM at the products endpoint. But that only returns metadata. The LLM actually needs to query the inventory_levels endpoint to see total_fulfillable_quantity, total_on_hand_quantity, and total_committed_quantity. Your MCP tools must be named and described with extreme precision, otherwise the LLM will hallucinate the difference between an uncommitted unit and a reserved unit.

Multi-Step Bulk Shipment Operations

ShipBob's API relies heavily on asynchronous bulk operations for operational efficiency. When you place a shipment on hold, you don't update a single shipment object. You use the ship_bob_shipments_bulk_place_on_hold endpoint, which takes an array of shipment IDs. The endpoint returns HTTP 200 immediately, but the actual status changes per shipment are nested inside a results array. If an LLM tries to hold a shipment and doesn't parse that specific array to verify is_success, it might falsely report to the user that the shipment was held when it actually failed due to an operational block.

Unforgiving Rate Limits and the 429 Reality

ShipBob enforces strict rate limits based on your application tier. A critical architectural note when using Truto: Truto does not retry, throttle, or apply backoff on rate limit errors. When ShipBob returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller.

However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. The caller - your agent framework or ChatGPT client - is strictly responsible for reading these headers and executing the retry/backoff logic. Do not expect the integration layer to artificially absorb these errors; supply chain pipelines demand explicit failure visibility.

How to Generate a ShipBob MCP Server

Truto dynamically derives MCP tools from the integration's documented endpoints. When you connect a ShipBob account, Truto validates the underlying API schema and generates a self-contained JSON-RPC 2.0 endpoint.

You can generate this server via the Truto UI or programmatically via the API.

Method 1: Via the Truto UI

For ad-hoc agent testing or internal IT workflows, you can generate the MCP URL directly from your dashboard.

  1. Log into Truto and navigate to the Integrated Accounts page.
  2. Select your connected ShipBob account.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration (e.g., restrict to read methods only, or filter by specific tags like inventory).
  6. Copy the generated MCP server URL. Treat this URL as a sensitive credential.

Method 2: Via the Truto API

For production multi-tenant applications, you should provision MCP servers dynamically when your user connects their ShipBob account.

Make a POST request to the /integrated-account/:id/mcp endpoint using your Truto API token. You can configure granular method filtering to ensure the LLM can only execute specific actions.

curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ShipBob Fulfillment Agent",
    "config": {
      "methods": ["read", "write"],
      "tags": ["orders", "inventory", "shipments"]
    }
  }'

The API returns a payload containing the secure url. This single URL carries the cryptographic token required for routing and authentication:

{
  "id": "abc-123",
  "name": "ShipBob Fulfillment Agent",
  "config": { 
    "methods": ["read", "write"], 
    "tags": ["orders", "inventory", "shipments"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

Connecting the ShipBob MCP Server to ChatGPT

Once you have the url from Truto, you must register it with your client. Truto handles the Server-Sent Events (SSE) translation, meaning the URL is immediately ready for consumption by standard MCP clients.

Option A: Via the ChatGPT UI

If you are using ChatGPT directly for internal operations, you can attach the ShipBob server as a Custom Connector.

  1. In ChatGPT, go to Settings -> Apps -> Advanced settings.
  2. Ensure Developer mode is enabled (this flag enables MCP capabilities for Pro/Enterprise accounts).
  3. Under MCP servers / Custom connectors, click to add a new server.
  4. Name: Enter a recognizable label (e.g., "ShipBob (Truto)").
  5. Server URL: Paste the https://api.truto.one/mcp/<token> URL you copied earlier.
  6. Save the configuration. ChatGPT will immediately perform the MCP handshake and load the available ShipBob tools.

Option B: Via Manual Config File (Custom Frameworks & Wrappers)

If you are running a custom agent framework, Claude Desktop, or a local orchestration tool that uses JSON configuration files for SSE endpoints, you can use the @modelcontextprotocol/server-sse package.

Create or update your MCP configuration JSON file to point to the Truto SSE proxy:

{
  "mcpServers": {
    "shipbob-truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}

ShipBob Hero Tools for AI Agents

Truto automatically exposes dozens of ShipBob resources as tools. Do not overwhelm your prompt with generic CRUD operations. Here are 7 high-leverage hero tools to expose to your AI agent when managing fulfillment.

1. get_single_ship_bob_order_by_id

Retrieves the complete state of a single ShipBob order. This is the entry point for almost all customer support queries. It returns the current status, nested shipments, products, and recipient details.

"A customer is asking for an update on order #100456. Pull the current order status and tell me if the shipments have left the warehouse yet."

2. ship_bob_orders_estimate_delivery

Estimates a ShipBob delivery date for a specific destination and set of line items before an order is actually created. Crucial for dynamic checkout flows or agent-assisted sales where a customer wants to know "When will this arrive if I order now?"

"A buyer in Austin, TX (zip 78701) wants to buy two units of SKU-XYZ. Run a delivery estimate and tell me the fastest possible shipping option available."

3. create_a_ship_bob_order

Creates a standard direct-to-consumer order queued for fulfillment. The LLM must construct the nested JSON body containing the recipient address, shipping method, and product array (preferably using reference SKUs).

"Take the approved wholesale request from Acme Corp and create a new ShipBob order for 50 units of the premium coffee blend. Use standard shipping and send it to their HQ in Seattle."

4. list_all_ship_bob_inventory_levels

Retrieves current inventory quantities aggregated across all ShipBob fulfillment centers. This is the only reliable way to check stock. It differentiates between total_on_hand_quantity, total_committed_quantity, and total_fulfillable_quantity.

"Audit our inventory levels across all warehouses. Are there any SKUs where the fulfillable quantity has dropped below 20 units? List them out."

5. ship_bob_shipments_assign_fulfillment_center

Forces a shipment to be fulfilled by a specific ShipBob facility, overriding the automated routing logic. This is highly useful for managing local stockouts or executing specific B2B freight requirements.

"The automated system assigned shipment #9982 to the Pennsylvania warehouse, but we need to route it from the Texas facility due to a specialized freight pickup. Reassign the fulfillment center now."

6. ship_bob_shipments_bulk_update_instructions

Sets custom packing and special SKU instructions on shipments dynamically. The LLM can extract natural language requests from a customer email and translate them into strict operational packing notes.

"The customer for order #4455 just emailed and asked us to ensure no pricing slips are included because it is a gift. Update the packing instructions for their shipment to 'GIFT - DO NOT INCLUDE INVOICE'."

7. create_a_ship_bob_return

Generates a ShipBob return order (RMA) for a previously shipped order. The LLM specifies the original shipment ID, the inventory items coming back, and the requested return action (e.g., return to stock, dispose).

"The customer returned their package because it was the wrong size. Create a return in ShipBob for shipment #8876 and set the action to return the item to available inventory upon inspection."

For the complete inventory of ShipBob tools and their exact JSON schemas, review the ShipBob integration page.

Workflows in Action

Giving an AI agent access to these tools transforms it from a generic chatbot into a competent supply chain operator. Here are concrete examples of how an LLM orchestrates ShipBob APIs to solve real business problems.

Workflow 1: Triaging a Missing Shipment and Re-Routing Inventory

When a high-value customer complains about a delayed order, the agent must audit the current state, diagnose the block, and potentially fulfill a replacement.

"VIP Customer Sarah just emailed saying her order never arrived. Check the status of order #7743. If the shipment is marked as exception or lost, verify we have enough stock to replace it, cancel the old shipment, and create a new replacement order with expedited shipping."

Execution Steps:

  1. get_single_ship_bob_order_by_id: The agent fetches order #7743 and inspects the shipments array. It notes the shipment status is exception (lost in transit) and extracts the SKUs involved.
  2. list_all_ship_bob_inventory_levels: The agent queries the inventory levels for those specific SKUs to ensure total_fulfillable_quantity is greater than 1.
  3. ship_bob_shipments_cancel: The agent calls the cancel tool on the original, failed shipment ID so warehouse staff stop attempting to process it.
  4. create_a_ship_bob_order: The agent constructs a new order payload using Sarah's original recipient data, sets the shipping_method to an expedited tier, and executes the creation.

Result: The agent replies to the prompt (and can draft a reply to the customer) confirming the original shipment was lost, stock was verified, and a replacement order has been successfully queued for overnight delivery.

Workflow 2: Proactive Delivery Estimation

Before finalizing a B2B deal or updating a customer, sales teams often need exact logistics commitments based on current network constraints.

sequenceDiagram
    participant User as Sales Rep
    participant Agent as ChatGPT Agent
    participant Truto as Truto MCP Server
    participant ShipBob as ShipBob API

    User->>Agent: "Can we get 500 units to NY by Friday?"
    Agent->>Truto: Call ship_bob_orders_estimate_delivery
    Truto->>ShipBob: Proxy POST /estimate-delivery
    ShipBob-->>Truto: Return estimates & errors
    Truto-->>Agent: JSON Result
    Agent->>User: "Yes, standard shipping arrives Thursday."

"A buyer in Brooklyn (11201) wants 500 units of SKU-889. Run a delivery estimate. If standard shipping gets it there by Friday, let me know. If not, tell me the cheapest shipping tier that will."

Execution Steps:

  1. ship_bob_orders_estimate_delivery: The agent structures the destination_address using the zip code provided and builds the line_items array for the requested SKU and quantity.
  2. Analyze Output: The agent parses the returned estimates array, comparing the estimated_delivery_date against the requested Friday deadline.
  3. Formulate Response: The agent determines if standard shipping is sufficient, or if a faster shipping_method must be selected to meet the SLA.

Result: The user gets a definitive, data-backed logistics answer without ever logging into the ShipBob dashboard or waiting for warehouse staff to reply to a Slack message.

Security and Access Control

When connecting an AI agent to a live fulfillment system, security cannot be an afterthought. An unconstrained LLM could accidentally cancel hundreds of shipments or write bad data to packing instructions. Truto's MCP servers provide strict boundary controls:

  • Method Filtering: Configure the MCP token with methods: ["read"] to allow the LLM to run delivery estimates and check stock, while hard-blocking the ability to create orders or cancel shipments.
  • Tag Filtering: Restrict the agent's scope to specific functional areas using tags: ["inventory"]. This completely hides order creation or billing tools from the LLM.
  • Time-Bound Access (expires_at): Generate ephemeral MCP servers for temporary workflows or contractor access. When the expires_at timestamp is hit, Truto automatically deletes the server and invalidates the token.
  • Dual Authentication (require_api_token_auth): For maximum security, enable this flag. It forces the calling client to provide a valid Truto API token in addition to possessing the MCP server URL, ensuring only authorized applications can execute tool calls.

Connect Your Fulfillment Stack to AI

Building a custom integration to manage ShipBob's inventory pagination, multi-step shipment workflows, and strict rate limits requires significant engineering investment. Using Truto, you bypass the infrastructure boilerplate entirely. You connect the integration, define your security boundaries, and instantly receive a production-ready MCP server URL that ChatGPT can consume natively.

Stop managing integration infrastructure and start automating your supply chain. Explore the complete tool schemas in the ShipBob integration documentation, or generate your first MCP server today.

Ready to give your AI agents secure access to ShipBob? Let Truto handle the integration layer. :::

FAQ

How does the MCP server handle ShipBob rate limits?
Truto does not retry or apply backoff on rate limit errors. If ShipBob returns an HTTP 429, Truto passes the error directly to the caller, normalizing the headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) so your AI agent or framework can manage the backoff logic.
Can I prevent ChatGPT from accidentally canceling ShipBob shipments?
Yes. When generating the MCP server in Truto, you can apply method filtering (e.g., methods: ['read']) to expose only non-destructive tools like inventory lookups and delivery estimates, blocking all write or delete operations.
How do I add the Truto MCP server to ChatGPT?
If you have ChatGPT Pro or Enterprise, enable Developer mode in settings, navigate to Custom Connectors, and paste the secure Truto MCP URL. ChatGPT will instantly perform the handshake and load the available ShipBob tools.

More from our Blog