Asynchronous AI analysis using the Model Context Protocol (MCP) server
You can connect Model Context Protocol (MCP) compliant AI assistants to Z Abend Investigator to automate abend diagnosis through z/OSMF REST APIs.
The MCP server acts as a secure, workstation-based bridge between your AI assistant and z/OS. Running on Windows®, the server communicates with the host exclusively through z/OS Management Facility (z/OSMF) REST APIs over HTTPS. Because the server connects remotely using standard z/OSMF interfaces, you do not need to install additional software agents on your mainframe system. All host operations execute under your existing RACF user identity and permissions. Windows Credential Manager is the recommended authentication path for this scenario. See Configuring local authentication using Windows Credential Manager.
The five core diagnostic operations
Your AI assistant can chain five atomic operations to analyze abends autonomously.
The MCP server also exposes these operations as REST endpoints. You can call these operations from a script without an AI client if the server is run in HTTP mode. You can access the exposed REST API services through the Swagger UI sending HTTP requests directly to the REST API from you browser by connecting to the following URL: http://localhost:8080/swagger-ui.html.
find-history-datasets: Searches the system catalog to list available Z Abend Investigator history data sets.search-history-file: Invokes the HFZUTIL utility with the LISTHF statement to list and filter fault entries.report-from-fault-id: Executes interactive reanalysis on the host to retrieve the complete diagnostic report. To control report granularity and to optimize LLM token consumption, use the detailLevel settings as follows:- ESSENTIAL
- Minimal token footprint. Includes:
- synopsis
- abend code
- point-of-failure event
- MEDIUM
- This is the default setting. Standard report sections up to the point of failure.
- FULL
- Exhaustive details including: full stack trace, registers, and storage dumps.
get-job-spool: Queries SDSF spool files directly to inspect job execution logs and DD statements.extract-source-sidefile: Reads debug side-files (LISTING, RAW_SOURCE, COBOL, LANGX, DWARF, SYSDEBUG) and extracts clean, numbered source code statements.
When connected, the AI assistant reads the diagnostic report, correlates the abend offsets with your application source code, and proposes code modifications to resolve the failure.
For workstation setup and client configuration instructions, see Configuring the Model Context Protocol (MCP) Server.