Skip to content

TypeError: e.custom is not a function in Deno environments (v1.23.0)#1182

@tonxxd

Description

@tonxxd

Version 1.23.0 of @modelcontextprotocol/sdk causes a runtime error when deployed to Deno environments (like Supabase Edge Functions) and loaded via esm.sh. The error manifests as:

TypeError: e.custom is not a function at https://esm.sh/@modelcontextprotocol/[email protected]/denonext/server.mjs:2:879 

Full Error Message:

event loop error: TypeError: e.custom is not a function at https://esm.sh/@modelcontextprotocol/[email protected]/denonext/server.mjs:2:879 

Metadata:

{"boot_time": null, "cpu_time_used": null, "deployment_id": "***-1128-40b3-beb9-407d0f792249_1", "event_type": "UncaughtException", "execution_id": "d87ff15d-c9bd-44b5-bd1e-0268e10cc797", "function_id": "daeab985-1128-40b3-beb9-407d0f792249", "level": "error", "memory_used": [], "project_ref": "****", "reason": null, "region": "eu-central-1", "served_by": "supabase-edge-runtime-1.69.25 (compatible with Deno v2.1.4)", "timestamp": "2025-11-27T13:39:44.249Z", "version": "1" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions