Mainframe Assessment Tool MCP server

This page describes how to set up and interact with Mainframe Assessment Tool assessments by using MCP clients such as Gemini CLI or AI agents through the Model Context Protocol (MCP). You can use natural language prompts to get insights into your mainframe assessments. With the MCP server, you can use AI agents to perform discovery and analysis operations on your Mainframe Assessment Tool assessments. For example, you can do the following:

  • List and view existing assessments.
  • Explore business domains discovered in your assessments.
  • Search and filter assets based on different criteria.
  • Retrieve asset specifications, including dependencies and complexity metrics.

For more information on MCP, see What is the Model Context Protocol (MCP)?.

Before you begin

Make sure that you are familiar with Mainframe Assessment Tool, and that you have already used it to run an assessment.

Enable the MCP server

To enable the MCP server on your Mainframe Assessment Tool VM instance, add the MAT_ENABLE_MCP metadata key and set its value to true by running the following gcloud command:

    gcloud compute instances add-metadata INSTANCE_NAME \
    --metadata=MAT_ENABLE_MCP=true \
    --zone=ZONE

Replace the following:

  • INSTANCE_NAME: the name of your VM instance.
  • ZONE: the zone where your VM instance is located.

If you set the metadata key on a running VM, you must restart the VM for the changes to take effect.

Connect to the MCP server

You can connect to the MCP server using standard AI agents that supports MCP connections over SSE (Server-Sent Events).

The MCP server is located under the /mcp route of the same port used to access the Mainframe Assessment Tool UI, see Access Mainframe Assessment Tool VM from your computer.

For example, to use Gemini CLI, configure the MCP server in the Gemini CLI settings file as follows:

{
  "mcpServers": {
    "mainframe-assessment-tool": {
      "url": "http://localhost:LOCAL_PORT/mcp"
    }
  }
}

Replace the following:

  • LOCAL_PORT: The local port used for accessing the Mainframe Assessment Tool UI.

For more information, see Configure the MCP server in settings.json.

MCP server tools

The Mainframe Assessment Tool MCP server provides tools that enable AI agents to retrieve data from your assessments.

ListAssessments

Lists all the assessments that exist on the Mainframe Assessment Tool instance. Each assessment includes its name, ID, description, and timestamps.

ListDomains

Lists the domains for a given Mainframe Assessment Tool assessment ID. Each domain includes its name, description, and ID.

Arguments

Name Type Required Description
AssessmentId string Yes The ID of the Mainframe Assessment Tool assessment.

ListAssets

Lists the assets for a given Mainframe Assessment Tool assessment ID. Each asset includes its ID, name, path, type, and assigned domain IDs.

Arguments

Name Type Required Description
AssessmentId string Yes The ID of the Mainframe Assessment Tool assessment.

FetchDomain

Fetches the domain details for a given domain ID and Mainframe Assessment Tool assessment ID. Domain details include ID, name, description, and summary.

Arguments

Name Type Required Description
AssessmentId string Yes The ID of the Mainframe Assessment Tool assessment.
DomainId string Yes The ID of the Mainframe Assessment Tool domain.

FetchAsset

Fetches the specification summary for an asset for a given Mainframe Assessment Tool assessment ID. The asset specification includes its ID, name, usage, description, ETL graph, and BMS maps.

Arguments

Name Type Required Description
AssessmentId string Yes The ID of the Mainframe Assessment Tool assessment.
AssetId string Yes The ID of the Mainframe Assessment Tool asset.
DetailedSpec boolean No (default: false) If is set to true, the response also includes method specifications with their test cases.

FetchAssetsCyclomaticComplexity

Fetches the cyclomatic complexity scores for a list of assets for a given Mainframe Assessment Tool assessment ID.

Arguments

Name Type Required Description
AssessmentId string Yes The ID of the Mainframe Assessment Tool assessment.
AssetIds string[] Yes List of Mainframe Assessment Tool assets IDs.

Usage Examples

The following are examples of natural language prompts that an AI agent can answer by using the MCP server tools to retrieve and process assessment data:

  • Scenario: Find complex programs in an assessment.
  • User prompt: "List the 10 most complex COBOL programs in the assessment called AssessmentName."

  • Scenario: Find and filter assets that belong to a business domain.
  • User prompt: "List all the JCL jobs related to the DomainName domain under the assessment called AssessmentName."

  • Scenario: Get asset dependencies from an assessment.
  • User prompt: "What are the dependencies of the JCL job JCLJobName in the assessment called AssessmentName?"