Title: Error from MCP server: SyntaxError: Unexpected token 'E', "Error: typ"... is not valid JSON · Issue #409 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Error from MCP server: SyntaxError: Unexpected token 'E', "Error: typ"... is not valid JSON · Issue #409 · modelcontextprotocol/python-sdk
X Title: Error from MCP server: SyntaxError: Unexpected token 'E', "Error: typ"... is not valid JSON · Issue #409 · modelcontextprotocol/python-sdk
Description: When i run the app with cmd = mcp dev server.py then when i click on connect button i got this issue Stdio transport: command=C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\uv.exe, args=run,--with,mcp,mcp,run,server.py Spa...
Open Graph Description: When i run the app with cmd = mcp dev server.py then when i click on connect button i got this issue Stdio transport: command=C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\uv.exe, a...
X Description: When i run the app with cmd = mcp dev server.py then when i click on connect button i got this issue Stdio transport: command=C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\uv.exe, a...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/409
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON","articleBody":"When i run the app with \ncmd = mcp dev server.py\n\nthen when i click on connect button i got this issue\n\nStdio transport: command=C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\uv.exe, args=run,--with,mcp,mcp,run,server.py\nSpawned stdio transport\nConnected MCP client to backing server transport\nCreated web app transport\nCreated web app transport\nSet up MCP proxy\nError from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON\n at JSON.parse (\u003canonymous\u003e)\n at deserializeMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)\n at ReadBuffer.readMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)\n at StdioClientTransport.processReadBuffer (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)\n at Socket.\u003canonymous\u003e (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\nError from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON\n at JSON.parse (\u003canonymous\u003e)\n at deserializeMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)\n at ReadBuffer.readMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)\n at StdioClientTransport.processReadBuffer (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)\n at Socket.\u003canonymous\u003e (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\nError from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON\n at JSON.parse (\u003canonymous\u003e)\n at deserializeMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)\n at ReadBuffer.readMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)\n at StdioClientTransport.processReadBuffer (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)\n at Socket.\u003canonymous\u003e (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\nError from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON\n at JSON.parse (\u003canonymous\u003e)\n at deserializeMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)\n at ReadBuffer.readMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)\n at StdioClientTransport.processReadBuffer (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)\n at Socket.\u003canonymous\u003e (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\nError from MCP server: SyntaxError: Unexpected token 'E', \"Error: typ\"... is not valid JSON\n at JSON.parse (\u003canonymous\u003e)\n at deserializeMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:26:44)\n at ReadBuffer.readMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js:19:16)\n at StdioClientTransport.processReadBuffer (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:114:50)\n at Socket.\u003canonymous\u003e (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js:93:22)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\nReceived message for sessionId ac082c68-292e-4cbd-b85e-42046b434b38\nError in /message route: Error: SSE connection not established\n at SSEServerTransport.handlePostMessage (file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sse.js:53:19)\n at file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/inspector/server/build/index.js:129:25\n at Layer.handle [as handle_request] (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at next (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\route.js:149:13)\n at Route.dispatch (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\route.js:119:3)\n at Layer.handle [as handle_request] (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\index.js:284:15\n at Function.process_params (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\cors\\lib\\index.js:188:7)\nnode:_http_outgoing:699\n throw new ERR_HTTP_HEADERS_SENT('set');\n ^\n\nError [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client\n at ServerResponse.setHeader (node:_http_outgoing:699:11)\n at ServerResponse.header (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\response.js:794:10)\n at ServerResponse.json (C:\\Users\\User\\AppData\\Local\\npm-cache\\_npx\\5a9d879542beca3a\\node_modules\\express\\lib\\response.js:275:10)\n at file:///C:/Users/User/AppData/Local/npm-cache/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/inspector/server/build/index.js:133:25\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {\n code: 'ERR_HTTP_HEADERS_SENT'\n}\n\nNode.js v22.14.0","author":{"url":"https://github.com/abdulsaminexusaeon","@type":"Person","name":"abdulsaminexusaeon"},"datePublished":"2025-04-02T08:33:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/409/python-sdk/issues/409"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ab1341b4-e808-65d1-7fd8-a4431a0702f3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C372:1755F3:624359:85D27C:6A62A308 |
| html-safe-nonce | c0766025a81d9bb6898ee63dbca7942503a5b61fdf0788131815847fcd9138a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzcyOjE3NTVGMzo2MjQzNTk6ODVEMjdDOjZBNjJBMzA4IiwidmlzaXRvcl9pZCI6IjQ0MjQ3NTk2MTYwMzcxMDIzNDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0b4159c263bcfdf4cb03398af3f82c219cc956bb7ec989cc4cec2318a7ac46f8 |
| hovercard-subject-tag | issue:2965612191 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/409/issue_layout |
| twitter:image | https://opengraph.githubassets.com/083c65ee0382838c4b86796ba07b447a66c16e4e28d004141dbb63369c91713d/modelcontextprotocol/python-sdk/issues/409 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/083c65ee0382838c4b86796ba07b447a66c16e4e28d004141dbb63369c91713d/modelcontextprotocol/python-sdk/issues/409 |
| og:image:alt | When i run the app with cmd = mcp dev server.py then when i click on connect button i got this issue Stdio transport: command=C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\uv.exe, a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abdulsaminexusaeon |
| hostname | github.com |
| expected-hostname | github.com |
| None | a6443033349a18134b517627f043d4a59a5110337b879810c7229c2c7e28eda0 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d6c6cacbe32d3ddfd1796fbd1a39b8fb47b87daf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width