Introduction
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.
Requirements
- MCP client that supports protocol version 2024-11-05 and communicates using HTTP with Server-Sent Events (SSE) transport.
- This tool requires SOAtest/Virtualize 2024.1 or later, which needs to be configured to run with Java 17 or higher.
Installation
This tool can be installed from the UI or the command line.
UI Installation
- Go to Parasoft > Preferences and click System Properties.
- Click Add JARs and choose the com.parasoft.virtualize.listener.mcp-<version>.jar file.
- Click Apply.
- Restart SOAtest/Virtualize.
Command Line Installation
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
Usage
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.
Configuration
The following configuration options are available:
Connection Settings
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 |
Logging Settings
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 |
---|
Third-Party Content
This extension includes items that have been sourced from third parties as outlined below.
- jackson-annotations (Apache License 2.0)
- jackson-core (Apache License 2.0)
- jackson-databind (Apache License 2.0)
- MCP Java SDK (MIT License)
- Reactor Core (Apache License 2.0)
- Byte Buddy (Apache License 2.0)
- Reactive Streams (MIT No Attribution)
- SLF4J (MIT License)
Additional license details are available in this extension’s licenses
folder.