---
title: "Connect Katana MRP to ChatGPT: Manage Orders & Inventory Workflows"
slug: connect-katana-mrp-to-chatgpt-manage-orders-inventory-workflows
date: 2026-09-28
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Learn how to connect Katana MRP to ChatGPT using Truto's managed MCP server. Automate inventory, purchase orders, and manufacturing workflows with AI agents."
tldr: "Connect Katana MRP to ChatGPT using Truto's MCP server to automate inventory, POs, and manufacturing orders. Learn how to generate secure tools and execute multi-step MRP workflows with AI agents."
canonical: https://truto.one/blog/connect-katana-mrp-to-chatgpt-manage-orders-inventory-workflows/
---

# Connect Katana MRP to ChatGPT: Manage Orders & Inventory Workflows


If you need to connect Katana MRP to ChatGPT so your AI agents can monitor stock levels, generate purchase orders, or schedule make-to-order manufacturing runs, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-and-mcp-servers-and-how-do-they-work/). This server acts as the translation layer between ChatGPT's tool calls and Katana's extensive manufacturing APIs. 

If your team uses Claude, check out our guide on [connecting Katana MRP to Claude](https://truto.one/connect-katana-mrp-to-claude-track-production-optimize-stock/) or explore our broader architectural overview on [connecting Katana MRP to AI Agents](https://truto.one/connect-katana-mrp-to-ai-agents-automate-supply-chain-fulfillment/).

Giving a Large Language Model (LLM) read and write access to an enterprise MRP system is a high-stakes engineering challenge. You must handle nested Bills of Materials (BOMs), strict variant-to-location mappings, and complex paginated search payloads. You can either build and maintain this translation infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

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

::cta{buttonText="Talk to us" buttonUrl="/book-a-demo/"}
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
:::

## The Engineering Reality of the Katana MRP API

A custom MCP server is a self-hosted integration layer. While the [open MCP standard](https://truto.one/what-is-mcp-and-mcp-servers-and-how-do-they-work/) provides a predictable way for models to discover tools, implementing it against Katana's API requires dealing with several domain-specific integration hurdles.

If you decide to build a custom MCP server for Katana MRP, you own the entire API lifecycle. Here are the specific challenges you will face:

### Complex Search Payloads and Filtering
Unlike basic REST APIs that accept flat query parameters, Katana relies heavily on structured POST payloads for searching records (like Sales Orders and Variants). The `search` endpoints expect complex JSON bodies with nested `and`/`or` condition groups, specific per-field operators (like `inq`, `neq`, `between`), and custom field mappings. If you hand-code your MCP tools, you have to write translation logic that prevents the LLM from hallucinating invalid search operators. Truto automatically generates these exact JSON Schema constraints directly from Katana's API documentation, ensuring the LLM only formats valid query structures.

### Granular Inventory vs. Bin Tracking
Katana supports strict multi-location inventory management. When an LLM asks "How much stock do we have?", the answer depends entirely on the granularity required. Katana separates standard inventory movements from `bin_locations` and `bin_inventories`. If your MCP server doesn't clearly delineate these schemas, the LLM will attempt to update a standard inventory record with bin-specific data, resulting in a 400 Bad Request. 

### Explicit Rate Limiting Behavior
When building [agentic workflows](https://truto.one/connect-katana-mrp-to-ai-agents-automate-supply-chain-fulfillment/), LLMs tend to fan out requests - for example, querying 50 individual variants in a loop. Katana enforces rate limits. It is critical to understand that Truto does not retry, throttle, or apply backoff on rate limit errors. When Katana returns an HTTP 429, Truto passes that error directly to the caller, normalizing the upstream rate limit info into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF spec. Your AI agent framework is entirely responsible for reading these headers and executing the appropriate backoff and retry logic.

## Step-by-Step: Generate and Connect the Katana MRP MCP Server

Truto creates MCP servers dynamically based on your connected integrations. There are no pre-built, hardcoded tool packages. Instead, [tools are generated instantly](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) from Katana's API documentation and endpoint definitions.

Here is how to generate a server and plug it into ChatGPT.

### Step 1: Create the MCP Server

You can create the MCP server either visually through the Truto dashboard or programmatically via the API.

**Method 1: Via the Truto UI**
1. Log into your Truto environment and navigate to **Integrated Accounts**.
2. Select your connected Katana MRP account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (e.g., restrict to `read` methods or specific tags like `inventory`).
6. Copy the generated MCP Server URL (it will look like `https://api.truto.one/mcp/a1b2c3d4...`).

**Method 2: Via the Truto API**
If you are provisioning access programmatically for your end-users, you can generate the server via a single POST request:

```bash
curl -X POST https://api.truto.one/integrated-account/<KATANA_ACCOUNT_ID>/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Katana MRP AI Assistant",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["sales_orders", "inventory", "manufacturing"]
    }
  }'
```

The API returns a JSON object containing the secure `url`.

### Step 2: Connect the MCP Server to ChatGPT

Once you have the Truto MCP URL, you need to register it with your ChatGPT environment.

**Method A: Via the ChatGPT UI**
If you are on a ChatGPT Pro, Plus, Business, Enterprise, or Education plan, you can connect the server directly:
1. Open ChatGPT and navigate to **Settings -> Apps -> Advanced settings**.
2. Toggle **Developer mode** on.
3. Under MCP servers / Custom connectors, click to add a new server.
4. **Name:** Katana MRP
5. **Server URL:** Paste the Truto MCP URL.
6. Click **Save**. ChatGPT will immediately handshake with the URL, pulling in all available Katana tools.

**Method B: Via Manual Config File (SSE Transport)**
If you are running an agent framework (like LangChain or a local inspector) that requires a standard configuration file, you can connect using the Server-Sent Events (SSE) proxy command provided by the MCP SDK:

```json
{
  "mcpServers": {
    "katana_mrp": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<YOUR_TRUTO_TOKEN>"
      ]
    }
  }
}
```

## Hero Tools for Katana MRP

When ChatGPT connects to the server, Truto dynamically derives the JSON-RPC tool definitions from Katana's API documentation. Here are the highest-leverage tools available for MRP workflows.

### list_all_katana_mrp_search_sales_orders
This tool executes a structured POST search against Katana's sales orders. It allows the agent to filter by customer, status, delivery date, and custom fields using logical `and`/`or` groups.

*Usage notes:* Ideal for checking pipeline status or finding orders that are blocked by product availability. Max 200 results per page.

> "Find all sales orders for customer ID 1042 where the status is NOT completed, and summarize the delivery dates."

### create_a_katana_mrp_manufacturing_order
Generates a new manufacturing order (MO) in Katana. The agent must supply the variant ID, planned quantity, and location ID.

*Usage notes:* This tool bridges the gap between sales and production. It triggers the allocation of ingredients based on the variant's active recipe.

> "Create a manufacturing order for 50 units of variant ID 88392 at the primary warehouse location."

### list_all_katana_mrp_variants
Retrieves variant records, which represent the actual physical goods (materials or finished products) in Katana. 

*Usage notes:* Essential for fetching the exact integer `id` required by almost every other write operation (like POs, MOs, or stock transfers).

> "Search for the variant ID associated with SKU 'OAK-TABLE-LG' and tell me its current sales price."

### create_a_katana_mrp_purchase_order
Creates a new purchase order (PO) for raw materials or outsourced goods. 

*Usage notes:* The LLM must construct a JSON body containing the `supplier_id`, `location_id`, and a nested array of `purchase_order_rows` (defining variants and quantities).

> "Draft a purchase order to supplier ID 44 for 100 units of variant ID 9102. Ship it to our secondary location."

### list_all_katana_mrp_stock_transfers
Queries the movement of goods between locations. 

*Usage notes:* Filterable by `status` (CREATED, IN_TRANSIT, DONE), making it perfect for answering logistics inquiries.

> "List all stock transfers currently marked as IN_TRANSIT and tell me which target locations they are headed to."

### create_a_katana_mrp_batch
Creates a new batch (lot) for tracking specific manufacturing runs or received goods.

*Usage notes:* Requires a `batch_number` and `variant_id`. Crucial for businesses with strict traceability requirements (e.g., food and beverage, electronics).

> "Register a new batch for variant ID 5543 with batch number 'LOT-2026-A1'."

For the complete inventory of available Katana MRP tools, schemas, and required parameters, review the [Katana MRP integration page](https://truto.one/integrations/detail/katanamrp).

## Workflows in Action

AI agents shine when orchestrating multi-step workflows across an API. By chaining Katana tools together, ChatGPT can act as an automated production planner.

### Scenario 1: Resolving a Stock Shortage for a Sales Order

An operations manager asks ChatGPT to investigate a delayed customer order and take action if parts are missing.

> "Check the status of sales order #SO-992. If any items lack availability, find the missing variants and draft a purchase order to supplier ID 12 to restock them."

**How the agent executes this:**
1. Calls `list_all_katana_mrp_search_sales_orders` with a filter for `order_no = 'SO-992'`. 
2. Inspects the returned `sales_order_rows` to identify which `variant_id` has insufficient stock.
3. Calls `list_all_katana_mrp_variants` (filtered by the missing `variant_id`) to gather purchasing details like the default `purchase_price`.
4. Calls `create_a_katana_mrp_purchase_order`, passing the `supplier_id`, the `location_id` from the sales order, and the missing variants in the `purchase_order_rows` array.

**Result:** The agent replies with the exact deficit and confirms the new Purchase Order ID has been drafted in Katana for approval.

### Scenario 2: Make-to-Order Production Planning

A production lead wants to immediately schedule manufacturing for a specific product line.

> "We just approved a custom build. Please create a manufacturing order for 25 units of SKU 'CUSTOM-DESK' at the main factory. Once created, list the required recipe rows."

```mermaid
sequenceDiagram
    participant User as User
    participant Agent as ChatGPT
    participant Truto as Truto MCP Server
    participant Katana as Katana API

    User->>Agent: "Create MO for CUSTOM-DESK"
    Agent->>Truto: Call list_all_katana_mrp_variants (sku='CUSTOM-DESK')
    Truto->>Katana: GET /variants?sku=CUSTOM-DESK
    Katana-->>Truto: Return variant_id (7742)
    Truto-->>Agent: JSON Response
    Agent->>Truto: Call create_a_katana_mrp_manufacturing_order
    Truto->>Katana: POST /manufacturing_orders
    Katana-->>Truto: Return MO (id=1023)
    Truto-->>Agent: JSON Response
    Agent->>Truto: Call list_all_katana_mrp_manufacturing_order_recipe_rows
    Truto->>Katana: GET /manufacturing_orders/1023/recipe_rows
    Katana-->>Truto: Return allocated ingredients
    Truto-->>Agent: JSON Response
    Agent-->>User: "MO #1023 created. Here are the required ingredients..."
```

**Result:** The agent autonomously looks up the internal integer ID for the SKU, creates the manufacturing order, and reads back the allocated ingredient requirements based on the BOM.

## Security and Access Control

Exposing an MRP system to an LLM requires strict governance. Truto's MCP servers are self-contained security boundaries. When creating an MCP token, you can enforce several layers of access control:

*   **Method Filtering:** You can restrict a server to specific operations by setting `config.methods`. Passing `["read"]` ensures the agent can only execute `get` and `list` operations, completely neutralizing the risk of accidental stock modifications.
*   **Tag Filtering:** By using `config.tags: ["inventory"]`, you can isolate the server so it only exposes tools related to stock levels, hiding sensitive endpoints like customer financials or HR operator details.
*   **Time-to-Live Expiration:** You can set an `expires_at` ISO datetime. Once this time is reached, the underlying Key-Value token is purged and alarms clean up the database record, instantly revoking the LLM's access.
*   **API Token Auth (`require_api_token_auth`):** By default, possessing the MCP URL grants access. By setting this flag to true, clients must *also* pass a valid Truto API token in the Authorization header. This double-gate ensures that even if an MCP URL leaks in a log file, it cannot be used without explicit user authentication.

## Moving Forward

Building AI agents that can reliably operate a manufacturing resource planning system requires predictable, schema-enforced tool calling. Katana MRP is powerful, but its highly relational data model and strict payload requirements make hand-rolling an MCP server a massive sink of engineering time.

By leveraging Truto, you bypass the infrastructure overhead. You get dynamically generated tools backed by up-to-date OpenAPI documentation, complete with method filtering and strict security boundaries. Your agents get immediate, structured access to inventory, orders, and manufacturing routing, while your engineering team stays focused on core product logic rather than maintaining integration boilerplate.
