Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

@primeuix/mcp v1.0.1 fails to start with @modelcontextprotocol/sdk >= 1.28.x #228

Description

@ryansorensen

Description

The MCP server fails to start with the following error:

  Failed to start PrimeVue MCP Server: Error: Tool get_composable expected a Zod schema or ToolAnnotations, but received an unrecognized object
      at McpServer.tool (file:///.../@modelcontextprotocol/sdk/dist/esm/server/mcp.js:688:27)

Root Cause

In @primeuix/mcp, the internal F function that registers custom tools (passed via the customTools option) calls McpServer.tool() with a plain JSON object as the input schema:

function F(a, e, n) {
    for (let c of n) {
        let r = {};
        for (let [l, t] of Object.entries(c.parameters))
            r[l] = { type: t.type, description: t.description }; // ❌ plain object
        a.tool(c.name, c.description, r, ...);
    }
}

Starting with @modelcontextprotocol/sdk v1.28.x, McpServer.tool() now strictly validates that the schema argument is either a Zod schema or a ToolAnnotations object. Passing a plain object with nested values (like { name: { type: "string", description: "..." } }) throws an error.

Since @primeuix/mcp depends on "@modelcontextprotocol/sdk": "^1.25.2", users will automatically get a version that breaks the server.

Fix

The F function should convert parameter definitions to Zod schemas and use registerTool() instead of tool():

function F(a, e, n) {
    for (let c of n) {
        let r = {};
        for (let [l, t] of Object.entries(c.parameters)) {
            let schema = t.type === "boolean" ? z.boolean()
                       : t.type === "number"  ? z.number()
                       : z.string();
            r[l] = t.description ? schema.describe(t.description) : schema;
        }
        a.registerTool(c.name, { description: c.description, inputSchema: r }, ...);
    }
}

Steps to Reproduce

npx -y @primevue/mcp

Environment

  • @primevue/mcp: 4.5.4
  • @primeuix/mcp: 1.0.1
  • @modelcontextprotocol/sdk: 1.29.0 (resolved via ^1.25.2)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions