Introduction
The Parasoft MCP Client adds support for the Model Context Protocol (MCP) in SOAtest. This enables you to take full advantage of SOAtest’s rich interface when configuring, sending, and validating messages sent over MCP. This extension can be used to test a MCP server and supports messages sent over HTTP using Server-Sent Events (SSE).
Requirements
- MCP server 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.soavirt.tool.mcpclient-<version>.jar file.
- Click Apply.
- Restart SOAtest/Virtualize.
Command Line Installation
Add the com.parasoft.soavirt.tool.mcpclient-<version>.jar file to the system.properties.classpath
property in your settings properties file. For example:
system.properties.classpath=<PATH_TO_JAR>/com.parasoft.soavirt.tool.mcpclient-<version>.jar
Usage
MCP clients can be added as standalone tools with the SOAtest Add Test wizard. They can also be added as Virtualize provisioning action tools. Before the client can be run, the connection and request must be configured. Once a MCP client is added to a suite, a Traffic Viewer can be added as a Traffic output or any JSON tool can be added as a Response output.
Configuration
You can configure the following settings on the Tool Settings.
Connection Settings
Endpoint | Specify the endpoint for the MCP server in the format of The tool splits the Endpoint into two parts by default:
Example:
Result:
If this rule does not meet your requirement, you can override the base URL by setting the following system property. The tool will then derive the SSE endpoint accordingly:
|
---|---|
Keep Alive | Specify either The MCP client allows multiple active connections to be used. If the connection ID matches the ID for a connection that is already open, that connection will be reused. If the connection ID matches an ID for a connection that has been closed or has never been used to open a connection previously, a new connection will be created. If Keep Alive is For example, in the following scenario, both connections will be kept open after the test run is over:
To fix this, you would set Keep Alive to
|
Request Timeout | Defines the maximum seconds to wait for server responses before timing out requests. The default is 20 . |
Connection ID | Specify a connection ID if you are testing multiple connections. Any string can be used for connection IDs. If you specify a connection ID that references an already open connection, as well as an Endpoint, Request Timeout, Bearer Token, Basic Auth Username or Basic Auth Password, the Endpoint, Request Timeout, Bearer Token, Basic Auth Username or Basic Auth Password will be ignored because the connection will already be open. You do not need to set the connection ID if you are working with a single connection within a test suite, SOAtest will use the default value ( However, if you want to open and send/receive messages on multiple connections within the same scenario, you need to specify unique connection IDs for each of them. The default is |
Bearer Token | Specify the OAuth 2.0 access token with which to authenticate to a MCP server that uses OAuth authentication. If no OAuth authentication is needed, leave this field blank. If this field is specified, the Basic Auth Username and Basic Auth Password fields will be ignored. |
Basic Auth Username | Specify the username with which to authenticate to a MCP server that uses Basic authentication. If no Basic authentication is needed, leave this field blank. If Bearer Token field is specified, this field will be ignored. |
Basic Auth Password | Specify the password with which to authenticate to a MCP server that uses Basic authentication. If no Basic authentication is needed, leave this field blank. If Bearer Token field is specified, this field will be ignored. |
Request Settings
Method | The name of the method to be invoked. The following methods are supported:
|
---|---|
Parameters: name | The name of a tool or prompt (used in tools/call or prompts/get method). |
Parameters: cursor | Optional pagination cursor from a previous list response (used in tools/list , resources/list , or prompts/list method). |
Parameters: uri | The URI of a resource (used in resources/read method). |
Parameters: argument 1 to Parameters: argument 10 | These fields configure arguments that should be sent as part of the request. You can configure up to ten arguments. Arguments are configured using a |
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 |
---|
Change Log
1.1
- Added support for OAuth authentication and Basic authentication.
- Merged separated Base URL and SSE Endpoint configuration fields into one Endpoint configuration field.
1.0
- Initial release.
Third-Party Content
This extension includes items that have been sourced from third parties as outlined below:
- jackson-annotations (Apache License 2.0 with this notice)
- jackson-core (Apache License 2.0 with this notice)
- jackson-databind (Apache License 2.0 with this notice)
- MCP Java SDK (MIT License)
- Byte Buddy (Apache License 2.0 with this notice)
- SLF4J (MIT License)
- jackson-dataformat-yaml (Apache License 2.0 with this notice)
- SnakeYAML (Apache License 2.0)
- JsonSchemaValidator (Apache License 2.0 with this notice)
- Internet Time Utility (Apache License 2.0)
- Reactor Core (Apache License 2.0)
- Reactive Streams (MIT No Attribution)
Additional license details are available in this extension’s licenses
folder.