Skip to content

[BUG] Error thrown for Object schemas #1701

@oidebrett

Description

@oidebrett

Issue

I am getting an error recently regarding using.safeExtend(), somewhere inside @mcpjam/inspector,

which breaks in Zod v4.

How to reproduce

  1. Try to run: npx @mcpjam/inspector@latest
  2. See error:

file:///Users/mattercoder/.npm/_npx/d1af9de5c448057a/node_modules/zod/v4/core/util.js:375
        throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
              ^

Error: Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.
    at Module.extend (file:///Users/mattercoder/.npm/_npx/d1af9de5c448057a/node_modules/zod/v4/core/util.js:375:15)
    at inst.extend (file:///Users/mattercoder/.npm/_npx/d1af9de5c448057a/node_modules/zod/v4/classic/schemas.js:536:21)
    at file:///Users/mattercoder/.npm/_npx/d1af9de5c448057a/node_modules/@mcpjam/inspector/dist/server/index.js:12026:45
    at ModuleJob.run (node:internal/modules/esm/module_job:413:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:654:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.2.1
⚠️  Server did not become ready within 30s. Please visit http://127.0.0.1:6274 manually.

Expected Behavior

MCPJam inspector should open in browser but it doesnt

Screenshots

If applicable, add screenshots to help explain your problem.

Platform

% node --version                                                                              
v25.2.1
% npm --version                                                                               
11.6.2
% uname -a
Darwin MacBook 25.4.0 Darwin Kernel Version 25.4.0: Thu Mar 19 19:31:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8132 arm64

Additional Context

Add any other context about the problem here.

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