Skip to content

server-gitlab: tools not registered due to zod v3/v4 dependency conflict #3665

@matjoos

Description

@matjoos

Bug

server-gitlab shows as "Connected" in Claude Code (claude mcp list) but no tools are registered. The tools/list MCP response returns tools with empty inputSchema: {} objects, which causes Claude Code to silently skip them.

Root cause

The npm package has a zod version conflict:

  • @modelcontextprotocol/sdk@1.0.1 depends on zod@3.x
    • zod-to-json-schema@3.25.1 resolves zod@4.x at the root
      The server's schemas in schemas.js are created with whatever zod version resolves at the root (v4). But zod-to-json-schema@3.x expects zod v3 schemas. The result: zodToJsonSchema() returns {} for every tool's inputSchema.

To reproduce

npx -y @modelcontextprotocol/server-gitlab
# Server starts, claude mcp list shows "Connected"
# But no tools appear in Claude Code

Verify the conflict:

cd ~/.npm/_npx/<cache-dir>
npm ls zod
# Shows zod@3.x under @modelcontextprotocol/sdk
# Shows zod@4.x under zod-to-json-schema (or at root)

Workaround

Downgrade the root zod in the npx cache:

cd ~/.npm/_npx/<cache-dir>/node_modules/@modelcontextprotocol/server-gitlab/../../..
npm install zod@3.25.76

After this, restart Claude Code and tools appear correctly.

Suggested fix

Pin zod to ^3.x in server-gitlab's package.json dependencies (or update zod-to-json-schema to a version compatible with zod v4).

Related

Environment

  • @modelcontextprotocol/server-gitlab@2025.4.25
    • @modelcontextprotocol/sdk@1.0.1
      • zod@4.3.6 (root) vs zod@3.25.76 (sdk)
        • macOS, Claude Code via Desktop app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions