Class HttpBasedConfigurableMcpServer<T extends jakarta.servlet.http.HttpServlet>
java.lang.Object
com.github.thought2code.mcp.annotated.server.configurable.AbstractConfigurableMcpServer
com.github.thought2code.mcp.annotated.server.configurable.HttpBasedConfigurableMcpServer<T>
- Type Parameters:
T- the type of MCP transport provider that will be used to handle requests
- All Implemented Interfaces:
ConfigurableMcpServer
- Direct Known Subclasses:
ConfigurableMcpSseServer,ConfigurableMcpStreamableServer
public abstract class HttpBasedConfigurableMcpServer<T extends jakarta.servlet.http.HttpServlet>
extends AbstractConfigurableMcpServer
Base class for configurable MCP servers that use HTTP as the transport protocol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe port on which the MCP server will listen for requests.protected TThe MCP transport provider that will be used to handle requests.Fields inherited from class com.github.thought2code.mcp.annotated.server.configurable.AbstractConfigurableMcpServer
configuration -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpBasedConfigurableMcpServer(McpServerConfiguration configuration) Creates a new instance ofHttpBasedConfigurableMcpServerwith the specified configuration. -
Method Summary
Methods inherited from class com.github.thought2code.mcp.annotated.server.configurable.AbstractConfigurableMcpServer
warmupMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.thought2code.mcp.annotated.server.configurable.ConfigurableMcpServer
sync
-
Field Details
-
transportProvider
The MCP transport provider that will be used to handle requests. -
port
protected int portThe port on which the MCP server will listen for requests.
-
-
Constructor Details
-
HttpBasedConfigurableMcpServer
Creates a new instance ofHttpBasedConfigurableMcpServerwith the specified configuration.- Parameters:
configuration- the configuration for the MCP server
-
-
Method Details
-
run
public void run()Runs the MCP server.This method starts the MCP server using the Jetty HTTP server.
-