Oracle Forms MCP

An MCP server that serves the content of Oracle Forms modules
(.fmb forms, .mmb menus, .pll PL/SQL libraries, .olb object libraries) found in a
directory, so AI assistants can inspect blocks, items, triggers, program units, and raw object
XML without opening Forms Builder.
Built as a Kotlin Multiplatform core (pure @Serializable models and ports) with a JVM MCP
server on top: declarative tool adapters over a single FormsService, stdio and HTTP transports,
and a fingerprint-based on-disk cache. Oracle tool conversion feeds a streaming StAX parser that
turns Forms XML into a structured index.
Why
Oracle Forms applications from the 1990s–2000s are still running critical business processes, but
their logic is locked inside binary .fmb/.pll modules that only Forms Builder can open. That
makes them opaque to modern AI tooling and painful to review, document, or migrate.
Oracle Forms MCP turns those modules into structured, queryable content so an AI assistant can:
- Understand a legacy app — enumerate blocks, items, triggers, and program units without a Forms IDE.
- Review & document PL/SQL — pull decoded trigger and program-unit bodies straight into the model's context.
- Assist modernization — feed decades-old business logic to an assistant for migration to APEX,
Java, or a rewrite, and search across every module's source.
- Capture & retain knowledge — let the assistant record notes, tags, and cross-references on
individual elements that persist across sessions and re-indexing, building up a durable map of a
form no one fully remembers.
It is aimed at developers and teams doing Oracle Forms modernization, reverse engineering, code
review, and documentation — anyone who needs to read Forms logic faster than opening it by hand.
See it work
A typical session against the bundled sample-forms directory:
You: What does ORDERS.fmb do?
AI → list_modules → ORDERS.fmb (NOT_CACHED), MAINMENU.mmb, UTILS.pll …
AI → fetch_module ORDERS.fmb → converted + indexed (3 blocks, 3 triggers, 3 program units)
AI → get_module_overview ORDERS → blocks, triggers, LOVs, record groups, windows, canvases …
You: Show me the validation logic on the ORDERS block.
AI → list_triggers block=ORDERS → WHEN-VALIDATE-ITEM (on ORDER_ID), WHEN-VALIDATE-RECORD
AI → get_trigger ORDERS WHEN-VALIDATE-ITEM → the decoded PL/SQL body
You: Where else is the CALC_TOTAL procedure called?
AI → search_source "calc_total" scope=plsql → hits across triggers and program units
You: That validation is the legacy pre-2010 path — note it so we remember.
AI → annotate_element ORDERS trigger WHEN-VALIDATE-ITEM kind=note "Legacy pre-2010 validation path" → saved
(next session) get_trigger ORDERS WHEN-VALIDATE-ITEM → body + the stored note inline
How it works
list_modules scans the directory you name and reports each module's cache status. fetch_module
produces the module's text form, with the Oracle tools when ORACLE_HOME is set and from
pre-converted files next to the modules when it is not, and parses it into a structured index. The
other tools read that index. A STALE module is one whose source changed or whose index an older
build wrote, and fetching it again clears that. Notes recorded with annotate_element and
relate_elements live in a separate store, so re-fetching keeps them.
How it works has the full sequence and the cache layout.
Tools