Architecture | Project Structure | Startup Process | Server Features | Extension Points | How It Works
node dist/index.js [stdio|sse|streamableHttp]stdio)
stdio → transports/stdio.jssse → transports/sse.jsstreamableHttp → transports/streamableHttp.jscreateServer() from server/index.ts
clientConnect() upon connection.cleanup() on SIGINT.sessionId;clientConnect(sessionId) upon connection.onclose to clean and remove session./sse GET (SSE stream)/message POST (JSON‑RPC messages)sessionId;clientConnect(sessionId) upon connection./mcp for
sessionId.cleanup(sessionId) on DELETE.createServer() from server/index.tsMcpServer instance with
tools: {}logging: {}prompts: {}resources: { subscribe: true }server-instructions.md).registerTools(server).registerResources(server).registerPrompts(server).setSubscriptionHandlers(server).McpServer instanceclientConnect(sessionId) callback that enables post-connection setupcleanup(sessionId?) callback that stops any active intervals and removes any session‑scoped stateSome of the transport managers defined in the transports folder can support multiple clients.
In order to do so, they must map certain data to a session identifier.