ITADN

Simple example from README gives errors within the Inspector

#15Closedbvdmitri 创建于 2025-09-05
B
bvdmitricommented
I'm trying to setup an MPC server using this library, but get this cryptic error message both with Claude Desktop and [Inspector](https://github.com/modelcontextprotocol/inspector) I use the example from the README with `get_time`. This is the output of the Inspector terminal. I'm not sure what am I doing wrong here ``` Created client transport Created server transport Received POST message for sessionId 80a76bd8-2262-46b8-be7e-b9d9022ff9cc Received POST message for sessionId 80a76bd8-2262-46b8-be7e-b9d9022ff9cc Error from MCP server: ZodError: [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "null", "path": [ "id" ], "message": "Expected string, received null" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "null", "path": [ "id" ], "message": "Expected number, received null" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "method" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "error" ], "path": [], "message": "Unrecognized key(s) in object: 'error'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "method" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "id", "error" ], "path": [], "message": "Unrecognized key(s) in object: 'id', 'error'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "null", "path": [ "id" ], "message": "Expected string, received null" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "null", "path": [ "id" ], "message": "Expected number, received null" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" }, { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "result" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "error" ], "path": [], "message": "Unrecognized key(s) in object: 'error'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "null", "path": [ "id" ], "message": "Expected string, received null" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "null", "path": [ "id" ], "message": "Expected number, received null" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" } ], "name": "ZodError" } ], "path": [], "message": "Invalid input" } ] at get error (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/zod/v3/types.js:39:31) at ZodUnion.parse (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/zod/v3/types.js:114:22) at deserializeMessage (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:33) at ReadBuffer.readMessage (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16) at StdioClientTransport.processReadBuffer (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:141:50) at Socket.<anonymous> (file:///Users/bvdmitri/.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:103:22) at Socket.emit (node:events:508:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) { issues: [ { code: 'invalid_union', unionErrors: [Array], path: [], message: 'Invalid input' } ], addIssue: [Function (anonymous)], addIssues: [Function (anonymous)], errors: [ { code: 'invalid_union', unionErrors: [Array], path: [], message: 'Invalid input' } ] } Received POST message for sessionId 80a76bd8-2262-46b8-be7e-b9d9022ff9cc ```
关闭于 2025-12-14 5 条评论