Skip to content

toolmark-monorepo / @toolmark/mcp / createServerFactory

Function: createServerFactory() ​

createServerFactory(link, o?): McpServerFactory

Defined in: packages/mcp/src/server/server.ts:140

Builds the MCP server factory for serveStdio (spec §11.3, D31). Each instance is a low-level Server advertising tools.listChanged, whose tools/list and tools/call handlers read the shared link; link changes send notifications/tools/list_changed (routed per era by the SDK) until the instance closes.

Parameters ​

PageLink

The paired-page link.

o? ​

ServerFactoryOptions = {}

Server version and error sink.

Returns ​

McpServerFactory

A factory usable with serveStdio for both protocol eras.