Class McpStreamableServerInfo
java.lang.Object
com.github.thought2code.mcp.annotated.server.McpServerInfo
com.github.thought2code.mcp.annotated.server.McpStreamableServerInfo
This class is used to define the information of the MCP server with streamable http support.
- Author:
- codeboyzhou
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe builder class forMcpStreamableServerInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder instance to construct aMcpStreamableServerInfoinstance.io.modelcontextprotocol.server.McpTransportContextExtractor<jakarta.servlet.http.HttpServletRequest>Returns the extractor to extract the transport context from the HTTP request.booleanReturns whether to disallow http delete requests.Returns the interval to send keep-alive messages.Returns the endpoint of the MCP server to send messages.intport()Returns the port of the MCP HTTP server.Methods inherited from class com.github.thought2code.mcp.annotated.server.McpServerInfo
capabilities, changeNotification, instructions, name, requestTimeout, version
-
Method Details
-
builder
Returns a new builder instance to construct aMcpStreamableServerInfoinstance.- Returns:
- a new builder instance
-
port
public int port()Returns the port of the MCP HTTP server.- Returns:
- the port of the MCP HTTP server
-
mcpEndpoint
Returns the endpoint of the MCP server to send messages.- Returns:
- the endpoint of the MCP server to send messages
-
disallowDelete
public boolean disallowDelete()Returns whether to disallow http delete requests.- Returns:
- whether to disallow http delete requests
-
contextExtractor
public io.modelcontextprotocol.server.McpTransportContextExtractor<jakarta.servlet.http.HttpServletRequest> contextExtractor()Returns the extractor to extract the transport context from the HTTP request.- Returns:
- the extractor to extract the transport context from the HTTP request
-
keepAliveInterval
Returns the interval to send keep-alive messages.- Returns:
- the interval to send keep-alive messages
-