Mainframe modernization normally starts with senior COBOL engineers spending weeks manually reading code to reconstruct business logic and map dependencies — slow, expensive, and inconsistent, and that expertise is getting scarcer every year. This assistant is part of Syntphony Insurance Cloud Migration, where those estates carry decades of encoded policy and claims logic that has to survive the move to cloud intact.

Generic text handling destroys COBOL: it splits mid-paragraph and mid-COPY statement and loses the structure any useful answer depends on. So the core of this system is a structure-aware parser that understands COBOL’s divisions and JCL step boundaries, expands COPYBOOKs inline, and keeps everything tagged with program, paragraph, and line range — because every answer has to cite exactly where it came from. A static-analysis dependency graph (CALL statements, COPY references, JCL EXEC PGM= links) answers the structural questions, like “what does this program call?”

There is no vector store here, and that is the design. Rather than embedding the estate and retrieving by similarity, the codebase is exposed to the model as MCP tools — search_code, get_dependencies, get_copybook, get_impact — which the model calls to fetch exactly the code it needs and pulls back into its own context. An index would start drifting the moment it was built, since the corpus is client-specific and changes as modernization proceeds; a tool call reads the estate as it currently stands. It also makes citation exact rather than probabilistic — the answer points at the program, paragraph and line the tool actually returned. A2A handles collaboration between the agents working on top of those tools.

MCP tool access to a mainframe codebaseA question reaches the model, which calls MCP tools rather than searching an index. The tool server exposes search code, get dependencies, get copybook and get impact. Those tools read two things built directly from the estate: a structure-aware COBOL and JCL parser that understands divisions, paragraphs and COPYBOOK expansion, and a static dependency graph of CALL, COPY and JCL EXEC PGM links. Results return into the model's context carrying the program, paragraph and line they came from, so the answer cites an exact location instead of a similarity match.Questionnatural languageModelcalls toolsMCP tool serversearch_code · get_impactget_dependenciesget_copybookStructure-aware parserdivisions · paragraphsCOPYBOOKs expandedDependency graphCALL · COPYJCL EXEC PGM=cited source back into context
No index in the middle. The model asks the estate directly, and every answer carries the program, paragraph and line it came from.

Source containment was a hard constraint on this engagement: the estate could not leave the client boundary, which rules out shipping code to an external service to be indexed. Reaching the codebase in place through tools satisfies that by construction rather than by policy.

My role: designed the code-intelligence architecture — the structure-aware parser, the dependency-graph extraction, and the MCP tool schemas the model reaches the estate through; architected the MCP/A2A multi-agent system.

Stack: Azure OpenAI, MCP, A2A, custom Python COBOL/JCL parser, FastAPI.