Old system, no docs, nobody left who built it. How to wrap it in a clean API an AI can actually use
Written by
Alin Geevarghese Anil
Published on
October 9, 2026
Every company has one: the system from 2009 that runs everything and that nobody fully understands. Now someone wants AI to use it. You don't have to understand all of it. You need to understand the five things people actually do with it
Ignore what the docs say (if there are docs). Check what's actually there:
?wsdl URLSit with the people who use it and list what they do every day, like "look up a customer's last order" or "check if an invoice is paid". That list is your whole scope. Anything not on it doesn't exist yet
Don't point AI straight at the old thing. Build a thin layer that does one job per endpoint, takes simple inputs and returns plain JSON:
GET /customers/{id}/last-order
GET /invoices/{number}/statusInside, it does whatever ugly thing the legacy system needs: the SOAP envelope, the weird date format, the field called CUST_FLG_2. Outside, it looks normal
-1043? Return "invoice not found"Legacy systems often fall over under load they were never built for, and an AI calling your API in a loop is exactly that load. Cache what doesn't change often, rate limit everything, and set timeouts so one slow call doesn't freeze the rest
Once the clean API works, wrapping it as MCP tools is the easy part: one tool per endpoint, with a description that says when to use it. Serve the data dictionary as a tool too, so the model can look up what a field means instead of guessing