- Symptom
- TypeError: server.tool is not a functionModule '"@modelcontextprotocol/server"' has no exported member 'SSEServerTransport'mcp-handler 2.x rejects the basePath, redisUrl, or sseEndpoint options
- Cause
- The v2 packages split @modelcontextprotocol/sdk into client, server, and adapter packages, removed the variadic server.tool, server.prompt, and server.resource, and dropped the server-side HTTP plus SSE transport. mcp-handler 2.x follows the same change and removes its 1.x route options.
- Fix
- Use registerTool, registerPrompt, and registerResource with a config object and a z.object schema. Serve Streamable HTTP; only a client limited to the old SSE transport still needs @modelcontextprotocol/server-legacy/sse.
- Apply
server.registerTool('greet', { description: 'Greet a user', inputSchema: z.object({ name: z.string() }) }, async ({ name }) => ({ content: [{ type: 'text', text: `Hello, ${name}` }] }));- Affected
- @modelcontextprotocol/server 2.x and mcp-handler 2.x; @modelcontextprotocol/sdk 1.x and mcp-handler 1.x keep the old API
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders