Connect Cin7 to ChatGPT: Sync Inventory, Sales, and Supply Chain
Learn how to connect Cin7 to ChatGPT using a managed MCP server. Automate inventory syncs, sales orders, and supply chain workflows with AI.
If you want to connect Cin7 to ChatGPT so your AI agents can audit inventory levels, draft purchase orders, process sales orders, and manage supply chain logistics, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and Cin7's REST APIs.
If your team uses Claude, check out our guide on connecting Cin7 to Claude or explore our broader architectural overview on connecting Cin7 to AI Agents.
Giving a Large Language Model (LLM) read and write access to a complex ERP and inventory management system like Cin7 is a serious engineering challenge. You either spend weeks building, hosting, and maintaining a custom MCP server to translate LLM JSON arguments into Cin7's highly specific payload structures, or you use a managed infrastructure layer 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 Cin7, connect it natively to ChatGPT, and execute complex supply chain workflows using natural language.
Stop writing boilerplate ERP integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
The Engineering Reality of the Cin7 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, implementing it against Cin7's API is notoriously unforgiving. If you decide to build a custom MCP server for Cin7, you own the entire API lifecycle.
Here are the specific integration challenges that break standard CRUD assumptions when working with Cin7:
Opaque Batch Result Models
When you perform write operations in Cin7 - such as bulk updating product attributes or creating a batch of sales orders - the API expects a bare JSON array as the request body. In response, Cin7 does not return the fully updated objects. Instead, it returns an array of batch result items containing basic success flags and IDs. If your LLM expects the tool to return the complete state of the newly created PurchaseOrder so it can immediately extract line-item totals, it will hallucinate. Your MCP tools must explicitly define schemas that set expectations for these opaque batch result responses, forcing the LLM to make a subsequent GET request if it needs the full object.
Strict Hard Limits on Pagination
Unlike modern APIs that might let you pull 1,000 records per page, Cin7 enforces a strict hard limit of 250 rows per page across its list endpoints. When an AI agent needs to analyze inventory across a large catalog, it cannot greedily fetch all stock records in a single tool call. Your MCP server must inject limit and next_cursor parameters into the tool schemas and instruct the LLM to paginate gracefully. Without this, the LLM will generate incomplete context windows and make inaccurate supply chain decisions.
Rate Limiting and Backoff Delegation
When orchestrating high-volume ERP data, rate limits are inevitable. Cin7 uses strict rate limiting, and when limits are exceeded, it returns HTTP 429 Too Many Requests. It is critical to understand that Truto passes these 429 errors directly to the caller. Truto normalizes upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), but it does not automatically retry, throttle, or absorb rate limit errors. Your LLM orchestrator or LangChain wrapper is completely responsible for inspecting those headers, implementing backoff, and retrying the tool call.
Cin7 to ChatGPT Quickstart Guide
If you want the fastest path from a fresh Truto account to ChatGPT successfully calling the Cin7 API, follow these steps.
What you need:
- A Truto account with API access.
- A Cin7 administrator account to approve the OAuth or API key connection.
- A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode enabled.
Step 1: Connect Cin7 as an Integrated Account
In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Cin7, and complete the authentication flow. Truto securely manages the underlying credentials and ensures they remain fresh.
Once connected, note your integrated_account_id. You can find this in the Truto UI or via the API:
curl https://api.truto.one/integrated-account \
-H "Authorization: Bearer $TRUTO_API_TOKEN"Step 2: Generate the Cin7 MCP Server
Truto scopes a unique MCP server endpoint to a single integrated account. This means the server URL contains a cryptographic token that securely encodes which Cin7 account to use and what tools are exposed. You can generate this URL using either the UI or the API.
Method 1: Via the Truto UI
- Navigate to the integrated account page for your Cin7 connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., allow only
readmethods, or filter by specific tags). - Copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/a1b2c3d4...).
Method 2: Via the API You can programmatically provision the MCP server by making a POST request. This is ideal if you are dynamically spinning up agents for different tenants.
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": "Cin7 Inventory Agent",
"config": {
"methods": ["read", "write"],
"tags": ["inventory", "orders", "products"]
}
}'The response returns your secure url. Treat this URL like a secret - it carries routing and authentication for that specific Cin7 tenant.
Step 3: Connect the MCP Server to ChatGPT
Now that you have your MCP server URL, you need to register it with your ChatGPT environment. You can do this through the ChatGPT interface or via a local configuration file for custom desktop setups.
Method A: Via the ChatGPT UI
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Ensure Developer mode is toggled on.
- Under the MCP servers or Custom connectors section, click Add.
- Enter a name for your server (e.g., "Cin7 ERP").
- Paste the Truto MCP URL into the Server URL field and click Add.
(Note: If you are configuring this for Claude instead, the process is similar: Open Claude, go to Settings -> Integrations -> Add MCP Server, paste the URL, and click Add).
Method B: Via Manual Config File (SSE Transport) If you are using a custom desktop client or an orchestrator like Claude Desktop or Cursor that requires a JSON configuration file, you can connect to Truto's remote MCP server using Server-Sent Events (SSE).
Add the following to your mcp.json or equivalent configuration file:
{
"mcpServers": {
"cin7_erp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN_HERE"
]
}
}
}Once connected, ChatGPT will automatically handshake with the server, retrieve the Cin7 tool schemas, and make them available to the model.
Cin7 Hero Tools for AI Agents
Truto automatically generates MCP tools based on the Cin7 API documentation. When ChatGPT sends a tools/list request, it receives these operations with fully hydrated JSON schemas.
Here are six high-leverage hero tools that unlock powerful supply chain capabilities for your AI agents.
list_all_cin_7_stocks
This tool allows the agent to fetch stock units across the organization. Because Cin7 returns content-type-specific fields in a dynamic attributes object, this tool gives the LLM broad visibility into barcode tracking, quantity on hand, and bin locations.
"Check our current stock levels for barcode 88492011. How many units are available, and in which branch are they located?"
get_single_cin_7_sales_orders_with_carton_by_id
A crucial tool for customer success agents. It retrieves a specific sales order along with its carton details, including SSCC, volume, weight, and tracking numbers. This allows the LLM to answer detailed logistics queries.
"Pull up sales order 49921. What is the tracking number for the cartons, and what is the total shipping weight?"
create_a_cin_7_sales_order
Enables the agent to generate new sales orders directly into Cin7. The tool requires an array of sales order objects, allowing the LLM to batch multiple orders if necessary.
"Draft a new sales order for customer TechCorp. Include 50 units of style code A-100 and set the delivery date for next Tuesday."
cin_7_adjustments_bulk_update
Perfect for automated warehouse management. When physical counts differ from system counts, the agent can use this tool to post bulk adjustments. It takes an array of Adjustment objects identified by their integer IDs.
"We just did a cycle count in Branch 2. Update the adjustment record 1045 to reflect a write-off of 3 damaged units of product code X-22."
create_a_cin_7_purchase_order
Allows the AI agent to replenish inventory by drafting new Purchase Orders to suppliers. The agent formats a JSON array of purchase order objects based on the dynamic schema provided by the MCP server.
"Our stock for the summer catalog is running low. Create a purchase order to vendor GlobalSupply for 200 units of SKU 994-B."
cin_7_products_bulk_update
Allows agents to act as catalog administrators, executing mass updates to product metadata. Setting a field to an empty value clears it, and null leaves it unchanged.
"Update the pricing for all our winter jacket products. Increase the retail price by 10% for product IDs 881, 882, and 883."
For the complete inventory of available tools - including BOMs, Branches, Credit Notes, Payments, Production Jobs, and Users - check out the Cin7 integration page.
Workflows in Action
Individual tools are useful, but MCP servers truly shine when ChatGPT chains multiple tools together to execute complex, multi-step business processes. Here is how specific personas use these workflows in the real world.
Workflow 1: Automated Low Stock Replenishment
Persona: Supply Chain Analyst
Supply chain teams spend hours running reports to find low-stock items and manually drafting purchase orders. An AI agent can handle this autonomously.
"Analyze our current stock levels for all products in the 'Electronics' category. For any product with less than 20 units on hand, draft a purchase order to our primary supplier for 100 replacement units."
list_all_cin_7_stocks: The agent fetches current stock levels, likely using pagination vialimitandnext_cursorto scan the electronics catalog.- Reasoning Engine: ChatGPT evaluates the returned stock arrays, cross-referencing available quantities against the threshold of 20 units.
create_a_cin_7_purchase_order: The agent constructs a batch JSON payload containing the necessary POs for the low-stock items and posts it to Cin7.
sequenceDiagram
participant User as User
participant Agent as ChatGPT
participant Server as Truto MCP Server
participant Upstream as Cin7 API
User->>Agent: Draft POs for low stock electronics...
Agent->>Server: tools/call list_all_cin_7_stocks
Server->>Upstream: GET /v1/Stock
Upstream-->>Server: JSON (max 250 items)
Server-->>Agent: Context provided
Agent->>Server: tools/call create_a_cin_7_purchase_order
Server->>Upstream: POST /v1/PurchaseOrders
Upstream-->>Server: Batch result array
Server-->>Agent: Success confirmation
Agent->>User: Drafted POs for 4 SKUs.Workflow 2: Customer Order Resolution and Tracking
Persona: Customer Success Manager
When a customer asks "Where is my order?", a support rep usually has to dig through the ERP, find the order, locate the carton data, and extract the tracking info. ChatGPT can automate this instantly.
"Customer XYZ is asking about their recent bulk order from last week. Find the order, check if it has been packed into cartons, and give me the tracking numbers and courier information."
list_all_cin_7_sales_orders: The agent searches for recent sales orders associated with Customer XYZ using query filters.get_single_cin_7_sales_orders_with_carton_by_id: Once the order ID is identified, the agent calls this specialized endpoint to retrieve the nested carton data.- Reasoning Engine: ChatGPT extracts the
trackingNumberand weight from the carton array and formats a polite update message for the customer.
Workflow 3: Cycle Count Adjustments
Persona: Warehouse Manager
Warehouse staff often need to reconcile physical counts with the ERP. Instead of navigating complex Cin7 UI screens, they can describe the reality on the ground to an AI agent.
"We just finished counting aisle 4. We found 2 extra units of product 5543 and 1 unit of product 9920 is damaged beyond repair. Update the system to reflect this."
list_all_cin_7_products: The agent verifies the product IDs exist and pulls their reference data.list_all_cin_7_adjustments: The agent checks for open adjustment batches or decides to create a new one.create_a_cin_7_adjustment: The agent drafts the adjustment records, formatting a JSON array that adds +2 to product 5543 and subtracts -1 (with a damage reason code) for product 9920.
Security and Access Control
Giving an LLM write access to a live ERP system requires strict security guardrails. Truto provides several configuration layers when generating an MCP token to ensure the agent operates within a principle of least privilege.
- Method Filtering: You can strictly limit the MCP server to read-only operations. By passing
methods: ["read"]during server creation, ChatGPT can only executegetandlisttools. Write operations likecreate_a_cin_7_purchase_orderwill not even appear in the tool discovery phase. - Tag Filtering: If you only want the AI to manage inventory, you can pass
tags: ["inventory"]. This prevents the LLM from hallucinating calls to user management or financial endpoints. - Expiration Controls: You can generate ephemeral servers by setting an
expires_attimestamp. Once the timestamp passes, Truto automatically destroys the underlying token in the edge KV store, killing access instantly. This is perfect for short-lived agentic tasks. - Additional API Auth: For highly sensitive deployments, enabling
require_api_token_auth: trueensures that possession of the MCP URL is not enough. The connecting client must also pass a valid Truto API token in the Authorization header to execute tools.
The Shift from Code to Orchestration
Building a custom integration layer between ChatGPT and Cin7 is an exercise in managing API edge cases. Dealing with opaque batch results, strict 250-row pagination caps, and complex JSON arrays drains engineering resources away from actual AI feature development.
By using Truto to dynamically generate a Cin7 MCP server, you offload the entire connectivity burden. The schema generation, routing, and credential management are handled automatically, allowing you to focus purely on prompt engineering and agent orchestration.
Your ERP data is no longer locked behind complex documentation - it is instantly available as standardized, LLM-ready tools.
FAQ
- How does the Cin7 MCP server handle API rate limits?
- Truto normalizes upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. However, Truto does not retry, throttle, or apply backoff on rate limit errors. If Cin7 returns a 429 Too Many Requests, it is passed directly to ChatGPT, and your orchestrator is responsible for implementing retry logic.
- Can I restrict ChatGPT to read-only access in Cin7?
- Yes. When generating the MCP server URL via the Truto UI or API, you can apply method filtering by setting `methods: ["read"]`. This ensures that ChatGPT can only access list and get tools, preventing any accidental write operations to your ERP.
- How do AI agents handle Cin7's pagination constraints?
- Cin7 enforces a strict hard limit of 250 rows per page. The Truto MCP server injects `limit` and `next_cursor` parameters into the tool schemas and instructs the LLM on how to pass cursor values back unchanged to fetch subsequent pages gracefully.
- Why do Cin7 bulk update tools return opaque results to the LLM?
- When performing bulk updates, the underlying Cin7 API returns an array of batch result items containing success flags and IDs, rather than the fully updated objects. The MCP schemas reflect this reality, so the LLM knows it must make a separate GET request if it needs the full, updated record state.