Class AsyncMcp
- java.lang.Object
-
- com.stackone.stackone_client_java.AsyncMcp
-
public class AsyncMcp extends java.lang.ObjectModel Context Protocol endpoint.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackoneMcpDeleteRequestBuildermcpDelete()Delete MCP sessionjava.util.concurrent.CompletableFuture<StackoneMcpDeleteResponse>mcpDelete(StackoneMcpDeleteSecurity security, java.lang.String mcpSessionId)Delete MCP sessionjava.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 sessionStackoneMcpGetRequestBuildermcpGet()Open MCP SSE streamjava.util.concurrent.CompletableFuture<StackoneMcpGetResponse>mcpGet(StackoneMcpGetSecurity security, java.lang.String mcpSessionId)Open MCP SSE streamjava.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 streamStackoneMcpPostRequestBuildermcpPost()Send MCP JSON-RPC messagejava.util.concurrent.CompletableFuture<StackoneMcpPostResponse>mcpPost(StackoneMcpPostSecurity security, JsonRpcMessageDto jsonRpcMessageDto)Send MCP JSON-RPC messagejava.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 messageMcpsync()Switches to the sync SDK.
-
-
-
Method Detail
-
sync
public Mcp sync()
Switches to the sync SDK.- Returns:
- The sync SDK
-
mcpGet
public StackoneMcpGetRequestBuilder mcpGet()
Open MCP SSE streamOpen 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 streamOpen 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 streamOpen 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 idoptions- additional options- Returns:
CompletableFuture<StackoneMcpGetResponse>- The async response
-
mcpPost
public StackoneMcpPostRequestBuilder mcpPost()
Send MCP JSON-RPC messageSend 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 messageSend 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 messageSend 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 callsjsonRpcMessageDto-options- additional options- Returns:
CompletableFuture<StackoneMcpPostResponse>- The async response
-
mcpDelete
public StackoneMcpDeleteRequestBuilder mcpDelete()
Delete MCP sessionClose 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 sessionClose 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 sessionClose 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 idoptions- additional options- Returns:
CompletableFuture<StackoneMcpDeleteResponse>- The async response
-
-