Package io.micronaut.mcp.server
Interface McpHttpServer
- All Superinterfaces:
AutoCloseable
An MCP Server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpHttpServer
Creates a new defaultMcpHttpServer
.static McpHttpServer
Returns the defaultMcpHttpServer
.int
getPort()
void
start()
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 noMcpHttpServer
implementation exists on the classpath.
-
createDefault
Creates a new defaultMcpHttpServer
.- Returns:
- The default
McpHttpServer
- Throws:
IllegalStateException
- If noMcpHttpServer
implementation exists on the classpath.
-