MCP Server installation on Microsoft Windows


Overview

This guide covers the installation of CAST Imaging MCP Server on Microsoft Windows. It’s intended for:

  • Direct installation on Microsoft Windows
  • new installations (i.e. from scratch)
  • in-place updates to a new release

The installation package com.castsoftware.imaging.mcpserverexternal link includes an installation script (.bat file), various configuration files and the binaries themselves.

Requirements

MCP Server is a standalone component and can therefore be installed wherever convenient in your local environment, e.g. on a dedicated machine, or on a machine already used by other CAST Imaging components.

When using a dedicated machine, CAST recommends following the general hardware and software requirements but note that the component does not require:

  • a Java JRE/JDK

Other requirements:

  • MCP Server runs as a Microsoft Windows service on TCP port 8282 although you can change this in the configuration.conf file (see below). You may therefore need to adjust firewall rules to allow incoming and outgoing connections to this port
  • see software requirements for more information about supported Microsoft Windows OS versions
  • a minimum of 2GB free disk space
  • CAST Imaging ≥ 3.4.1 installed and functioning (MCP Server interacts with the imaging-services component) in your network
  • an MCP-aware client such as GitHub Copilot (Visual Studio Code)
  • a CAST Imaging API key, see Generating an API key

What’s new?

See the release notes.

Installation process

Step 1 - Verify connection to CAST Imaging

Before proceeding, ensure you can access CAST Imaging (the imaging-services component) from the machine where you intend to install MCP Server by running the following (tailored to your own environment):

curl -H "x-api-key: <your-imaging-api-key>" http://<your_imaging_public_URL>:8090/rest/ready

The expected output is true.

Step 2 - Download the installation media

Download the latest release of the installer (com.castsoftware.imaging.mcpserverexternal link) and unzip it anywhere on your local disk. The following files/folders will be created:

com.castsoftware.imaging.mcpserver.<version>/
├── mcpserver
├── tools
├── configuration.conf
├── mcp-server-installer.bat
├── README.md

Step 3 - Configure your installation

Locate the configuration.conf file at the root of the unzipped installation media. Open the file with a text editor and update the installation variables to match your environment:

HOSTNAME_CONTROL_PANEL="imaging-services machine"      # Required: IP address/hostname/FQDN of the machine on which the "imaging-services" component is installed. You can use localhost if MCP Server is installed on the same machine as the "imaging-services" component.
PORT_CONTROL_PANEL=8098                               # Default port on which the CAST Imaging Control Panel service (part of the "imaging-services" component) is running - unless you have changed this during the CAST Imaging installation, leave it as is
INSTALL_DIR=C:\Program Files\CAST\Imaging-MCP-Server  # Default installation location
CONFIG_DIR=C:\ProgramData\CAST\Imaging-MCP-Server     # Default Config setting files location
MCP_SERVER_PORT=8282                                  # Default MCP server listening port
HTTPS_ENABLED=false                                   # Enable HTTPS between MCP-aware client and MCP Server (requires appropriate certificates).
IMAGING_PAGE_SIZE=1000                                # Sets the number of records the MCP server fetches per request (internal batching).
IMAGING_DISPLAY_PAGE_SIZE=20                          # Sets how many records are shown per page in the user-facing response
IMAGING_CODE=False                                    # Defines whether the application source code is accessible to the MCP Server or not: when it is set to False source code (from the Imaging analysis results) cannot be accessed by the MCP Server and therefore source code will not figure in any results returned by MCP server

Optional: establishing a HTTPS connection between the MCP-aware client and the MCP Server

If you need to establish a secure HTTPS connection between the MCP-aware client and MCP server, follow these steps:

  1. Locate the configuration.conf file at the root of the unzipped installation media. Open the file with a text editor and update the HTTPS_ENABLED variable to true:
HTTPS_ENABLED=true
  1. Create a folder named certificates in the root of the unzipped installation media folder. Inside this folder, add your certificate and private key files with the following names:
  • certificate.pem – the secure certificate
  • private_key.pem – the corresponding private key

Step 4 - Run the installation

Open a CMD window with elevated permissions (right click, Run as administrator) and execute the following command from the root of the unzipped files:

mcp-server-installer.bat --install configuration.conf

On completion, check that a Microsoft Windows service named CAST Imaging MCP Server has been created and is up and running.

Step 5 - Configure your MCP-Aware client (GitHub Copilot for Visual Studio Code)

Install GitHub Copilot extension

Install the GitHub Copilot extension (see https://marketplace.visualstudio.com/items?itemName=GitHub.copilotexternal link) in Visual Studio Code, ensure you are signed in to GitHub and clone the repository you need to work with.

Create mcp.json file

Create an mcp.json configuration file and place it in the .vscode/ folder for your Visual Studio Code workspace. The mcp.json must use the following template:

{
  "inputs": [
    {
      "id": "imaging-key",
      "type": "promptString",
      "description": "CAST Imaging API Key"
    }
  ],
  "servers": {
    "imaging": {
      "type": "http",
      "url": "http://<your-mcp-server-host:port>/mcp/",
      "headers": {
        "x-api-key": "${input:imaging-key}"
      }
    }
  }
}

where:

  • "type" is set to http or https depending on whether the MCP Server is set to run in secure HTTPS mode or not
  • "url" is the IP address/hostname/FQDN and port number (8282 by default) of the machine hosting the MCP Server.

Alternative manual registration flow

If Visual Studio Code does not auto‑pick the MCP server:

  1. Open Copilot Chat → gear icon → Select tools that are available to chat
  2. + Add More Tools…+ Add MCP Server… → choose HTTP
  3. Enter http(s)://<your-mcp-server-host:port>/mcp/ and confirm
  4. Visual Studio Code will then create .vscode/copilot/mcp.json → add the header block:
"my-mcp-server-xxxx": {
  "url": "http://<your-mcp-server-host:port>/mcp/",
  "headers": {
    "x-api-key": "${input:imaging-key}"
  }
}

Step 6 - Test your MCP-Aware client

  1. Launch your MCP-aware client
  2. Enter your CAST Imaging API key when prompted
  3. Run a test query, for example:
List all applications

or:

List all applications
List 5 transactions for application <YourApp>
List available applications datagraphs
List applications insights

If successful (see below), you’re ready to use your MCP Client with your MCP Server.

Success indicators

Connection successful if you receive:

  • Valid application listings
  • Architectural insights
  • Suggested analysis queries

Check configuration if you see:

  • Connection errors
  • Authentication failures
  • Empty responses

Example queries

Basic application information

List all applications

Transaction analysis

List all applications transactions
Show 10 transactions for application <YourApp>

Data flow analysis

List available applications datagraphs
Show data graphs for application <YourApp>

Quality insights

List applications insights
Show quality issues for application <YourApp>

Architectural analysis

Analyze the architecture of <YourApp>
Show dependencies for <YourApp>p

Available Toolsets

Toolset Description
Portfolio Tools Portfolio‑level exploration: list applications, compare metrics, scan hotspots across systems.
Applications Tools Application‑level analysis: transactions, quality issues, datagraphs, architecture.
Objects Tools Object element exploration: locate objects, references, callers/callees.

Tools

Portfolio
  • applications - List the available applications in CAST Imaging
  • applications_transactions - Get transactions from all applications with filtering support
  • applications_data_graphs - Data entity interaction networks (data graphs) from all applications
  • applications_dependencies - Inter-dependencies between all applications
  • applications_quality_insights - Quality insights including CVE, cloud detection patterns, and green detection patterns
Applications
  • application_database_explorer - Explore database tables and columns in an application
  • stats - Get basic statistical information for an application
  • architectural_graph - Get architectural graph data (nodes/links) at specific levels (layer, component, sub-component, technology-category, element-type)
  • architectural_graph_focus - Get focused architectural graph data for specific areas
  • quality_insights - Get quality-related insights (CVE, cloud patterns, green patterns, structural flaws, ISO-5055)
  • quality_insight_occurrences - Get specific occurrences of quality insights by ID
  • packages - Get package information and dependencies
  • package_interactions - Get interactions with specific packages by component and version
  • transactions - Get transactions with optional filtering by name, fullname, or type
  • transaction_objects_with_insights - Get objects with insights within specific transactions
  • transaction_complex_objects - Get complex objects within specific transactions
  • transaction_documents - Get documents for specific transactions
  • add_transaction_document - Add documentation to specific transactions
  • transaction_graph - Get transaction graph data (nodes/links) at different granularity levels
  • transaction_graph_focus - Get focused transaction graph data concentrating on complex objects
  • data_graphs - Get data entity interaction networks (data graphs) with optional filtering
  • data_graph_objects_with_insights - Get objects with insights within specific data graphs
  • data_graph_complex_objects - Get complex objects within specific data graphs
  • data_graph_documents - Get documents for specific data graphs
  • add_datagraph_document - Add documentation to specific data graphs
  • data_graph_graph - Get data graph structure (nodes/links) at different granularity levels
  • data_graph_graph_focus - Get focused data graph structure concentrating on complex objects
  • documents - Find documents about code elements and graphs matching search text (requires IMAGING_CODE=True)
  • inter_applications_dependencies - Get inward and outward inter-application dependencies
  • inter_app_detailed_dependencies - Get detailed dependencies between two specific applications
Objects
  • objects - Get objects in an application matching identification criteria (name, fullname, mangling, type, filepath)
  • object_details - Get comprehensive details for objects including properties, relationships, code snippets, and usage statistics
  • add_object_document - Add documentation text to a specific object identified by ID
  • source_files - Find source files that define code objects matching file path criteria
  • source_file_details - Get detailed information about source files and their code elements (inventory, intra, inward, outward, testing)
  • transactions_using_object - Get transactions that use objects matching specified criteria
  • data_graphs_involving_object - Get data entity interaction networks (data graphs) that involve specific objects

Troubleshooting

  1. Check the Microsoft Windows service CAST Imaging MCP Server and restart it if required.
  2. Check MCP Server logs in:
%INSTALL_DIRECTORY%/logs
  1. Test connectivity to CAST Imaging API:
curl -H "x-api-key: <your-imaging-api-key>" http://<your_imaging_public_URL>:8090/rest/ready
  1. Validate configuration files:
  • Check %PROGRAMDATA%\CAST\Imaging-MCP-Server\mcpserver\conf\app.config
  • Ensure "url" parameter in the client mcp.json points to correct URL
  1. Regenerate API key in CAST Imaging profile if necessary.

Update process

The installation media contains a dedicated update option allowing you to run an in-place update to a new release of CAST MCP Server:

  • Download the new installation media for the target release
  • Unzip the installation media (it is NOT necessary to modify the configuration.conf file - all existing settings are preserved).
  • Open a CMD window with elevated permissions (right click, Run as administrator) and execute the following command from the root of the unzipped files:
mcp-server-installer.bat --update

Uninstall process

The installation media contains a dedicated uninstall option: to run it, open a CMD window with elevated permissions (right click, Run as administrator) and execute the following command from the root of the unzipped files:

mcp-server-installer.bat --uninstall