Skip to content

Solutions / Use case

Legacy system integration for AI agents, no rewrite.

An ERP on a local server, a SOAP service, a database older than your cloud: Tray turns each into a governed MCP tool your agents can use.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.

Jump to the stages
One legacy system used by an agent: Claude asks whether part 4471 is in stock, the tool is on the server's allowlist and read only, Tray reaches the ERP's SQL Server database on a local server, and the call is logged in Splunk with its arguments and result.

The short answer

What is legacy system integration for AI agents?

Legacy system integration for AI agents connects older systems, such as an on-premise ERP, a homegrown database or a SOAP service, to AI agents through governed tools. Tray.ai does it without a rewrite: it connects the system through the interface it already has, wraps each job as a narrow MCP tool, and publishes it through Agent Gateway. Credentials stay with Tray, each tool is scoped to one job, and every call is logged. The old system stays where it is.

  1. 01 Find the door
  2. 02 Connect
  3. 03 Stabilize
  4. 04 Publish
  5. 05 Control access
  6. 06 Approve and log

Tray by the numbers

apps, databases, APIs, and services Tray connects to, each able to become a governed MCP tool
12,000+
raw database access left at J.W. Pepper after moving MCP onto a managed path
0
governed workflows in place of 500+ MCP tools at J.W. Pepper
~20

Legacy system integration for AI, stage by stage

Each stage is a decision a team makes before an agent touches an old system.

  1. 01

    Find the way in

    Every old system exposes something, whether a web service, a database, a message queue or a nightly file. List what each one offers and pick the safest way to read it.

    Where it breaks: Nobody is sure the ERP has an API, so the agent project waits on a rewrite quote.

  2. 02

    Reach it

    Use the prebuilt connection where there is one. Where there isn't, the HTTP, SOAP, database and file connectors cover the rest, and on-premise connectivity reaches systems behind your firewall.

    Where it breaks: The system sits on a server that accepts no inbound traffic, so no cloud AI tool can call it.

  3. 03

    Put a stable contract in front

    Give agents and apps one clean interface, and keep the old quirks behind it. A renamed field or a file format change is absorbed in one place.

    Where it breaks: The old system renames a field, and every tool that read it fails in a different way.

  4. 04

    Publish each job as an MCP tool

    One tool per job, such as "check stock" or "look up a policy", with the fewest inputs that do it. Agent Gateway serves it to Claude, ChatGPT, Copilot Studio or your own agents.

    Where it breaks: An open query tool hands the agent every table the login can see.

  5. 05

    Decide who can call what

    Each server is open to named groups, each tool runs as the person asking or as a service account, and reads and writes are separate tools.

    Where it breaks: A shared service account lets everyone's agent write to the ERP.

  6. 06

    Approve and log every action

    Writes that reach a customer or the ledger wait for a person, and every call is logged with who asked, the arguments and the result, then streamed to your SIEM.

    Where it breaks: An agent changes a purchase order, and the only log says a service account called the API.

Three ways to bring legacy systems to AI

  • Rewrite or replace them first. Clean in theory, and it takes years of budget before an agent can use anything. The agents wait, and the old system keeps running anyway.
  • Hand each agent a login. Quick to demo. Every agent holds a broad credential to a system never designed for it, with no record of what it did.
  • Put a governed tool in front. The old system stays where it is. Tray connects it, wraps each job as a narrow MCP tool, and publishes it through Agent Gateway, Tray’s MCP gateway, with credentials held by Tray and every call logged.

Any of the 12,000+ apps, databases, APIs, and services Tray connects to can become a governed MCP server tool, and so can an API with an OpenAPI spec. Connectivity covers how Tray reaches older systems, including those behind your firewall, with the HTTP, SOAP and database connectors for systems that have no prebuilt connection. API management covers the spec-to-tool route.

Connecting the ERP to the systems around it is ERP integration. Moving legacy data into the warehouse is data integration. This page is the third job: letting AI agents use those systems, under control.

Who may call which tool is covered in AI and MCP governance, and the same pattern for Salesforce and HubSpot is in MCP for CRM. To build the agents that use these tools, see Tray Helix Agents. To start, book a demo and bring one old system, or try it on Tray Free.

Connectivity for older systems

The kinds of systems this page covers. Each links to its Tray page.

Older ERP and finance systems

Many run on a server in your own data center.

Databases

Read and write the database behind an app that has no API.

Web services, files and queues

The interfaces older systems actually expose.

Anything not listed connects through the full connector library, or directly through its API.

Teams running legacy system integration for AI on Tray

IT approves what's built, enforces policies and permissions, versions it, and publishes. We get centralized visibility and auditability across the MCP Servers and Tools we deploy.
Marcus Dubreuil
Enterprise Architect, AI & Automation Strategy, J.W. Pepper

Frequently asked questions

How do I connect a legacy system to an AI agent?

Connect the system through what it already exposes: a web service, a database or a file drop. Wrap each job, such as "check stock", as one MCP tool, and publish it through Agent Gateway. Tray holds the credentials, the tool is scoped to one job, and every call is logged with its arguments and result. Start with read-only tools, and add a write tool only where it earns its place, with a person approving anything that reaches a customer or the ledger.

Can MCP work with on-prem systems?

Yes. Tray is a managed cloud, and on-premise connectivity reaches systems inside your network. An on-premise agent runs in your network and makes outbound connections only, so no inbound firewall rules are needed. The data stays where it is, and Tray serves the answer to the agent through a governed MCP tool.

How do I turn a SOAP or REST API into an MCP tool?

For a SOAP service, the SOAP connector reads the WSDL and lists its methods, and you publish the ones an agent needs as MCP tools. For a REST API with an OpenAPI or Swagger spec, the Tray CDK builds a connector from the spec, and Agent Gateway exposes it as a governed MCP tool. For a REST API without a spec, the HTTP connector calls it, and you publish the call as a tool. The model never sees the API or its credential.

What if the legacy system has no API?

Most have another door. Database connectors, including JDBC, read and write the tables behind an app, the FTP connector handles file exchanges, and the HTTP connector calls any web endpoint. Where the system has none of those, tell us how data leaves it today and we will show you the path.

Do we have to modernize or replace a legacy system before AI can use it?

No. Application modernization rewrites or replaces the old system, which takes years, and the agent project doesn't have to wait for it. Tray connects the system you run today and puts a governed MCP tool in front of it. If you modernize later, the tool keeps its shape and only the connection behind it changes.

Does this work for mainframe integration and IBM systems?

Yes. Once a mainframe is wrapped with an API, Tray makes that API a governed MCP tool: the HTTP connector calls the REST service, or the Tray CDK builds a connector from its OpenAPI spec, and Agent Gateway publishes it to your agents. Tray also connects to IBM i, IBM Db2 and IBM MQ, so data and queues on those systems can become MCP tools too.

Why not write a custom MCP server for each old system?

You can, and the first one is quick. By the fifth, each server has its own credentials, its own log and its own owner, and nobody can list them. Agent Gateway publishes every tool from one place, on credentials Tray holds, with one access model and one audit log. J.W. Pepper took 500+ MCP tools down to about 20 governed workflows this way.

Which page covers connecting the ERP to the systems around it?

The ERP integration page covers the handoffs between the ERP and the CRM, store, warehouse and bank. This page covers the next step, letting AI agents read from and act on that ERP and other older systems, under control.

Last reviewed 29 November 2026.

See legacy system integration for AI running on your stack.

Walk through your systems and stages with a Tray expert, or browse the how-to guides first.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.