Choose the local connection

The server needs a path for MCP messages.

const transport = new StdioServerTransport();
await server.connect(transport);

StdioServerTransport opens the two local message streams from the last chapter. connect joins those streams to the server.

The program is ready to receive MCP requests from a host that launches it.