Class AsyncMcp


  • public class AsyncMcp
    extends java.lang.Object
    Model Context Protocol endpoint.
    • Method Detail

      • sync

        public Mcp sync()
        Switches to the sync SDK.
        Returns:
        The sync SDK
      • mcpGet

        public StackoneMcpGetRequestBuilder mcpGet()
        Open MCP SSE stream

        Open a dedicated Server-Sent Events stream for MCP notifications

        Returns:
        The async call builder
      • mcpGet

        public java.util.concurrent.CompletableFuture<StackoneMcpGetResponse> mcpGet​(StackoneMcpGetSecurity security,
                                                                                     java.lang.String mcpSessionId)
        Open MCP SSE stream

        Open a dedicated Server-Sent Events stream for MCP notifications

        Parameters:
        security - The security details to use for authentication.
        mcpSessionId - Session id
        Returns:
        CompletableFuture<StackoneMcpGetResponse> - The async response
      • mcpGet

        public java.util.concurrent.CompletableFuture<StackoneMcpGetResponse> mcpGet​(StackoneMcpGetSecurity security,
                                                                                     java.util.Optional<java.lang.String> xAccountId,
                                                                                     java.util.Optional<? extends java.lang.Object> xAccountIdQueryParameter,
                                                                                     java.lang.String mcpSessionId,
                                                                                     java.util.Optional<Options> options)
        Open MCP SSE stream

        Open a dedicated Server-Sent Events stream for MCP notifications

        Parameters:
        security - The security details to use for authentication.
        xAccountId - Account secure id for the target provider account (optional if x-account-id query parameter is provided)
        xAccountIdQueryParameter - Account secure id (alternative to x-account-id header)
        mcpSessionId - Session id
        options - additional options
        Returns:
        CompletableFuture<StackoneMcpGetResponse> - The async response
      • mcpPost

        public StackoneMcpPostRequestBuilder mcpPost()
        Send MCP JSON-RPC message

        Send JSON-RPC request to the MCP server over HTTP streaming transport

        Returns:
        The async call builder
      • mcpPost

        public java.util.concurrent.CompletableFuture<StackoneMcpPostResponse> mcpPost​(StackoneMcpPostSecurity security,
                                                                                       JsonRpcMessageDto jsonRpcMessageDto)
        Send MCP JSON-RPC message

        Send JSON-RPC request to the MCP server over HTTP streaming transport

        Parameters:
        security - The security details to use for authentication.
        jsonRpcMessageDto -
        Returns:
        CompletableFuture<StackoneMcpPostResponse> - The async response
      • mcpPost

        public java.util.concurrent.CompletableFuture<StackoneMcpPostResponse> mcpPost​(StackoneMcpPostSecurity security,
                                                                                       java.util.Optional<java.lang.String> xAccountId,
                                                                                       java.util.Optional<? extends java.lang.Object> xAccountIdQueryParameter,
                                                                                       java.util.Optional<java.lang.String> mcpSessionId,
                                                                                       JsonRpcMessageDto jsonRpcMessageDto,
                                                                                       java.util.Optional<Options> options)
        Send MCP JSON-RPC message

        Send JSON-RPC request to the MCP server over HTTP streaming transport

        Parameters:
        security - The security details to use for authentication.
        xAccountId - Account secure id for the target provider account (optional if x-account-id query parameter is provided)
        xAccountIdQueryParameter - Account secure id (alternative to x-account-id header)
        mcpSessionId - Session id; omit for initialize, include for subsequent calls
        jsonRpcMessageDto -
        options - additional options
        Returns:
        CompletableFuture<StackoneMcpPostResponse> - The async response
      • mcpDelete

        public StackoneMcpDeleteRequestBuilder mcpDelete()
        Delete MCP session

        Close an existing MCP session for the provided session id

        Returns:
        The async call builder
      • mcpDelete

        public java.util.concurrent.CompletableFuture<StackoneMcpDeleteResponse> mcpDelete​(StackoneMcpDeleteSecurity security,
                                                                                           java.lang.String mcpSessionId)
        Delete MCP session

        Close an existing MCP session for the provided session id

        Parameters:
        security - The security details to use for authentication.
        mcpSessionId - Session id
        Returns:
        CompletableFuture<StackoneMcpDeleteResponse> - The async response
      • mcpDelete

        public java.util.concurrent.CompletableFuture<StackoneMcpDeleteResponse> mcpDelete​(StackoneMcpDeleteSecurity security,
                                                                                           java.util.Optional<java.lang.String> xAccountId,
                                                                                           java.util.Optional<? extends java.lang.Object> xAccountIdQueryParameter,
                                                                                           java.lang.String mcpSessionId,
                                                                                           java.util.Optional<Options> options)
        Delete MCP session

        Close an existing MCP session for the provided session id

        Parameters:
        security - The security details to use for authentication.
        xAccountId - Account secure id for the target provider account (optional if x-account-id query parameter is provided)
        xAccountIdQueryParameter - Account secure id (alternative to x-account-id header)
        mcpSessionId - Session id
        options - additional options
        Returns:
        CompletableFuture<StackoneMcpDeleteResponse> - The async response