Package io.quarkiverse.mcp.server.test
Class McpAssured
java.lang.Object
io.quarkiverse.mcp.server.test.McpAssured
A set of convenient test utils for MCP servers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic interfaceMcpAssured.McpAssert<ASSERT extends McpAssured.McpAssert<ASSERT>>Represents a group of MCP requests and corresponding assert functions.static final recordstatic interfacestatic interfaceA test client that leverages the SSE transport.static interfacestatic interfaceA test client that leverages the STDIO transport.static interfacestatic interfaceA test client that leverages the Streamable HTTP transport.static interfaceMcpAssured.McpTestClient<ASSERT extends McpAssured.McpAssert<ASSERT>,CLIENT extends McpAssured.McpTestClient<ASSERT, CLIENT>> static interfacestatic interfaceA test client that leverages the WebSocket transport.static final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordAn immutable snapshot of assertable messages sent from the server.static final recordstatic final recordstatic final record -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PING
- See Also:
-
TOOLS_LIST
- See Also:
-
TOOLS_CALL
- See Also:
-
PROMPTS_LIST
- See Also:
-
PROMPTS_GET
- See Also:
-
RESOURCES_LIST
- See Also:
-
RESOURCES_TEMPLATES_LIST
- See Also:
-
RESOURCES_READ
- See Also:
-
COMPLETION_COMPLETE
- See Also:
-
baseUri
The base URI is used by HTTP-based client implementations.The URI set by
McpAssured.McpSseTestClient.Builder.setBaseUri(URI),McpAssured.McpStreamableTestClient.Builder.setBaseUri(URI), orMcpAssured.McpWebSocketTestClient.Builder.setBaseUri(URI)takes precedence over this value.
-
-
Constructor Details
-
McpAssured
public McpAssured()
-
-
Method Details
-
newSseClient
- Returns:
- a new SSE test client builder
-
newConnectedSseClient
- Returns:
- a connected SSE test client
-
newStreamableClient
- Returns:
- a new streamable HTTP test client builder
-
newConnectedStreamableClient
- Returns:
- a connected streamable HTTP test client
-
newWebSocketClient
- Returns:
- a new WebSocket test client builder
-
newConnectedWebSocketClient
- Returns:
- a connected WebSocket test client
-
newStdioClient
- Returns:
- a new STDIO test client builder
-
newConnectedStdioClient
- Returns:
- a connected STDIO test client
-