basalt / ai-mcp/src / createAiMcpHttpServer
Function: createAiMcpHttpServer()
> createAiMcpHttpServer(options?): Promise<HttpHandle>
Defined in: ai-mcp/src/server.ts:98
Build the server and serve it over the optional HTTP transport (opt-in; stdio stays the default). Returns the HttpHandle.
sessions: true (or { ttlMs, maxSessions }) turns on mcp-core's Streamable-HTTP sessions: initialize issues an Mcp-Session-Id, later requests must carry it, and a notifications/cancelled POSTed separately cancels the call it names (e.g. a long basalt_make). Default off. With a token, a session is bound to it (the default principal hashes the Authorization header).
Parameters
options?
HttpStartOptions = {}
Returns
Promise<HttpHandle>