Skip to content

MCP Apps SDK callServerTool() fails - "Invalid JSON-RPC message received" in Claude Desktop #386

@yaniv-golan

Description

@yaniv-golan

Describe the bug
When an MCP App UI calls app.callServerTool() from the @modelcontextprotocol/ext-apps SDK (v1.0.1), Claude Desktop rejects the message with a Zod validation error. The MCP Apps specification explicitly supports tools/call from UIs during the Interactive Phase, but Claude Desktop's App Bridge does not accept the message format.

To Reproduce

  1. Create an MCP server with a tool that has an associated UI
  2. In the UI's JavaScript, load the SDK and call callServerTool() after connecting:
import { App } from 'https://cdn.jsdelivr.net/npm/@modelcontextprotocol/ext-apps@1.0.1/+esm';

const app = new App({ name: "test", version: "1.0.0" });

app.connect().then(async () => {
  const result = await app.callServerTool('my-tool', { someArg: 'value' });
});
  1. Run the tool in Claude Desktop so the UI loads
  2. Observe the error toast in Claude Desktop

Expected behavior
Per the MCP Apps specification (2026-01-26), UIs can send tools/call requests to the host during the Interactive Phase. The host should proxy these to the MCP server and return results to the UI.

Logs

Invalid JSON-RPC message received: [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "params" ], "message": "Expected object, received string" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "object", "received": "string", "path": [ "params" ], "message": "Expected object, received string" }, { "code": "unrecognized_keys", "keys": [ "id" ], "path": [], "message": "Unrecognized key(s) in object: 'id'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "result" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "method", "params" ], "path": [], "message": "Unrecognized key(s) in object: 'method', 'params'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "error" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "method", "params" ], "path": [], "message": "Unrecognized key(s) in object: 'method', 'params'" } ], "name": "ZodError" } ], "path": [], "message": "Invalid input" } ]

Additionally, the MCP server connection drops after the error ("Unable to reach [server-name]").

Additional context

  • Claude Desktop: Latest version (Jan 28, 2026)
  • SDK: @modelcontextprotocol/ext-apps@1.0.1
  • OS: macOS

The Zod errors suggest a mismatch between what the SDK sends via postMessage and what Claude Desktop's App Bridge schema expects. This blocks UI-initiated tool calls, which are needed for use cases like polling for progress updates during long-running operations.

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