The MCP listener handles Model Context Protocol (MCP) client initialization requests automatically and enables a virtual asset to receive and respond to MCP messages sent over HTTP using Server-Sent Events (SSE). Connections from the client are kept open until the client closes the connection or an error occurs when sending MCP message to the client.
This tool can be installed from the UI or the command line.
Add the com.parasoft.virtualize.listener.mcp-<version>.jar file to the system.properties.classpath
property in your settings properties file. For example:
system.properties.classpath=<PATH_TO_JAR>/com.parasoft.virtualize.listener.mcp-<version>.jar
Once the MCP listener is installed, MCP Listener will be available in the Transports > Custom tab of the Virtual Asset configuration panel. Open this panel by double-clicking a virtual asset’s Virtualize Server node.
If multiple custom listeners are available, you can select the one you want to use from the Select Implementation menu.
The following configuration options are available:
Port | Specify the port for the listener. Value must be between 1 and 65535 . If empty, the listener will not start. |
---|---|
SSE Endpoint | Specify the SSE endpoint path. The default is /sse . |
Worker Threads | Specify the number of worker threads used to process messages.
The default is |
Heartbeat Interval | Specify a duration in seconds between sending heartbeat comments to MCP clients. Heartbeat comments are used to prevent connections from timing out.
The default is |
Log Level | Specify how much information you want logged to the console and the Event Monitoring view. The following levels are available:
The default is |
---|
While the MCP listener will return any response configured in the matching responder, it is recommended to format the response according to the JSON-RPC 2.0 specification for standard MCP communication.
Note that if the id
field is provided in the response, it will be ignored and the id
from the original request will be used instead. Additionally, if the jsonrpc
field is not present in the response, it will be automatically added with the value 2.0
.
This extension includes items that have been sourced from third parties as outlined below.
Additional license details are available in this extension’s licenses
folder.