Class Mcp


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

      • async

        public AsyncMcp async()
        Switches to the async SDK.
        Returns:
        The async SDK
      • mcpGet

        public StackoneMcpGetRequestBuilder mcpGet()
        Open MCP SSE stream

        Open a dedicated Server-Sent Events stream for MCP notifications

        Returns:
        The call builder
      • mcpGet

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails
      • mcpGet

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails
      • mcpPost

        public StackoneMcpPostRequestBuilder mcpPost()
        Send MCP JSON-RPC message

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

        Returns:
        The call builder
      • mcpPost

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails
      • mcpPost

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails
      • mcpDelete

        public StackoneMcpDeleteRequestBuilder mcpDelete()
        Delete MCP session

        Close an existing MCP session for the provided session id

        Returns:
        The call builder
      • mcpDelete

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails
      • mcpDelete

        public 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:
        The response from the API call
        Throws:
        java.lang.RuntimeException - subclass if the API call fails