Mainframe API Enablement with Zowe MCP and Generative AI

Source: IBA Group•

Mainframe API Enablement with Zowe MCP and Generative AI

Learn how Zowe MCP and generative AI accelerate mainframe API enablement, exposing COBOL business logic through secure REST APIs without replacing core systems.

2. Mainframe API Enablement in Practice: An Insurance Scenario

A practical example of mainframe API enablement is an insurance provider that needs to make existing pricing and risk logic available to external digital marketplaces. The business logic remains in the legacy COBOL environment, but new channels require access through a modern REST API.

3. Choosing and Implementing Mainframe API Enablement

The insurance scenario above illustrates a broader modernization decision: when valuable business logic remains in the mainframe but needs to be accessible to new channels, how much of the existing core actually needs to change?

Q: When is mainframe API enablement a better option than core system replacement?

A: Mainframe API enablement is often a better option when the existing core remains stable and valuable, but its business logic needs to be accessible to digital channels, cloud services, partners, or new applications. It allows enterprises to modernize integration without making core system replacement a prerequisite for digital transformation.

When API enablement is the appropriate modernization path, the next challenge is implementation. Traditional approaches can require a senior developer to spend weeks manually parsing thousands of lines of legacy code, documenting complex data mappings, and creating custom wrapper infrastructure. This reliance on manual code analysis and bespoke mapping files can become difficult to scale when organizations need to expose multiple core legacy services under tight resource constraints.

In an agentic workflow, generative AI can analyze the legacy codebase, map underlying data structures, and generate API contracts, reducing this manual bottleneck. This approach is particularly relevant when specialized mainframe talent is scarce, time-to-market is critical, and accurate data mapping is essential.

IBA Group specialists design transformation pipelines, prompt frameworks, code templates and snippets for AI agents, semantic data mappings, and cross-platform validation frameworks.

4. The Solution Blueprint: Mainframe API Architecture & AI-Assisted Development

For scenarios such as the insurance example above, the next question is how to expose existing mainframe business logic through modern APIs while integrating AI-assisted development into the process.

Q: How can enterprises expose mainframe applications through APIs without rewriting core COBOL code?

A: A specialized REST translation layer allows enterprises to process inbound web requests without changing existing application code. It provides data translation, low-latency access, encryption, and access controls while keeping the core business application unchanged.

Implementing this approach requires a layered architecture that combines mainframe API access, enterprise security, and AI-assisted development. The following components support this architecture:

This architecture marks a shift from passive text generation to autonomous action. With a Zowe MCP Server, the AI assistant is no longer confined to generating disconnected code fragments. It can read mainframe code, locate relevant copybooks, generate corresponding API profiles, and execute deployment and verification commands across the z/OS environment.

Designing the target API schema, mapping complex data transformations, and enforcing architectural guardrails still requires specialized integration knowledge. IBA Group ensures that exposed REST endpoints integrate into the enterprise’s wider hybrid-cloud environment.

5. Building the AI-Assisted Development Pipeline

The architecture described above requires more than connecting an AI assistant to mainframe resources. It must be integrated into the existing development environment, provided with the right context, and governed throughout the development lifecycle.

This is particularly relevant as organizations face a shrinking pool of senior COBOL engineers. Zowe MCP provides an interface through which cloud and web developers can interact with mainframe assets inside VS Code and modern CI/CD pipelines, while senior mainframe specialists remain focused on core architecture.

The pipeline includes three core capabilities:

IBA Group provides ongoing framework setup, customized toolchain integration, and comprehensive knowledge transfer, upskilling internal teams and delivering managed services to maintain and optimize the API layer as business logic evolves.

6. Step-by-Step AI-Assisted Implementation Workflow

The following workflow illustrates how the AI-assisted architecture described above can be used to create a REST API connecting modern web and mobile channels to a legacy COBOL backend.

Step 1: AI Analysis & Code IngestionGitHub Copilot uses Zowe MCP Server tools to securely inspect the target z/OS environment and locate relevant legacy COBOL or PL/I program structures and copybooks.

Step 2: Dual-Code GenerationThe AI engine generates CICS JSON schemas, a web services logic wrapper program separated from business logic, and the accompanying Node.js REST implementation application code.

Step 3: Automated Lifecycle ExecutionThe AI uses Zowe MCP capabilities to compile and package the application. It bundles the assets, pushes them to a staging z/OS environment, runs compilation jobs, and automatically parses execution logs to catch and fix any build or code errors before deployment.

Step 4: Zowe Deployment OrchestrationOnce the bundle is fully verified, the engineering team uses Zowe MCP to execute the actual deployment. They push the stable, pre-built package into the target environment and initialize the CICS runtime components to make the live REST API accessible.

Step 5: Gateway RegistrationThe deployed API service is automatically discovered and cataloged within the centralized Zowe API Mediation Layer (ML) dashboard. As part of this process, the system automatically validates the service by performing a live connectivity health check to ensure the new API is callable, and verifies that its OpenAPI/Swagger documentation is properly loaded and accessible.

Post-Deployment Verification and Stability

Once the API is deployed, the focus shifts from implementation to verifying its behavior against the legacy core using production-like environments and isolated simulation techniques.

Q: How can enterprises verify the accuracy and stability of AI-generated mainframe APIs after deployment?

A: The generated API should be validated against the legacy core under production-like conditions to ensure consistent behavior, data fidelity, and business accuracy.

IBA Group supports this validation by using the AI agent to add unit tests to the REST wrapper application code and by designing and executing automated regression testing suites that validate data conversion between JSON payloads and COBOL copybooks.

7. Security, Governance, and AI Pipeline Guardrails

Implementing an AI-assisted development pipeline within core financial architecture requires compliance, data governance, and security controls.

Q: How can enterprises securely use AI agents for mainframe API development?

A: AI agents should operate within controlled environments, with safeguards governing access to proprietary code, interactions with mainframe infrastructure, code validation, and deployment. Existing enterprise and z/OS security controls remain part of the architecture.

Protecting Proprietary Mainframe Code

Corporate copybooks may contain sensitive, regulatory, and proprietary business rules that must remain within controlled environments. An enterprise AI orchestrator manages the workflow and communicates with the mainframe through a secure, private Zowe MCP Server.

The architecture can run on public cloud models, private cloud models, or fully disconnected, air-gapped environments. For organizations with strict compliance, financial data privacy regulations, or intellectual property restrictions regarding legacy COBOL source code, the architecture can use an isolated, secure environment. In air-gapped environments and appropriate enterprise AI configurations, code ingestion and generation can remain within controlled environments, with data retention disabled and public model training blocked.

IBA Group sets up, sandboxes, and configures the Zowe MCP infrastructure and LLM endpoints in line with corporate data privacy requirements.

Controlling AI Actions on Mainframe Infrastructure

AI cannot operate as an unvetted black box executing actions on core production assets. The architecture therefore addresses this by implementing Zowe MCP as a governed middleware layer positioned between the LLMs and live infrastructure.

By leveraging the Model Context Protocol (MCP) standard, Zowe MCP provides the necessary security boundaries and precise mainframe access controls required to mediate every action the AI attempts to perform on the z/OS environment.

IBA Group engineers the DevSecOps pipeline by building automated verification scripts, code-review gates, and deployment playbooks that govern AI-assisted activities from VS Code to the CICS region.

Applying Existing Mainframe Security Policies

AI-built services must not bypass existing mainframe security controls. When generated code integrates with the Zowe API Mediation Layer, API calls use enterprise Single Sign-On (SSO) and map to standard z/OS security managers such as RACF, ACF2, or Top Secret. Access rights remain centralized and auditable.

IBA Group configures Zowe API ML to federate modern token-based web security into traditional mainframe credentials.

8. Business Benefits of AI-Assisted Mainframe API Enablement

By combining Zowe MCP with generative AI pipelines, enterprises can accelerate API enablement while keeping core business logic and existing security controls in place. This approach allows banks and insurance companies to extend existing mainframe capabilities to modern digital channels while broader modernization continues.

An agentic, AI-assisted approach can provide the following business and operational benefits:

Together, these capabilities provide a practical path to modernizing mainframe access without making core system replacement a prerequisite.

Planning Mainframe API Enablement?

Whether you need to expose existing mainframe functionality to digital channels, modernize legacy integrations, or explore how AI-assisted development can accelerate API enablement, share your requirements using the form below, and our mainframe team will get in touch.

What this article says