whatsapp-mcp / server/mcp / buildMcpServer
Function: buildMcpServer()
function buildMcpServer(transport): Server;Defined in: src/server/mcp.ts:50
Build a fresh MCP Server instance with every registered tool mounted.
Parameters
transport
"http" | "stdio"
which transport this server will be hosted on; only used to seed ToolContext.transport for audit/log lines.
Returns
Server
Remarks
Each call constructs a new Server so that tests can spin up isolated instances. In production we construct one and hand it to the transport.