> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/integrations/mcp-servers/mcp-server-onx.md).

# onX MCP Server

This fulfillmenttools MCP Server provides a standardized interface for interacting with fulfillmenttools. Built on the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) and implementing the [Order Network eXchange](https://ordernetworkexchange.io/) (onX) Protocol, it enables system-to-system communication, letting AI agents, orchestration layers, and external platforms manage orders in natural language without relying on proprietary APIs.

Designed for agentic commerce applications, the onX MCP Server exposes tools AI agents can invoke to query inventory, for example, on user instruction or as part of automated workflows.

**Example interactions:**

* What's the current stock level for SKU-12345?
* Show me all products in the electronics category
* List available variants for product PRD-001
* Check inventory availability across all facilities

The onX MCP Server acts as a protocol adapter. It doesn't implement business logic, infer missing data, or modify requests or responses. It transparently passes them between the AI agent and the fulfillmenttools backend.

## Using the onX MCP Server with an agent

The onX MCP Server allows any compatible agent (for example, [Claude Desktop or Claude Code](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)) to securely access and interact with onX functionality in a standardized way.

To use this feature, you first need to make the onX MCP Server known to the agent you plan to work with.

The following example describes the general setup using the onX MCP server, as demonstrated with a Claude agent. The same steps apply to other agents that support MCP integration.

{% stepper %}
{% step %}
**Agent connection**

Start by configuring your agent to recognize the onX MCP Server endpoint.

This typically involves adding the onX MCP server URL and name (for example, `ocff-myproject.mcp.api.fulfillmenttools.com/onx`, replace `myproject` with your fulfillmenttools `projectId`) to the agent's MCP or tools configuration.

<div><figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FT2HhmB0bhI7B99UvZohu%2FGroup%201.png?alt=media&amp;token=1ef71086-6773-4f3d-853a-54135145e0b1" alt=""><figcaption></figcaption></figure> <figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2F48ICLUY3aM6a31Gwjp9E%2FGroup%203.png?alt=media&amp;token=77617992-cec7-48e8-85d6-a221afdf25ac" alt=""><figcaption></figcaption></figure></div>

Once configured, the onX MCP Server is available, and your agent can call onX capabilities via the onX MCP Server. Connect to it to complete this step.
{% endstep %}

{% step %}
**Authorization**

You'll either need to configure a token for your agent or log in on your first interaction with the service by providing your credentials in a fulfillmenttools login form. See the [Authentication section below](#authentication) for more information.

Successful authorization ensures the agent can securely make requests to the fulfillmenttools MCP Server on your behalf.

<div data-with-frame="true"><figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FOVxaBQuVBAE5EYeaNkh1%2FMCP%20log%20in%20screen.png?alt=media&amp;token=564eacd8-56c8-44a2-8df0-8a8651f7158d" alt="" width="118"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Interaction**

After you complete configuration and authorization, the agent can start interacting with onX through the fulfillmenttools onX MCP Server. When you ask the agent to perform an onX-related task, it uses the onX MCP Server in the background to retrieve data or trigger actions. It returns the results directly in its response.

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2F3i3QLvVZQtLUXee68Ony%2FScreenshot%202026-05-07%20at%2016.39.47%201.png?alt=media&amp;token=7b1fc37e-88ff-4d1d-80cc-dabbbf7b3b03" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

The video below shows a working example:

{% embed url="<https://www.youtube.com/watch?v=PpFZCLpcJEk>" %}

## Intended usage and primary user audience <a href="#intended-usage-and-primary-user-audience" id="intended-usage-and-primary-user-audience"></a>

### Target audience <a href="#target-audience" id="target-audience"></a>

| Audience                   | Use case                                                        |
| -------------------------- | --------------------------------------------------------------- |
| Inventory managers         | Query stock levels and availability across facilities           |
| Merchandising teams        | Access product catalog and variant information                  |
| eCommerce platforms        | Integrate inventory and product data into automated workflows   |
| Developers and integrators | Build agentic commerce applications using fulfillmenttools data |

### Primary use cases <a href="#primary-use-cases" id="primary-use-cases"></a>

* **Inventory queries**: Check stock levels and availability across facilities
* **Order and return queries**: Check order and return information
* **Shipment tracking**: Shipments, parcels, carriers, and tracking information
* **Product catalog access**: Retrieve product information and metadata
* **Variant lookup**: Query product variants and their attributes
* **Agentic workflows**: Enable AI agents to access fulfillment data for automated decision-making

### Future target audiences <a href="#future-target-audiences" id="future-target-audiences"></a>

The following audiences will be supported as additional tools are implemented in the future:

| Audience                  | Use case                                         | Planned tools                         |
| ------------------------- | ------------------------------------------------ | ------------------------------------- |
| Customer service teams    | Handle order inquiries and process cancellations | Order queries, cancel orders          |
| Operations managers       | Monitor order status and fulfillment progress    | Order queries, fulfillment operations |
| eCommerce administrators  | Create and manage orders through AI workflows    | Create order, update order            |
| Returns and support teams | Process customer returns and refunds             | Return processing                     |

## User interaction model <a href="#user-interaction-model" id="user-interaction-model"></a>

### Authentication <a href="#authentication" id="authentication"></a>

Every request to the server requires authentication. The agent acts on behalf of a user, not on its own, so the server enforces the [OAuth 2.1](https://oauth.net/2.1/) Authorization Code Flow with PKCE and disallows the implicit and ROPC flows.

See the [MCP servers article](https://docs.fulfillmenttools.com/documentation/integrations/mcp-servers.md#usage) for authentication options.

### Permissions

Access to this service requires the user to have the following permissions:

| Permission           | Right | Value in API                          |
| -------------------- | ----- | ------------------------------------- |
| Stock availabilities | Read  | `STOCK_AVAILABILITIES_READ`           |
| Listing              | Read  | `LISTING_READ`                        |
| Orders               | Read  | `ORDER_READ` and `ADMIN_MODULES_READ` |
| Fulfillments         | Read  | `SHIPMENT_READ` and `CARRIER_READ`    |
| Returns              | Read  | `RETURN_READ`                         |

More information can be found in the [Users, roles, and permissions article](https://docs.fulfillmenttools.com/documentation/getting-started/authentication-and-authorization/user-management.md#users-roles-and-permissions).

### Allowed and expected data <a href="#allowed-and-expected-data" id="allowed-and-expected-data"></a>

The onX MCP Server accepts structured data through its standardized tools:

#### **Query tools (read operations)**

| Operation              | Expected input                 | Returns                                   |
| ---------------------- | ------------------------------ | ----------------------------------------- |
| `get-inventory`        | Facility ID or filter criteria | Stock levels and availability             |
| `get-products`         | Product ID or filter criteria  | Product catalog records                   |
| `get-product-variants` | Product ID or variant filters  | Product variant details                   |
| `get-orders`           | Order ID or filter criteria    | Order details                             |
| `get-fulfillments`     | Shipping ID or filter criteria | Shipping details and tracking information |
| `get-returns`          | Return ID or filter criteria   | Return details                            |

All inputs must conform to the [onX protocol schema](https://github.com/commerce-operations-foundation/mcp-reference-server/tree/develop/schemas). fulfillmenttools validates requests against this schema before forwarding them to the backend.

### Data flow <a href="#data-flow-description" id="data-flow-description"></a>

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FCIEfjzsbG1X438KmMAY2%2FMCP%20data%20flow.png?alt=media&amp;token=9f1f13ac-2776-4a32-b96b-6695c617f0c8" alt=""><figcaption></figcaption></figure>

**Data flow steps:**

1. **User request**: User issues a natural language request to the AI agent
2. **AI interpretation**: The AI parses the intent and invokes the appropriate MCP tool with structured parameters
3. **Protocol translation**: The onX MCP Server validates the request against the onX specifications and translates it to the fulfillmenttools API format
4. **Backend execution**: fulfillmenttools processes the request against the production data
5. **Response return**: Results flow back through the onX MCP Server to the AI agent
6. **Human-readable output**: The AI presents the information in natural language to the user

## Output characteristics and limitations <a href="#output-characteristics-and-limitations" id="output-characteristics-and-limitations"></a>

### Output description <a href="#output-description" id="output-description"></a>

**Response characteristics:**

* **Structured format**: All responses follow consistent JSON schemas defined by the onX Protocol specification
* **Transparent errors**: Backend errors are returned exactly as received, without modification or interpretation
* **Data currency**: Query results reflect the current state in fulfillmenttools at the time of the request

**Response types:**

| Operation type | Success response                      | Error response                      |
| -------------- | ------------------------------------- | ----------------------------------- |
| **Queries**    | Requested data in a structured format | Error code and message from backend |

### Known limitations <a href="#known-limitations" id="known-limitations"></a>

| Limitation                 | Description                                                              | Workaround                                                                            |
| -------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| **Read-only operations**   | Only query tools (inventory, products, variants) are currently available | Use fulfillmenttools APIs and clients for order management and other write operations |
| **No real-time streaming** | Results are returned as complete responses, not streamed                 | Use polling for status updates on long-running operations                             |
| **No file attachments**    | Can't upload or download files such as invoices or shipping labels       | Access documents through the fulfillmenttools clients or via APIs                     |
| **No data inference**      | fulfillmenttools won't guess or auto-fill missing information            | Provide all required fields in requests                                               |

fulfillmenttools reserves the right to impose usage quotas on this feature.

Using unimplemented operations returns a `FEATURE_NOT_AVAILABLE` response with guidance on alternatives.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fulfillmenttools.com/documentation/integrations/mcp-servers/mcp-server-onx.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
