Package io.micronaut.mcp.server
Interface McpHttpServer
- All Superinterfaces:
AutoCloseable
An MCP Server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpHttpServerCreates a new defaultMcpHttpServer.static McpHttpServerReturns the defaultMcpHttpServer.intgetPort()voidstart()Starts the MCP Server.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
start
void start()Starts the MCP Server. -
getPort
int getPort()- Returns:
- The Port the server is running at
-
getEndpoint
String getEndpoint()- Returns:
- the MCP endpoint path. For example, `/mcp`
-
getDefault
Returns the defaultMcpHttpServer.- Returns:
- The default
McpHttpServer - Throws:
IllegalStateException- If noMcpHttpServerimplementation exists on the classpath.
-
createDefault
Creates a new defaultMcpHttpServer.- Returns:
- The default
McpHttpServer - Throws:
IllegalStateException- If noMcpHttpServerimplementation exists on the classpath.
-