Skip to content

Connect Katana MRP to Claude: Track Production & Optimize Stock

A practical engineering guide to connecting Katana MRP to Claude via MCP. Learn how to expose manufacturing orders, batch stock, and inventory to AI agents.

Riya Sethi Riya Sethi · · 9 min read
Connect Katana MRP to Claude: Track Production & Optimize Stock

If your manufacturing team needs to connect Katana MRP to Claude to automate production tracking, manage batch stock, or orchestrate purchase orders, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM function calls and Katana's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-katana-mrp-to-chatgpt-manage-orders-inventory-workflows/ or explore our broader architectural overview on /connect-katana-mrp-to-ai-agents-automate-supply-chain-fulfillment/.

Giving a Large Language Model (LLM) read and write access to an enterprise Material Requirements Planning (MRP) system like Katana is an engineering challenge. You have to handle API token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with Katana's domain-specific data constraints around inventory, variants, and batch tracking. Every time Katana updates an endpoint or changes a search payload structure, you have to update your server code, redeploy, and test the integration.

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

The Engineering Reality of the Katana MRP API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools via JSON-RPC, the reality of implementing it against specialized B2B APIs is painful. Katana is built to manage complex manufacturing processes, multi-level Bills of Materials (BOMs), and granular inventory tracking. Its API reflects that complexity.

If you decide to build a custom Katana MRP MCP server, here are the specific integration challenges you will face:

Structured POST Search Payloads Unlike many CRMs that allow simple GET requests with query parameters (e.g., ?status=open), Katana requires complex POST payloads for search operations like list_all_katana_mrp_search_sales_orders. You must construct a structured JSON body with and / or condition groups and specific operators (neq, inq, between, ilike). An LLM does not natively know how to format these complex query objects. Your MCP server must expose a tool with a strict JSON Schema that explicitly guides Claude on how to construct these nested filter arrays.

Complex Relational Hierarchy Katana data is highly relational. A Product has Variants. A Variant exists at a Location. Inventory is tracked at the Batch or Bin level. To get a complete picture of why a specific order is delayed, an AI agent cannot just hit a single endpoint. It must query the Sales Order, extract the sales_order_row_id, query the linked Make-to-Order Manufacturing Order, and then query the Batch Stock for the required ingredients. Exposing these as flat MCP tools requires careful schema mapping so the LLM understands the foreign key relationships (e.g., passing variant_id between tools).

Multi-Step State Transitions Katana enforces strict domain logic around document states. You cannot simply PATCH a Manufacturing Order to a "done" status if the underlying production ingredients have not been consumed or if the required batch numbers are missing. Tools like create_a_katana_mrp_manufacturing_order_production exist specifically to register partial completions. If you hand an LLM raw API access, it will guess the wrong fields and throw 400 errors. A managed MCP server provides strictly curated tools that map directly to Katana's expected operational flows.

How to Generate a Katana MRP MCP Server

Instead of writing and hosting a custom Node.js or Python server to handle Katana's API quirks, you can use Truto to generate an MCP server dynamically. Truto translates Katana's API documentation and OpenAPI schemas into ready-to-use MCP tools.

You can generate this server in two ways: via the Truto UI for internal use, or via the Truto API for programmatic deployment.

Method 1: Via the Truto UI

If you are setting up an AI agent for your own internal operations team, the UI is the fastest path.

  1. Log into your Truto dashboard and navigate to your Integrated Accounts.
  2. Select your connected Katana MRP account.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Configure your server (e.g., name it "Katana Prod Ops", filter for read and write methods, and set an optional expiration date).
  6. Click Generate and copy the resulting MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...).

Method 2: Via the Truto API

If you are building an AI feature into your own SaaS application and need to provision Katana MCP servers programmatically for your customers, use the Truto API. This allows you to generate scoped, temporary servers on the fly.

Make a POST request to the /integrated-account/:id/mcp endpoint:

curl -X POST https://api.truto.one/api/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Katana Supply Chain Agent",
    "config": {
      "methods": ["read", "write"],
      "tags": ["inventory", "manufacturing_orders"]
    },
    "expires_at": "2025-12-31T23:59:59Z"
  }'

Truto validates the request, generates a cryptographic token, and returns a fully functional JSON-RPC endpoint. The tools are generated dynamically at runtime based on the selected configuration.

Connecting the MCP Server to Claude

Once you have the Truto MCP URL, you need to connect it to your AI client. Claude Desktop supports MCP natively.

Method A: Via the Claude UI (or ChatGPT)

For enterprise environments that support UI-based connector management (such as ChatGPT's custom connectors or Claude's web integrations):

  1. Open your client settings (e.g., Claude Web: Settings -> Integrations -> Add MCP Server; ChatGPT: Settings -> Apps -> Advanced settings -> Developer mode -> Custom connectors).
  2. Name the integration "Katana MRP".
  3. Paste the Truto MCP URL.
  4. Save and connect. The client will immediately send an initialize request and fetch the tool list.

Method B: Via Manual Config File (Claude Desktop)

For local development and automation using Claude Desktop, you can configure the connection via the JSON config file. Because Truto provides the server over Server-Sent Events (SSE), you use the official MCP SSE transport.

Open your claude_desktop_config.json file (located in ~/Library/Application Support/Claude/ on macOS or %APPDATA%\Claude\ on Windows) and add the following configuration:

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

Restart Claude Desktop. The application will execute the npx command, establish an SSE connection to Truto, and pull in the Katana tools.

Hero Tools for Katana MRP

Truto automatically generates dozens of tools for Katana based on its API schemas. Here are the most powerful "hero tools" to expose to your AI agents for supply chain and production workflows.

1. list_all_katana_mrp_search_sales_orders

This tool allows Claude to query sales orders using complex, structured filters (e.g., finding all open orders for a specific customer or orders due this week). This is much more powerful than a simple list endpoint because the LLM can construct nested and / or logic.

"Find all open sales orders for the customer 'Acme Corp' that have a delivery date in the next 7 days, and list their current fulfillment status."

2. list_all_katana_mrp_search_manufacturing_orders

Manufacturing Orders (MOs) track production. This tool lets the agent search for MOs by status, location, or linked sales order, enabling proactive bottleneck identification.

"Search for any manufacturing orders at the 'Primary Facility' that are currently marked as 'Not Started' but have a planned completion date of today."

3. list_all_katana_mrp_variants

Variants are the core items in Katana (both materials and finished products). This tool allows Claude to look up SKU details, sales prices, purchase prices, and supplier item codes.

"Look up the variant details for SKU 'WOOD-OAK-01' and tell me its current purchase price and default supplier."

4. list_all_katana_mrp_batch_stocks

For manufacturers dealing with expiration dates or precise lot tracking, this tool returns granular inventory levels per batch and location.

"Check the current stock levels for all batches of 'Organic Honey'. Are there any batches currently sitting in the 'Quarantine' location?"

5. list_all_katana_mrp_inventory_movements

This tool provides an audit trail of stock changes. If inventory is missing, Claude can use this tool to trace exactly when and where the stock was moved, consumed, or adjusted.

"Pull the recent inventory movements for variant ID 98765 over the last 48 hours. I need to know why our stock level dropped so suddenly."

6. create_a_katana_mrp_sales_order

Allows the AI agent to generate new sales orders directly in Katana, including adding specific variants, quantities, and pricing data to the sales_order_rows array.

"Create a new sales order for customer ID 1234. Add 50 units of SKU 'METAL-BRACKET' at $4.50 per unit, and set the expected delivery date to next Friday."

To see the complete list of available operations - including bin transfers, custom fields, demand forecasting, and stocktakes - view the Katana MRP integration page.

Workflows in Action

Connecting tools to Claude is only the first step. The real value comes from the agent's ability to chain these tools together to solve complex supply chain problems.

Workflow 1: Production Delay Troubleshooting

Persona: Production Planner

"I see Sales Order #SO-1042 is delayed. Can you figure out why, check the related manufacturing order, and tell me if we are missing any materials?"

Execution Steps:

  1. Claude calls list_all_katana_mrp_search_sales_orders with an exact match filter on order_no: "SO-1042" to retrieve the internal sales_order_id and check the overall status.
  2. It calls list_all_katana_mrp_search_manufacturing_orders filtering by the linked sales order ID to find the active Make-to-Order MO.
  3. Claude parses the MO response to identify which variant is holding up production.
  4. It calls list_all_katana_mrp_batch_stocks for the required ingredient variant to check if there is sufficient stock on hand.

Outcome: Claude responds: "Sales Order SO-1042 is delayed because its linked Manufacturing Order (MO-553) is stalled. You are short 120 units of 'Aluminum Sheet 2mm' (Variant ID 4452). There is currently zero batch stock available in your primary location. You need to issue a Purchase Order to restock."

Workflow 2: Automated Replenishment

Persona: Inventory Controller

"Check our inventory for SKU 'PACK-BOX-L'. If we have less than 500 units across all locations, draft a new purchase order to our default supplier for 1,000 units."

Execution Steps:

  1. Claude calls list_all_katana_mrp_variants filtering by sku: "PACK-BOX-L" to get the internal variant_id and the default_supplier_id.
  2. It calls list_all_katana_mrp_batch_stocks (or the broader inventory endpoints) to aggregate the total quantity on hand across all batches.
  3. Realizing the total is 320 units (below the 500 threshold), Claude calls create_a_katana_mrp_purchase_order using the retrieved supplier_id and attaching a row for 1,000 units of the variant.

Outcome: Claude responds: "I checked the inventory for PACK-BOX-L. You currently have 320 units on hand. Since this is below your 500-unit threshold, I have created Purchase Order #PO-892 for 1,000 units from your default supplier. It is currently in 'Draft' status awaiting your approval."

sequenceDiagram
    participant Claude as Claude Agent
    participant Katana as "Katana API (via MCP)"
    Claude->>Katana: Call list_all_katana_mrp_variants (SKU: PACK-BOX-L)
    Katana-->>Claude: Return variant_id & supplier_id
    Claude->>Katana: Call list_all_katana_mrp_batch_stocks (variant_id)
    Katana-->>Claude: Return batch quantities (Total: 320)
    Claude->>Katana: Call create_a_katana_mrp_purchase_order (1000 units)
    Katana-->>Claude: Return PO confirmation

Security and Access Control

Giving AI agents access to your core manufacturing database requires strict governance. Truto's MCP architecture provides several layers of access control built directly into the token payload:

  • Method Filtering: Restrict the server to specific operation types. For example, configure the token with methods: ["read"] to ensure the agent can only view inventory levels but can never create or delete orders.
  • Tag Filtering: Group tools by domain. If you only want an agent to handle procurement, use tags: ["purchasing"] to expose Purchase Orders and Suppliers while hiding Sales Orders and Manufacturing capabilities.
  • Expiration (expires_at): Generate short-lived MCP servers for temporary tasks or contractors. Once the timestamp passes, the token is automatically wiped from infrastructure and the URL becomes invalid.
  • Require API Token Auth: By default, possessing the MCP URL grants access. Enable require_api_token_auth: true to force the client to also pass a valid Truto API token in the headers, adding a second layer of identity verification.

Handling Rate Limits in Production

Katana MRP, like all enterprise APIs, enforces strict rate limits to protect infrastructure.

Truto does not silently retry, throttle, or apply artificial backoff when rate limit errors occur. If your AI agent issues too many rapid requests and Katana returns an HTTP 429 error, Truto passes that 429 error directly back to the caller.

To make handling this predictable, Truto normalizes the upstream rate limit data into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (your application or the MCP client) is responsible for reading these headers and implementing the appropriate retry and backoff logic. Do not expect the MCP server to automatically absorb rate limit errors.

Summary

Connecting Katana MRP to Claude via a managed MCP server transforms how your team interacts with supply chain data. Instead of manually clicking through complex Katana dashboards to trace variants, batches, and manufacturing orders, you can deploy AI agents that execute multi-step logistics workflows using natural language.

By leveraging Truto, you bypass the friction of OAuth management, schema maintenance, and manual tool coding, getting your manufacturing AI agents into production in minutes rather than months.

FAQ

Can I restrict the Claude agent to read-only access for Katana MRP?
Yes. When creating the MCP server in Truto, you can set the config methods to ["read"]. This ensures the generated tools only support GET and LIST operations, preventing the agent from creating or deleting Katana records.
How does Truto handle Katana MRP rate limits?
Truto passes HTTP 429 rate limit errors directly to the caller and normalizes the rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The client is responsible for implementing retry and backoff logic.
Does Claude understand Katana's complex search payloads?
Yes. Truto derives the tool schemas directly from Katana's OpenAPI specification. When Claude calls a search endpoint, it reads the JSON Schema provided by the MCP server, which instructs it exactly how to format the 'and/or' filters and operators.
How do I secure the MCP server URL?
By default, the server URL contains a cryptographic token. For higher security, you can configure the server with `require_api_token_auth: true`, which forces the client to also provide a valid Truto API token in the authorization header.

More from our Blog