Why this works
UML Forge uses Claude, which understands decades of programming history β including COBOL, Fortran, Ada, RPG IV, PL/1, MUMPS, and Assembly. Unlike IDE-based tools that require a working compiler, UML Forge works from code text and descriptions, making it the only MCP diagramming tool that handles legacy systems out of the box.
Supported legacy languages: COBOL (ANSI 85, COBOL 2002), Fortran (77, 90, 95, 2003), Ada (83, 95, 2005, 2012), RPG IV / ILE RPG (IBM AS/400), PL/1, MUMPS/M (OpenVMS, CachΓ©), Assembly (x86, Z80, IBM S/360 macro), BASIC, Pascal, Delphi.
The modernisation workflow
The recommended four-step workflow:
Step 1 β Diagram the legacy system
Paste COBOL/Fortran/Ada snippets into umlforge_reverse_engineer. Get class, sequence, and state diagrams that document what the code actually does.
Step 2 β Identify bounded contexts
Use the class diagram to draw boundary lines around logically cohesive groups. Each boundary becomes one modern microservice or module.
Step 3 β Hand diagrams to your AI coding agent
Provide the Mermaid diagrams as a spec: "Implement this class diagram in Python/Go/TypeScript." The agent has a precise blueprint β not a vague description.
Step 4 β Validate behaviour
Use umlforge_api_sequence to diagram the new system and compare it against the original. Any divergence in sequence diagrams reveals missed behaviour.
COBOL example
Paste your COBOL source directly into the codebase field. The tool maps COBOL constructs to modern diagram concepts:
| COBOL construct | Diagram concept |
|---|---|
| FD + 01 record | Class with attributes |
| 88-level condition | Boolean method (isActive, isSuspended) |
| WORKING-STORAGE | Shared state / fields |
| PARAGRAPH | Method in sequence diagram |
| PERFORM loop | Loop fragment in sequence |
``
Use umlforge_reverse_engineer with:
- codebase: """
IDENTIFICATION DIVISION.
PROGRAM-ID. CUSTORD.
DATA DIVISION.
FILE SECTION.
FD CUSTOMER-FILE.
01 CUSTOMER-RECORD.
05 CUST-ID PIC 9(6).
05 CUST-NAME PIC X(40).
05 CUST-STATUS PIC X.
88 CUST-ACTIVE VALUE 'A'.
88 CUST-CLOSED VALUE 'C'.
PROCEDURE DIVISION.
MAIN-PARA.
PERFORM PROCESS-ORDERS UNTIL END-OF-FILE
STOP RUN.
PROCESS-ORDERS.
READ CUSTOMER-FILE
IF CUST-ACTIVE
PERFORM APPROVE-TRANSACTION.
"""
- max_nodes: 15
``
Fortran example
Fortran modules and derived types map cleanly to classes. The tool also captures LAPACK/BLAS external dependencies as labelled external nodes.
``
Use umlforge_reverse_engineer with:
- codebase: """
MODULE solver_module
USE mesh_module
TYPE :: FESolver
TYPE(Mesh) :: mesh
REAL(8), ALLOCATABLE :: global_K(:,:)
REAL(8), ALLOCATABLE :: displacement_vector(:)
CONTAINS
PROCEDURE :: assemble_global_stiffness
PROCEDURE :: solve_linear_system
PROCEDURE :: check_yield_criterion
END TYPE FESolver
END MODULE solver_module
"""
- max_nodes: 20
``
Ada example
Ada's protected types and task types are correctly identified as concurrent components. The sequence diagram captures entry/accept rendezvous patterns.
``
Use umlforge_reverse_engineer with:
- codebase: """
package Collision_Detector is
task type Conflict_Monitor is
entry Start (Registry : access Track_Registry);
entry Stop;
end Conflict_Monitor;
protected Conflict_Queue is
procedure Enqueue (Report : Conflict_Report);
entry Dequeue (Report : out Conflict_Report);
end Conflict_Queue;
end Collision_Detector;
"""
- max_nodes: 15
``
What you get
Three diagrams:
- Class diagram β all data structures mapped to classes with attributes, methods inferred from paragraphs/subroutines, and inheritance or composition relationships
- Sequence diagram β the dominant execution flow (main loop, primary transaction path, or interrupt handler)
- State diagram β entity lifecycle if stateful entities are found (order status, account status, task states)
Plus architectural smell flags β god classes, anemic models, tight coupling to file I/O, missing error handling β which serve as your modernisation backlog.
The smell flags are your sprint backlog. Each flag maps to a refactoring task. Work through them in priority order and the legacy system's architecture becomes progressively cleaner as you port it.