Legacy COBOL systems, critical to enterprise operations, face modernization challenges due to undocumented business logic, retiring developers, and high costs. This paper proposes the Mainframe Context Aware Protocol (MCAP), a hypothetical framework extending Anthropic’s Model Context Protocol (MCP) and Google’s Agent2Agent (A2A) protocol to enable secure, context-aware COBOL-to-Java modernization. MCAP orchestrates multi-agent workflows, preserves business logic, and ensures compliance. Through a conceptual architecture, design principles, and a claims processing use case, we explore MCAP’s potential. Research questions and a development roadmap are outlined, inviting collaboration to validate this approach.
Legacy COBOL systems power critical enterprise functions, processing $3 trillion in daily transactions and 95% of ATM operations (IBM Research, 2023). However, a shrinking developer pool, undocumented logic, and $1.52 trillion in U.S. technical debt (RTInsights, 2023) hinder modernization. Traditional methods struggle to preserve institutional knowledge, leading to high failure rates (Ars Technica, 2023).
Large Language Models (LLMs) show promise, with tools like IBM’s watsonx Code Assistant (CROZ, 2024) and CloudFrame’s CodeNavigator (CloudFrame, 2024) achieving functional equivalence in COBOL-to-Java conversion. Yet, LLMs lack secure access to mainframe context, risking logic corruption. This paper proposes the Mainframe Context Aware Protocol (MCAP), extending Anthropic’s MCP (Anthropic, 2024) and Google’s A2A protocol (Google Cloud, 2025), to enable AI-driven modernization.
COBOL systems face:
LLMs require a protocol to access mainframe context securely, preserving logic and ensuring compliance.
MCP, an open standard by Anthropic, uses JSON-RPC 2.0 to connect AI agents to tools and data (Anthropic, 2024). It offers:
A2A, an open-source protocol announced by Google at Cloud Next 2025, enables AI agents from different vendors and frameworks to collaborate (Google Developers, 2025). Backed by over 50 partners (e.g., Salesforce, SAP), A2A uses HTTP and JSON-based “Agent Cards” for:
MCAP extends MCP and A2A for mainframe modernization, orchestrating secure, context-aware AI workflows.
| Principle | Implementation Hypothesis | Benefit | |———–|————————–|———| | Context Fidelity | Maintain semantic relationships | Preserve business logic | | Incremental Safety | Modular transformation with checkpoints | Reduce risk | | Collaborative Intelligence | Human-AI validation | Combine AI efficiency with expertise | | Protocol Extensibility | Built on MCP/A2A standards | Leverage existing infrastructure | | Audit Transparency | Traceability from source to output | Meet compliance needs |
Consider an insurance company’s COBOL-based claims system.
IF CLAIM-TYPE = 'AUTO' AND DAMAGE-AMOUNT > 25000
IF POLICY-YEARS < 3
PERFORM HIGH-RISK-REVIEW
ELSE
IF CUSTOMER-CLAIMS-COUNT > 2
PERFORM FRAUD-CHECK
END-IF
END-IF
END-IF
CLAIM-TYPE: STRING
).@Component
public class ClaimRiskAssessment {
public ReviewDecision assessAutoClaimRisk(Claim claim, Policy policy, Customer customer) {
if (claim.getType() == ClaimType.AUTO && claim.getDamageAmount() > 25000) {
if (policy.getYearsActive() < 3) {
return ReviewDecision.HIGH_RISK_REVIEW;
} else if (customer.getClaimCount() > 2) {
return ReviewDecision.FRAUD_CHECK;
}
}
return ReviewDecision.STANDARD_PROCESSING;
}
}
{
"AgentCard": {
"id": "CodeOptimizerAgent",
"capabilities": ["java_optimization"],
"task_types": ["optimize_code"],
"endpoint": "https://optimizer-agent.example.com/api"
}
}
MCAP offers a visionary approach to legacy modernisation, leveraging MCP and A2A to preserve context and ensure safety. We invite enterprise architects, AI researchers, and legacy experts to collaborate on validating this hypothesis. Share your insights on LinkedIn or contact us to explore this research direction.