FAQ about the CAST MCP Servers

Security, data safety and deployment questions about the CAST Imaging and CAST Gatekeeper MCP Servers

Overview

Answers to security, data safety and deployment questions about the CAST Imaging and CAST Gatekeeper MCP Servers. For health checks and common errors, see Update and troubleshoot.

CAST Imaging MCP Server

How does the MCP server authenticate with CAST Imaging? What authentication mechanisms are supported (API keys, OAuth, certificates)?
Two authentication methods are supported: an API key, and OAuth from CAST Imaging 3.6.6-funcrel onwards. Client certificates are not used.

How the API key method works:

  • API Key Generation: You generate an API key from your CAST Imaging user profile (accessible after logging in) - i.e. the API key is tied to individual CAST Imaging users
  • This API key is then passed to the MCP server via an mcp.json file using the x-api-key entry.

How the OAuth method works:

  • The user signs in to CAST Imaging through the browser, against Keycloak, using the OAuth authorization code flow with PKCE
  • CAST Imaging exchanges the resulting token so that downstream API calls carry the roles and permissions of the signed-in user
  • No API key is stored in the client configuration - see Authenticate MCP clients with OAuth

How do AI clients authenticate to the MCP server? What credentials are required for Claude Desktop, GitHub Copilot, or other AI agents to connect?
AI clients (Claude Desktop, GitHub Copilot, etc.) authenticate to the MCP server by passing your CAST Imaging API key in the request headers.

For GitHub Copilot in VS Code, you configure authentication in the .vscode/mcp.json file. Then when you start using Copilot, VS Code will prompt you to enter your API key, which it then includes in every request to the MCP server.

From CAST Imaging 3.6.6-funcrel onwards, Claude Code and Visual Studio Code can sign in through the browser using OAuth instead, in which case no API key is held in the client configuration - see Authenticate MCP clients with OAuth.

Key points:

  • No separate MCP server credentials - you use either your existing per-user CAST Imaging API key, or your CAST Imaging user account through OAuth
  • When an API key is used, the MCP server forwards it to the CAST Imaging APIs
  • When OAuth is used, the identity of the signed-in CAST Imaging user determines the permissions applied

What data is sent from the CAST Imaging MCP tools to the LLM, specifically concerning prompt and customer code, along with encryption options?
Here is a list of data that is sent to the LLM while using the MCP server:
  • Metadata and analysis results (always included):

    • Application names, statistics, metrics
    • Transaction names, data graph names
    • Package dependencies, architectural information
    • Quality insights (CVE vulnerabilities, cloud readiness issues, structural flaws)
    • Object names, types, file paths
    • Relationships between components (caller/callee, dependencies)
  • Source code snippets (controlled by the IMAGING_CODE setting - This setting exists specifically because source code exposure is sensitive):

    • Default position: IMAGING_CODE=False - i.e. no source code is sent to the LLM
    • When enabled: IMAGING_CODE=True - code snippets from the database may be included in responses
  • What is NOT sent:

    • No source code is sent to the LLM from disk (the MCP server does not have direct file access)
    • Database connection strings or credentials
    • Internal CAST Imaging configuration details

Does the CAST Imaging MCP server expose sensitive business logic or source code? What safeguards prevent over-exposure?
The CAST Imaging MCP server is designed with safeguards to prevent unintended data exposure:

Source code protection:

  • IMAGING_CODE setting (default: False):
    • Prevents source code snippets from being included in MCP responses
    • Must be explicitly enabled to access code
    • No direct file system access - the MCP server does not read your actual source code files

What IS exposed (by design):

  • Application architecture - Component relationships, layers, dependencies
  • Quality insights - CVE vulnerabilities, code smells, quality metrics
  • Metadata - Object names, transaction names, database schema related to the specific query.

What is NOT exposed:

  • Actual source code (unless IMAGING_CODE=True)
  • Credentials or connection strings
  • Proprietary algorithms

What network protocols does the MCP server use? Is communication encrypted (TLS/SSL)?
Your MCP-aware client never connects to MCP Server directly: it connects to the CAST Imaging public gateway, which forwards every request whose route contains /mcp to the MCP Aggregator Gateway.

Protocols used:

  • Model Context Protocol (MCP) - Streamable HTTP transport, between your client and CAST Imaging
  • HTTP, between the CAST Imaging public gateway and the MCP Aggregator Gateway, and between the gateway and the MCP servers behind it
  • REST API calls from the MCP servers to CAST Imaging

Encryption:

  • Traffic between your client and CAST Imaging is encrypted when the CAST Imaging gateway is configured in HTTPS mode - see HTTPS configuration. MCP Server has no HTTPS setting of its own and needs no certificate.
  • If CAST Imaging uses certificates from a private or self-signed certificate authority, point MCP Server to the certificate chain with SSL_CA_BUNDLE - see HTTPS with self-signed or private CA certificates.
MCP client → HTTP(S) → CAST Imaging public gateway → HTTP → MCP Aggregator Gateway (8285) → MCP servers → CAST Imaging

MCP Server 3.0.x and earlier used an optional Nginx proxy for HTTPS (HTTPS_ENABLED), which MCP Server 3.1.0 removes on update - see the 3.0.x installation pages.


What ports need to be opened? What are the firewall requirements?
Port Listens on Must be reachable from When to open it
8090 The machine hosting the CAST Imaging public gateway (imaging-services) Your MCP-aware clients Always: clients connect to CAST Imaging, never directly to MCP Server. 8090 is the default when CAST Imaging is not configured in HTTPS mode - otherwise, open the port the gateway serves HTTPS on
8285 The MCP Server machine (MCP Aggregator Gateway, set by MCP_GATEWAY_PORT) The machine hosting imaging-services, and the machine hosting imaging-viewer for AI Mode Only when MCP Server is installed on a different machine from imaging-services or imaging-viewer. Clients never connect to it

MCP Server also connects to the CAST Imaging Control Panel on port 8098 (set by PORT_CONTROL_PANEL). The three MCP servers behind the gateway (ports 8282, 8287 and 8289) are reachable only from the MCP Server machine - see Architecture.

MCP Server 3.0.x and earlier listen on port 8282, or 8443 with the optional Nginx proxy - see the 3.0.x installation pages.


Can it be used concurrently (multi-client)?
Yes, the MCP server supports concurrent multi-client usage. Multiple developers can connect and use the MCP server simultaneously without conflicts.

How it works:

  • Per-request authentication: each AI client sends their own API key with every request
  • No session management: no login/logout sessions that could block other users
  • Async architecture: built on FastMCP with asynchronous request handling for concurrent operations

Does it need to be deployed on a dedicated machine?
It is not a requirement to deploy the MCP server on a dedicated machine: it can be deployed on the same machine used for CAST Imaging components or on a different machine if that is the requirement. Set the machine hosting imaging-services (HOST_CONTROL_PANEL in .env on Linux via Docker, HOSTNAME_CONTROL_PANEL in configuration.conf on Microsoft Windows) and the MCP Server machine (SERVICE_HOST).

What local telemetry does the MCP server store, and does it contain sensitive data?
Telemetry is a feature of MCP Server 3.1.0 and later, and is not present in MCP Server 3.0.x.

The MCP Aggregator Gateway records telemetry once per MCP tool call, together with the associated CAST Imaging API calls, and pushes it to CAST on a periodic basis. For each tenant, the CAST Imaging setting [Allow CAST to automatically collect anonymous statistical data](/imaging/administer/system-settings/extend/#allow-cast-to-automatically-collect-anonymous-statistical-data) decides whether telemetry is recorded and pushed. The option is enabled by default.

What is stored:

  • Tool/function names
  • Client information
  • Execution duration
  • Success or error status
  • Aggregated CAST Imaging API activity

What is NOT stored:

  • Raw credentials (API keys are never written to telemetry)

Key points:

  • Telemetry is written in JSON Lines (JSONL) format, with one JSON object per tool call
  • To stop telemetry for a tenant, clear Allow CAST to automatically collect anonymous statistical data in CAST Imaging. Nothing is then recorded or pushed for that tenant; if you allow it again later, only activity from that point on is sent. The gateway checks the setting again every five minutes
  • Until the gateway has read the setting from the Control Panel, activity is recorded locally but nothing is pushed
  • There is no local on/off setting. TELEMETRY_ENABLED and TELEMETRY_PUSH_ENABLED are no longer used: an update drops them on Linux via Docker, and on Microsoft Windows they are ignored if present
  • The push interval is set by TELEMETRY_PUSH_INTERVAL_MINUTES and defaults to 120 minutes
  • Telemetry is written to logs/telemetry/telemetry.jsonl (%CONFIG_DIR%\logs\telemetry\telemetry.jsonl on Microsoft Windows), with one sub-folder per additional tenant. The path is set by TELEMETRY_LOCAL_FILE
  • The file rotates at 10 MB and retains up to 30 compressed backups

CAST Gatekeeper MCP Server

How does authentication work?
The server uses a CAST Imaging API key sent in HTTP Request Headers (by the MCP client per request): x-api-key:

For VS Code and Cursor integrations, credentials are passed in the MCP client configuration so each HTTP request carries them:

"headers": {
  "x-api-key": "your-api-key"
}

From CAST Imaging 3.6.6-funcrel onwards, Claude Code and Visual Studio Code can sign in through the browser using OAuth instead of an API key - see Authenticate MCP clients with OAuth.


Can multiple users connect to the same MCP server simultaneously?
Yes. The MCP server supports concurrent multi-client usage:
  • Per-request authentication: each AI client sends their own API key with every request
  • No session management: no login/logout sessions that could block other users
  • Async architecture: asynchronous request handling for concurrent operations

Does it need to be deployed on a dedicated machine?
No. It can be deployed on the same machine used for CAST Imaging components or on a separate machine. Update HOST_CONTROL_PANEL in app.config accordingly.

What ports need to be opened?
- MCP Server listening port: TCP port 8283 (HTTP) - configurable via MCP_SERVER_PORT - CAST Imaging Control Panel / Eureka service: TCP port 8098 (default) - configurable via PORT_CONTROL_PANEL

What data is sent to the LLM?
The MCP server sends Dashboard API responses to the LLM, which include:
  • Application names and quality metrics
  • Compliance status and health factor scores
  • Violation details (rule names, file paths, line numbers, remediation guidance)
  • Source code snippets for each violation - included by default, as get_violations returns its findings unless the AI client asks it not to
  • Technical debt estimates

Credentials and connection strings are never forwarded to the LLM.


Does the MCP server store or send telemetry?
Yes. In release 3.0.2-funcrel, the MCP Server for CAST Gatekeeper records its tool calls in a local telemetry log, and periodically pushes that log to CAST. Both are enabled by default.
  • The local log is written to %PROGRAMDATA%\CAST\Gatekeeper-MCP-Server\logs\telemetry\telemetry.jsonl on Microsoft Windows and logs/telemetry/telemetry.jsonl in the installer folder on Linux via Docker
  • Set TELEMETRY_PUSH_ENABLED=false in app.config to keep telemetry on the local machine only. The interval is set by TELEMETRY_PUSH_INTERVAL_MINUTES and defaults to 120 minutes
  • Set TELEMETRY_ENABLED=false to disable telemetry entirely