---
title: "Connect MRPeasy to ChatGPT: Manage Manufacturing and Inventory"
slug: connect-mrpeasy-to-chatgpt-manage-manufacturing-and-inventory
date: 2026-10-13
author: Nidhi KN
categories: ["AI & Agents"]
excerpt: A complete architectural guide to building a secure MRPeasy ChatGPT integration using auto-generated MCP tools. Learn how to expose manufacturing APIs to LLMs.
tldr: "Connect MRPeasy to ChatGPT to automate manufacturing orders, BOM creation, and inventory sync. This guide covers bypassing MRPeasy API quirks using Truto's managed MCP servers, executing complex LLM workflows, and securing AI agent access without writing custom proxy code."
canonical: https://truto.one/blog/connect-mrpeasy-to-chatgpt-manage-manufacturing-and-inventory/
---

# Connect MRPeasy to ChatGPT: Manage Manufacturing and Inventory


If you want to connect MRPeasy to ChatGPT to automate bills of materials, manage manufacturing orders, and query real-time inventory, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/). If your team uses Claude, check out our guide on [connecting MRPeasy to Claude](https://truto.one/connect-mrpeasy-to-claude-automate-sales-orders-and-shipments/) or explore our broader architectural overview on [connecting MRPeasy to AI Agents](https://truto.one/connect-mrpeasy-to-ai-agents-streamline-procurement-and-operations/).

Giving a Large Language Model (LLM) read and write access to a complex manufacturing execution system (MES) and MRP platform is a massive engineering hurdle. You either spend weeks building, hosting, and securing a custom integration layer to translate LLM JSON arguments into MRPeasy's API constraints, or you use a [managed infrastructure layer](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/).

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

> Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your [AI agents](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the MRPeasy API

[Building an MCP server](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) is fundamentally an API translation exercise. While the [MCP standard](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/) gives models a predictable way to discover and call JSON-RPC tools, implementing it against MRPeasy's specific architecture requires handling several highly specific quirks. 

If you build a custom MCP server, you own this entire abstraction layer. Here are the MRPeasy-specific challenges that break standard CRUD assumptions for AI agents:

### Asymmetric Return Types on Create Operations
When you create a standard resource in most modern REST APIs, the server responds with a `201 Created` and the full JSON representation of the new object. MRPeasy behaves differently. When you call `POST` to create a Bill of Materials (BOM), Customer, or Item, the API returns the new record's database ID as a *bare integer* in the response body - not a JSON object, and not the full record.

For an LLM, this is disorienting. If ChatGPT creates a customer order and gets back `9432` instead of an order object, it cannot confirm the final system-generated status or the assigned reference code. Your MCP tool definitions must explicitly instruct the LLM to execute a follow-up `GET` request using that integer ID to retrieve the complete state.

### Strict One-Month Limits on Reporting Endpoints
MRPeasy exposes powerful reporting endpoints - such as `list_all_mr_peasy_crm_shippeds` (goods shipped) and `list_all_mr_peasy_production_orders` (production orders for a period). However, these reporting endpoints enforce a strict timeframe limitation: the requested period defaults to the current month and *cannot exceed one month*.

If a user prompts ChatGPT with "Show me all production orders from Q1," a naive LLM will try to pass a 90-day date range and fail. Your tool schema descriptions must embed explicit instructions forcing the LLM to chunk multi-month queries into sequential 30-day API calls and aggregate the data in memory.

### Dynamic Query Parameter Keys for Location Filtering
Filtering stock items by default location in MRPeasy does not use a standard query format like `?site_id=1`. Instead, the API requires dynamically named query parameters structured as `def_location_{site_id}` (e.g., `def_location_1=true`). LLMs struggle with dynamically mutating keys in tool schemas. The MCP server layer needs to normalize this into a predictable schema (like accepting a `site_id` parameter) and mutate the outbound request to match MRPeasy's expected format on the fly.

### Handling 202 Accepted and Validation Rejections
MRPeasy update endpoints return a `202 Accepted` with no content on success, rather than returning the updated object. Delete operations return a `204 No Content`. However, MRPeasy strictly enforces relational integrity. If an LLM attempts to delete a customer who has existing customer orders, the API will fail with a rejection error. The MCP server must gracefully pass this failure back to the LLM so it can attempt remediation (like cancelling the orders first) rather than simply crashing the JSON-RPC connection.

```mermaid
sequenceDiagram
    participant LLM as ChatGPT
    participant Truto as Truto MCP Server
    participant Upstream as "MRPeasy API"
    
    LLM->>Truto: Call create_a_mr_peasy_customer_order
    Truto->>Upstream: POST /customer-orders
    Upstream-->>Truto: 201 Created (4921)
    Truto-->>LLM: Success, ID: 4921
    Note over LLM,Truto: LLM realizes it needs the order code
    LLM->>Truto: Call get_single_mr_peasy_customer_order_by_id (4921)
    Truto->>Upstream: GET /customer-orders/4921
    Upstream-->>Truto: Full Order Object (Code: ORD-881)
    Truto-->>LLM: Full Order Object
```

## How to Connect MRPeasy to ChatGPT via MCP

Rather than building and hosting this proxy layer yourself, you can use Truto to auto-generate a secure MRPeasy MCP server. Truto dynamically derives the tool definitions directly from the API's documentation and schemas, wrapping them in a standard JSON-RPC 2.0 endpoint.

Here is how to deploy it.

### Step 1: Connect MRPeasy to Truto
Before generating tools, you must establish an authenticated connection. In the Truto dashboard, navigate to **Integrated Accounts -> New Integrated Account**, select MRPeasy, and input the required API credentials. Truto securely manages the credential lifecycle, meaning your LLM never handles raw API keys.

Once connected, note the `integrated_account_id`. This ID isolates the subsequent MCP server to this specific MRPeasy tenant.

### Step 2: Create the MCP Server
Truto allows you to generate an MCP server URL through the dashboard UI or programmatically via the API. Both methods output a secure URL containing a cryptographically hashed token that authenticates the JSON-RPC requests.

**Method A: Via the Truto UI**
1. Navigate to the integrated account page for your MRPeasy connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration (e.g., restrict methods to `read`, filter by specific tags).
5. Copy the generated MCP server URL (it will look like `https://api.truto.one/mcp/<token>`).

**Method B: Via the Truto API**
If you are automating infrastructure for your end-users, you can provision the server dynamically using a POST request. 

```bash
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": "ChatGPT MRPeasy Manufacturing Server",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["inventory", "manufacturing", "orders"]
    }
  }'
```

The response contains the exact same secure `url` you would get from the UI.

### Step 3: Connect the Server to ChatGPT
You must now register the Truto URL with your LLM client. We will show the process for the ChatGPT UI, as well as the standard config file approach used by desktop clients (like Claude Desktop) and custom agents.

**Method A: Via the ChatGPT UI**
1. Open ChatGPT and click **Settings -> Apps -> Advanced settings**.
2. Ensure **Developer mode** is enabled (Note: MCP support requires a Plus, Pro, Business, Enterprise, or Education account).
3. Under **MCP servers / Custom connectors**, click **Add new server**.
4. Name the server (e.g., "MRPeasy Production").
5. Paste the Truto MCP URL into the **Server URL** field and click Add.

ChatGPT will immediately handshake with Truto, pull the schema definitions, and list the available MRPeasy tools.

**Method B: Via Manual Config File (SSE Transport)**
If you are testing locally or wiring up an alternative agent framework that uses configuration files, you configure the connection using standard Server-Sent Events (SSE). 

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

## MRPeasy Hero Tools for ChatGPT

By default, Truto exposes dozens of endpoints across the MRPeasy integration. When configuring your MCP server, you should restrict access to high-leverage operations. Here are six essential hero tools for manufacturing and inventory management.

### 1. list_all_mr_peasy_inventory_sums
Returns the total aggregate inventory quantity and financial cost across the entire MRPeasy stock, including Work In Progress (WIP) values. This is critical for executive dashboards and high-level financial check-ins.

**Contextual note:** This tool does not return line-item details. It provides a macro-level snapshot (`quantity`, `cost`, `wip_quantity`, `wip_cost`).

> "What is the total financial value of our current on-hand inventory, and how much capital is tied up in WIP right now?"

### 2. get_single_mr_peasy_stock_inventory_by_id
Fetches the exact on-hand quantity and total cost of a specific stock item. 

**Contextual note:** The `id` required here is the stock item's `article_id`. If ChatGPT only knows the product name, it must first call `list_all_mr_peasy_items` to map the name to the `article_id`.

> "Check the current inventory levels for our 'Titanium Bracket (SKU-882)'. Do we have enough on hand to fulfill a 500-unit order?"

### 3. list_all_mr_peasy_manufacturing_orders
Retrieves the current list of manufacturing orders (MOs) in the system, returning critical data like `article_id`, `quantity`, `unit`, and order status.

**Contextual note:** This is a read-only view of active production. It is highly useful for cross-referencing against customer orders to see if an MO has been generated to meet demand.

> "Pull up all active manufacturing orders for the next week. Are there any orders assigned to the milling machine that are currently behind schedule?"

### 4. create_a_mr_peasy_customer_order
Generates a new customer order. This is a highly consequential write operation.

**Contextual note:** A status of Confirmed (30) or higher automatically books available stock. Updating to Shipped (70) or Delivered (80) will automatically trigger shipment creation within MRPeasy. Remember that this tool returns a bare integer ID.

> "Create a confirmed customer order for Acme Corp for 200 units of the standard widget. Once created, fetch the order details and tell me the assigned reference code."

### 5. list_all_mr_peasy_production_operations
Lists the manufacturing operations planned for a specified period, filtered by the planned finish date.

**Contextual note:** As mentioned in the API quirks, this report defaults to the current month and cannot exceed a one-month window. The LLM must supply exact date boundaries within a 30-day span.

> "What production operations are scheduled to finish between November 1st and November 30th? Summarize the load by routing code."

### 6. create_a_mr_peasy_bom
Builds a new Bill of Materials in MRPeasy. This requires passing a structured JSON payload defining the `product_id`, `title`, and the array of `components` required for assembly.

**Contextual note:** Like customer orders, creating a BOM returns a bare integer ID. The LLM will need to query `get_single_mr_peasy_bom_by_id` to verify the routing details.

> "Draft a new BOM for the 'Pro Assembly Unit'. It requires 1 chassis, 4 mounting screws, and 2 logic boards. Create it in MRPeasy and confirm the routing details."

To view the complete list of available operations, schemas, and required parameters, visit the [MRPeasy integration page](https://truto.one/integrations/detail/mrpeasy).

## Workflows in Action

Providing an LLM with these tools fundamentally changes how teams interact with MRP data. Instead of navigating through multiple dashboard screens, users can execute complex workflows via natural language. Here are two examples.

### Scenario 1: Sales Checking Stock and Booking an Order
A sales representative is on a call with a client and needs to immediately verify inventory and book a confirmed order.

> "Check if we have at least 150 units of the 'Industrial Bearing' in stock. If we do, create a confirmed customer order for 'Globex Corp' for 150 units. Fetch the final order reference number and tell me so I can give it to the client."

**Execution Steps:**
1. **`list_all_mr_peasy_items`**: ChatGPT searches for "Industrial Bearing" to locate the `article_id`.
2. **`get_single_mr_peasy_stock_inventory_by_id`**: ChatGPT queries the specific `article_id` to verify the on-hand quantity exceeds 150.
3. **`list_all_mr_peasy_customers`**: ChatGPT searches for "Globex Corp" to find the `customer_id`.
4. **`create_a_mr_peasy_customer_order`**: ChatGPT submits the payload with status 30 (Confirmed), booking the stock. MRPeasy returns an integer (e.g., `8832`).
5. **`get_single_mr_peasy_customer_order_by_id`**: ChatGPT queries ID `8832` to retrieve the full object and extracts the `code`.
6. **Response**: ChatGPT outputs the confirmation and the reference code (e.g., "Order ORD-109 has been booked successfully.")

### Scenario 2: Production Manager Auditing Manufacturing Load
A production manager wants a quick status check on shop floor operations for the current month.

> "Pull the production operations report for this month. Group the scheduled operations by work station type and tell me which station has the highest volume of planned operations."

**Execution Steps:**
1. **`list_all_mr_peasy_production_operations`**: ChatGPT queries the operations report, adhering to the one-month constraint.
2. **In-memory Processing**: ChatGPT parses the JSON array, examining the routing and operational parameters.
3. **`list_all_mr_peasy_work_center_types`**: If necessary, ChatGPT queries the work center types to cross-reference codes with human-readable titles.
4. **Response**: ChatGPT generates a concise textual report summarizing the operational load across the manufacturing floor.

## Security and Access Control

Connecting an LLM directly to a core manufacturing system requires strict guardrails. You do not want a prompt injection attack deleting your Bills of Materials. Truto provides several security controls baked into the MCP server configuration:

*   **Method Filtering:** You can restrict a server to safe operations. Setting `methods: ["read"]` completely blocks the LLM from executing `create`, `update`, or `delete` tools, rendering the connection strictly read-only.
*   **Tag Filtering:** Limit the LLM's scope to specific domains. By applying `tags: ["inventory", "reports"]`, you expose stock checks while hiding customer billing and HR components of the MRPeasy API.
*   **Require API Token Auth:** By setting `require_api_token_auth: true`, possession of the MCP URL is no longer sufficient. The caller must also pass a valid Truto API session token, ensuring only authenticated users can trigger the tools.
*   **Time-to-Live (TTL):** You can set an `expires_at` timestamp. Once the datetime passes, Truto's cleanup alarms automatically tear down the server and revoke the URL, which is ideal for temporary contractor access or limited-duration AI agents.

## A Note on Rate Limits and Upstream Errors

It is critical to understand how API limits are handled in this architecture. **Truto does not retry, throttle, or apply backoff on rate limit errors.** 

When the MRPeasy API returns an HTTP 429 Too Many Requests error, Truto passes that error directly back to the caller (the LLM or your agent framework). However, Truto does normalize the upstream rate limit information into standard IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). 

The caller is entirely responsible for detecting these 429 responses, parsing the reset headers, and applying the appropriate retry and backoff logic. Do not assume the infrastructure will automatically absorb these errors during high-volume AI scraping runs.

## Re-Engineering Manufacturing Software for AI

Connecting ChatGPT to MRPeasy is not just about making API calls; it is about making legacy manufacturing data fully conversational. By relying on dynamically generated, documentation-driven MCP tools, you ensure your AI agents always have an accurate, validated mapping of your MRP data.

Instead of wasting engineering cycles manually maintaining proxy routes, handling pagination edge cases, and hardcoding authentication flows, you can deploy a secure, compliant MCP server in a single API call.

If you are building LLM features that require deep, read/write access to third-party manufacturing systems, you need infrastructure designed for the task.

> Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)
