# How to use Claude with Infor XA on IBM i

> Source: https://netray.co/integrations/infor-xa-claude
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

The cleanest way to use Claude with Infor XA is an MCP server that exposes read-only tools over Db2 for i, which Claude can call from its apps or through the API. You can run Claude through Anthropic directly, AWS Bedrock or Google Vertex AI. If data must never leave your network, run an open-weight model locally behind the same MCP server.

## System

Infor XA (on IBM i)

## Capability

claude

## Intro

Teams on XA usually reach Claude from one of two directions. A developer or analyst already uses it for code and wants it to understand the IBM i environment, or a business owner wants questions answered over live order and inventory data. Both end up needing the same thing: a controlled bridge between Claude and Db2 for i, since Claude cannot see an on-prem IBM i by itself.

That bridge is increasingly built as a Model Context Protocol server. MCP is an open protocol where a server advertises tools and Claude decides when to call them. You write the tools once, for example get_item_availability or list_open_po_lines, and any MCP-capable client can use them. This keeps the XA-specific work separate from whichever model you use now or later.

The decision that matters is where the model runs. Anthropic's API, Bedrock and Vertex each have different data-handling and residency terms. Some XA customers can accept that, and others, particularly in defense supply chains, cannot. Plan for both so you are not locked into one answer.

## Use Cases

### Ask questions over live XA data

**Description:** A planner asks which customer orders are at risk next week and why. Claude calls MCP tools for orders and allocation and answers with the order numbers it used.

### Understand legacy RPG and CL

**Description:** Developers paste or upload RPG source for a custom program and ask for a plain-English explanation, a call map, or a test plan before changing it. Source is code, not transaction data, which often eases approval.

### Generate Db2 for i SQL and views

**Description:** Claude drafts SQL over the XA files using your column glossary, which developers then test and deploy as views.

### Summarise long supplier or quality threads

**Description:** With documents attached, Claude produces a concise history of an NCR or a delivery dispute, linked to the PO and lot it found through tools.

### Plan an upgrade or migration

**Description:** Feed Claude inventories of customisations and interfaces and have it group them by risk and effort for a move to CloudSuite or a newer XA release.

## System Surface

Db2 for i via the jt400 JDBC driver is the simplest backbone for an MCP server's read tools. Run the server on a host separate from the IBM i.

For logic that lives in RPG, such as pricing, available-to-promise or cost calculations, expose the program through IBM i Integrated Web Services or a stored procedure so the MCP tool calls the real rule, not a re-implementation.

MCP supports local stdio servers for a single user's desktop and remote HTTP servers for shared use. A team deployment normally uses the remote form with authentication.

Source members (QRPGLESRC and similar source physical files, or IFS source if you use git) can be exported to the IFS or a repository so Claude can read code. Use a read-only copy.

If you run Infor ION, some documents and APIs may be reachable there as an alternative data path; coverage varies by XA version, so verify.

## How It Works

### Decide the hosting path for Claude

**Detail:** Choose between Anthropic's API or apps, AWS Bedrock, or Google Vertex AI based on your existing cloud agreements, region requirements and legal review. Each has its own terms on retention and training; read the current ones rather than assuming.

### Build a small MCP server

**Detail:** Using an official MCP SDK, define tools with typed inputs: item lookup, availability, open orders, PO status, shop order status. Each tool runs a parameterised query on a Db2 for i view and returns compact rows.

### Authenticate to the IBM i with a limited profile

**Detail:** The MCP server connects as a read-only profile restricted to the agent views. Store the credential in a secrets vault, not in the config file.

### Authenticate users to the MCP server

**Detail:** For a shared remote server, use OAuth or your identity provider so calls are tied to a person, and map that person to a role that limits which tools they see.

### Connect Claude and test with real questions

**Detail:** Add the server as a connector in your Claude client, or call it from your own app using the API's tool use. Test with the ten questions your planners really ask, and check each answer against the XA inquiry.

### Add the local option for restricted data

**Detail:** Keep the MCP server unchanged and point an in-network open-weight model at it for conversations involving controlled data.

## Example Flows

### Planner asks about a customer's open orders

**Trigger:** Planner types: what is late for customer Acme and what is blocking it?

**Steps:**

- Claude calls list_open_orders filtered to the customer and past due.
- For each line it calls get_shortages to find the blocking components.
- It returns a table of order, item, shortage and next receipt date.

**Result:** A cited answer in seconds that previously meant four inquiry screens and a spreadsheet.

### Developer reviews a custom pricing program

**Trigger:** Ticket: discount logic gives a wrong price on one customer class

**Steps:**

- Developer exports the RPG source and related copy members to a read-only folder.
- Claude explains the control flow and highlights where customer class is tested.
- It proposes a unit test matrix and a minimal change.
- Developer reviews, compiles on a test partition and runs the tests.

**Result:** Faster diagnosis, with the change still compiled, tested and released by your own process.

## On Prem

For plants that cannot send data to any external service, keep the XA-facing MCP server and run an open-weight model on your own GPUs. MCP is model-agnostic, so the same tools work with a locally served model through an MCP-capable client, and you give up the hosted Claude models for that portion of work. Teams often split the use: hosted Claude for code and non-sensitive questions, a local model for anything touching controlled part data. Host both the MCP server and the model in the same network segment as the IBM i, with no outbound internet route for the sensitive tier, and update model files through an approved transfer.

## Security

- Use a read-only IBM i profile with authority on views only, and rotate its credential from a vault.
- Authenticate each MCP user and scope tools by role; do not share one long-lived token.
- Log every tool call with user, arguments and row count, and review the logs regularly.
- Confirm data residency and retention terms for your chosen path (Anthropic API, Bedrock or Vertex) with legal before connecting live data.
- Treat text coming back from the database or documents as untrusted so a malicious note cannot steer tool calls.

## Options

### Build your own MCP server on jt400

**Fit:** You have in-house IBM i and Python or TypeScript skills and want control.

**Effort:** A useful read-only server in a couple of weeks; production hardening takes more.

### Use a generic database MCP server over Db2 for i

**Fit:** Quick experiments by technical users who understand the schema.

**Effort:** Fast to start, but exposes raw tables and weak guardrails, so not for business users.

### Engage a partner such as Netray for a governed build

**Fit:** You want business-ready tools, a local-model option and guardrails without building the stack.

**Effort:** Scoped pilot on one or two workflows, with your XA owner providing data definitions.

## Pitfalls

- Exposing a generic run-SQL tool. Claude will write plausible but wrong joins over cryptic files; expose named business tools.
- Skipping the check on RPG-calculated values. The table may hold a base quantity while the screen shows a derived one.
- Sending whole source libraries to a hosted model without reviewing licensing and contractual restrictions on your own code.
- Leaving the MCP endpoint reachable from the internet without authentication during a demo.

## Faq

### Does Claude have a native Infor XA connector?

**Answer:** Not that we can point to for XA on IBM i. The practical route is an MCP server you build or commission over Db2 for i, which Claude's connector support can call. Check current Claude and Infor documentation, since connector availability changes over time.

### Should I use the Anthropic API, Bedrock or Vertex?

**Answer:** Pick based on where your other workloads and agreements already sit, region and residency needs, and procurement. The XA side, your MCP server, stays identical. Review each platform's current data-handling terms, because they differ and change.

### Can Claude read our RPG source?

**Answer:** Yes, once the source is exported to text files. It can explain control flow, find where a field is set and suggest tests. Compile and test on a non-production partition yourself, and review company and customer restrictions on sending code to a hosted service first.

### What if our data cannot leave the building?

**Answer:** Keep the MCP server and use an open-weight model hosted on your own GPUs. You lose access to hosted Claude for those workloads but keep the same tools and governance. Many sites run both, split by data sensitivity.

### Is MCP safe to expose to business users?

**Answer:** It can be, if tools are read-only, scoped by role, authenticated per user and logged. The risk is a broad tool such as arbitrary SQL. Offer named business tools and keep write actions behind human approval outside the chat.

## Search terms

infor xa claude, claude for infor xa, claude ibm i erp, claude mcp as400, anthropic claude manufacturing erp, claude db2 for i, claude bedrock erp on-prem data, infor xa llm integration, use claude with legacy erp

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
