How many of us wish we could start with a totally clean slate? In our heart of hearts we all wish we could rewrite from scratch all the bad code sitting out there in ether. As we all know, Enterprise AI never starts with a clean architecture. It starts with a request from leadership and a business-critical application nobody wants to touch.
The agent is expected this quarter. The VB6 pricing engine underneath it has a five-year modernization roadmap.
You don't need to finish the rewrite before the old application can participate in an AI workflow. Put a controlled interface around the business logic, expose that interface as an MCP tool, and let the agent call the code that already knows how the business works.
The friction of enterprise modernization: Generative AI models are probabilistic. They're super smart guessers which are excellent for conversational UX, summarizing text and parsing intent. But business logic (like your company's heavily customized, edge-case-ridden pricing calculator that handles 300 different volume-discount tiers) needs to be deterministic.
You really, really don't want a language model hallucinating a 40% discount for your biggest client.
For decades, that deterministic logic has been locked inside VB6, Delphi, or PowerBuilder runtimes. Instead of waiting years to rewrite those rules into modern C# and Blazor, you can leave the legacy logic right where it is and hand it to the AI as a tool.
The Model Context Protocol (MCP) is an open standard for connecting AI models to data sources. But its real superpower in the enterprise is acting as a bridge to the past.
By using MCP, you can wrap your legacy monolith and expose it as a tool that a Microsoft Foundry agent can invoke on demand. You get the conversational UX of GenAI paired with the rock-solid, battle-tested reliability of code written before the Y2K bug.
Here's the actual architecture to make this work.
You can’t point an LLM directly at a 32-bit VB6 DLL. You need a translator. We use modern .NET (e.g., .NET 10) to wrap the legacy COM objects.
Pro-tip for the veterans: Because VB6 is strictly 32-bit, your .NET bridge application either needs to be compiled for x86, or you need to configure the VB6 component to run out-of-process via a COM Surrogate (dllhost.exe).
// The Bridge: Calling a 25-year-old VB6 COM Object from .NET Type legacyType = Type.GetTypeFromProgID("LegacyApp.PricingEngine"); dynamic pricingEngine = Activator.CreateInstance(legacyType); // The deterministic business logic executes exactly as it has since 1999 decimal finalPrice = pricingEngine.CalculateDiscount(customerId, basePrice);
Once you have the .NET bridge, you expose it via the Model Context Protocol. MCP communicates over standard JSON-RPC (either via standard input/output or Server-Sent Events).
You define a strongly typed "Tool" that describes exactly what your legacy system does, what arguments it requires, and what it returns.
// Exposing the legacy logic to the AI via an MCP Tool definition var calculatePriceTool = new McpTool { Name = "calculate_enterprise_pricing", Description = "Calculates the exact customer price including legacy volume discounts.", InputSchema = new { Type = "object", Properties = new { CustomerId = new { Type = "string", Description = "The legacy CRM customer ID" }, BasePrice = new { Type = "number", Description = "MSRP of the items" } }, Required = new[] { "CustomerId", "BasePrice" } } };
Finally, you wire this MCP server into your Microsoft Foundry environment.
When a sales rep opens a chat and types, "What's the price for ACME Corp if they buy 500 units?", the orchestration layer intercepts the request. The LLM recognizes it needs the calculate_enterprise_pricing tool. It extracts the arguments from the chat, sends the JSON-RPC payload to your .NET bridge, which fires the VB6 COM object, retrieves the deterministic calculation, and passes it back up the chain.
The AI then formulates a perfectly natural response: "Based on ACME Corp's volume tier, the total price is $4,250."
This pattern is the ultimate modernization hack.
First, you deliver immediate ROI to the business. You get a highly capable AI assistant into production before the next team donut run, rather than at the end of a multi-year slog.
But structurally, you've just accomplished something massive: You decoupled your user interface from your legacy backend.
Behind the scenes, your engineering team can now safely and incrementally strangle the old application. You can rip out that VB6 pricing engine, rewrite it into a modern, cloud-native Azure microservice, and simply update the MCP tool routing. The AI agent, and the end user won't even notice the cutover.
You built an entirely new, AI-native interface for it without throwing away decades of proven business rules.
Ready to stop arguing with the enterprise architecture board about five-year rewrite roadmaps and actually get AI into production?
The Strangler Fig pattern is just step one. At GAPVelocity AI, we specialize in dragging decades-old legacy tech debt into the modern era. We know exactly what it takes to turn monolithic spaghetti into high-velocity, cloud-native architecture.
Before you let an LLM guess its way through your core business logic, you need a plan. Download our Definitive Enterprise Modernization Checklist to learn exactly how to map your legacy dependencies, isolate your business rules, and build your first MCP bridge today.