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 xAccountId,
                                             java.lang.String mcpSessionId)
                                      throws java.lang.Exception
        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
        mcpSessionId - Session id
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • mcpGet

        public StackoneMcpGetResponse mcpGet​(StackoneMcpGetSecurity security,
                                             java.lang.String xAccountId,
                                             java.lang.String mcpSessionId,
                                             java.util.Optional<Options> options)
                                      throws java.lang.Exception
        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
        mcpSessionId - Session id
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - 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,
                                               java.lang.String xAccountId,
                                               JsonRpcMessageDto jsonRpcMessageDto)
                                        throws java.lang.Exception
        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
        jsonRpcMessageDto -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • mcpPost

        public StackoneMcpPostResponse mcpPost​(StackoneMcpPostSecurity security,
                                               java.lang.String xAccountId,
                                               java.util.Optional<java.lang.String> mcpSessionId,
                                               JsonRpcMessageDto jsonRpcMessageDto,
                                               java.util.Optional<Options> options)
                                        throws java.lang.Exception
        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
        mcpSessionId - Session id; omit for initialize, include for subsequent calls
        jsonRpcMessageDto -
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - 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 xAccountId,
                                                   java.lang.String mcpSessionId)
                                            throws java.lang.Exception
        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
        mcpSessionId - Session id
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • mcpDelete

        public StackoneMcpDeleteResponse mcpDelete​(StackoneMcpDeleteSecurity security,
                                                   java.lang.String xAccountId,
                                                   java.lang.String mcpSessionId,
                                                   java.util.Optional<Options> options)
                                            throws java.lang.Exception
        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
        mcpSessionId - Session id
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails