Modern AI agents are evolving fast鈥攆rom simple chatbots to autonomous systems capable of reasoning and decision-making. But even the smartest agents are only as good as the data they can access. What if your agent could tap into live, enterprise-grade data from mainframes?
In this post, we鈥檒l explore how to integrate z/OS Connect with an AI agent using the Model Context Protocol (MCP), enabling real-time access to mainframe applications and data. We鈥檒l walk through a practical example using the General Insurance CICS sample and Langflow, a low-code agent framework.
馃 Why AI Agents Need Real-Time Data
Agentic AI allows us to automate tasks that traditionally require human interpretation鈥攍ike assessing insurance claims or verifying customer details. Large Language Models (LLMs) are great at summarizing and reasoning, but they鈥檙e limited to the data they were trained on. That鈥檚 a problem when your data is:
路 Private or sensitive
路 Frequently changing
路 Locked inside existing systems like mainframes
Training an LLM on this data isn鈥檛 practical or cost-effective. Instead, we need a way to connect agents to live data sources鈥攁nd that鈥檚 where MCP and z/OS Connect come in.
馃敆 What Is MCP and How Does z/OS Connect Support It?
The Model Context Protocol (MCP) is a standard that lets AI agents interact with external tools and data sources during their reasoning process. With z/OS Connect version 3.0.98 or later, you can expose API operations as MCP Tools鈥攎aking them callable by agents in real time.
This means your mainframe APIs can become part of an agent鈥檚 decision-making toolkit.
鈿欙笍 Setting Up z/OS Connect for MCP
To enable MCP support in z/OS Connect:
1. Ensure you're running z/OS Connect v3.0.98 or later.
2. Add the feature zosconnect:mcp-1.0 to your server configuration.
<feature>zosconnect:mcp-1.0</feature>
3. Refresh the configuration.
4. Use the MCP Inspector to verify that your API operations are now available as MCP Tools.

The existing APIs already provide access to customer and policy data via CICS programs. With MCP enabled, these APIs become tools your agent can invoke dynamically.
馃 Building the AI Agent with Langflow
You can use any agent framework that supports MCP, but we chose Langflow for its visual, low-code interface. It lets you focus on logic and integration without writing boilerplate code.
Steps:
1. Configure your LLM provider (e.g., OpenAI, Anthropic, watsonx.ai).
2. Test the agent by chatting with the model.
3. Add the z/OS Connect MCP server to the workflow.

4. Expose the MCP Tools to the agent.
Now, when you chat with the agent, it can:
路 Query live customer and policy data from CICS.
路 Use that data to reason about accident fault and insurance validity.
路 Provide responses grounded in real-time enterprise data.

馃摎 Learn More and Try It Yourself
Want to explore further? Check out the z/OS Connect MCP documentation for setup details, examples, and best practices:
馃З Final Thoughts
Integrating mainframe data into AI agents isn鈥檛 just possible鈥攊t鈥檚 powerful. With z/OS Connect and MCP, you can unlock decades of enterprise logic and data, making your agents smarter, faster, and more trustworthy.
Whether you're modernizing existing systems or building next-gen AI workflows, this approach bridges the gap between traditional infrastructure and cutting-edge intelligence.