René's URL Explorer Experiment


Title: [FEATURE] MCP stdio server exits silently when JSON-RPC messages are CRLF-terminated · Issue #668 · stackql/stackql · GitHub

Open Graph Title: [FEATURE] MCP stdio server exits silently when JSON-RPC messages are CRLF-terminated · Issue #668 · stackql/stackql

X Title: [FEATURE] MCP stdio server exits silently when JSON-RPC messages are CRLF-terminated · Issue #668 · stackql/stackql

Description: Summary stackql mcp --mcp.server.type=stdio exits immediately with code 0 and no error output if an incoming JSON-RPC line is terminated with \r\n instead of \n. The stray \r at the end of the line appears to kill the server's message lo...

Open Graph Description: Summary stackql mcp --mcp.server.type=stdio exits immediately with code 0 and no error output if an incoming JSON-RPC line is terminated with \r\n instead of \n. The stray \r at the end of the line...

X Description: Summary stackql mcp --mcp.server.type=stdio exits immediately with code 0 and no error output if an incoming JSON-RPC line is terminated with \r\n instead of \n. The stray \r at the end of the line...

Opengraph URL: https://github.com/stackql/stackql/issues/668

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE] MCP stdio server exits silently when JSON-RPC messages are CRLF-terminated","articleBody":"## Summary\n\n`stackql mcp --mcp.server.type=stdio` exits immediately with code 0 and no error output if an incoming JSON-RPC line is terminated with `\\r\\n` instead of `\\n`. The stray `\\r` at the end of the line appears to kill the server's message loop. Nothing is written to stdout, stderr, or the sink log, so from the client's side the server just dies with a clean exit code, which makes this very hard to diagnose.\n\n## Environment\n\n- stackql version: 0.10.500\n- OS: Windows 11 (also reproducible anywhere by sending CRLF line endings)\n- Invocation: `stackql mcp --mcp.server.type=stdio --auth='{\"github\":{\"type\":\"null_auth\"}}'`\n\n## Steps to reproduce\n\nLF-terminated message - works (server responds to `initialize`):\n\n~~~bash\n{ printf '{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"repro\",\"version\":\"1\"}},\"id\":1}\\n'; sleep 8; } \\\n  | stackql mcp --mcp.server.type=stdio --auth='{\"github\":{\"type\":\"null_auth\"}}'\n~~~\n\nCRLF-terminated message - server exits with code 0, no response, no error:\n\n~~~bash\n{ printf '{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"repro\",\"version\":\"1\"}},\"id\":1}\\r\\n'; sleep 8; } \\\n  | stackql mcp --mcp.server.type=stdio --auth='{\"github\":{\"type\":\"null_auth\"}}'\n~~~\n\nEquivalent Python repro (this is how it was found - `subprocess.Popen(..., text=True)` on Windows translates `\\n` to `\\r\\n` on the child's stdin):\n\n~~~python\nimport json, subprocess, time\n\ncmd = [\"stackql\", \"mcp\", \"--mcp.server.type=stdio\",\n       '--auth={\"github\":{\"type\":\"null_auth\"}}']\n\n# text=True on Windows writes \\r\\n to the child's stdin\nproc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,\n                        stderr=subprocess.PIPE, text=True)\nmsg = {\"jsonrpc\": \"2.0\", \"method\": \"initialize\",\n       \"params\": {\"protocolVersion\": \"2024-11-05\", \"capabilities\": {},\n                  \"clientInfo\": {\"name\": \"repro\", \"version\": \"1\"}}, \"id\": 1}\nproc.stdin.write(json.dumps(msg) + \"\\n\")\nproc.stdin.flush()\ntime.sleep(10)\nprint(\"returncode:\", proc.poll())   # 0 - exited, no response ever written\n~~~\n\nSwitching the same script to binary pipes (no newline translation) makes the handshake succeed.\n\n## Expected behaviour\n\nEither of:\n\n1. Tolerate CRLF: strip a trailing `\\r` from each line before JSON parsing. The MCP spec's stdio transport delimits messages with newlines, and CRLF-emitting clients exist in practice (anything spawning the server through a text-mode pipe on Windows).\n2. At minimum, fail loudly: log a parse error to stderr and/or the sink log, and exit non-zero, instead of exiting 0 in silence.\n\n## Actual behaviour\n\nThe process exits with code 0. Nothing is written to stdout. The sink log file is created but empty. The only stderr output is the usual `sink file: \u003cpath\u003e` line.\n\n## Impact\n\nAny MCP client (or test harness) that ends up writing CRLF-terminated lines on Windows sees the server \"start and immediately die\" with a success exit code and zero diagnostics. This cost real debugging time while smoke testing the Windows `.mcpb` bundle.\n\n","author":{"url":"https://github.com/jeffreyaven","@type":"Person","name":"jeffreyaven"},"datePublished":"2026-06-12T04:09:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/668/stackql/issues/668"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b6c7f2e0-b40c-363a-fa5f-d89880c68626
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD806:53D51:12C8F95:1ACE74E:6A4CBED9
html-safe-nonce5691d07ab9e0c0effd214d0bba54ee041592d45da43887db239076b8d76c23c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODA2OjUzRDUxOjEyQzhGOTU6MUFDRTc0RTo2QTRDQkVEOSIsInZpc2l0b3JfaWQiOiI0NTMyODIxNzU3NzA3MjA2MzYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6728067043ec2ae22394c1d85f7507a5afefb93bbea21fa76f683d0a0ec8eac2
hovercard-subject-tagissue:4646189533
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackql/stackql/668/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e798dc7fff78dd7e9f4ce23ac20f31533858ea602a96cba58e8b2edd66ae4b02/stackql/stackql/issues/668
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e798dc7fff78dd7e9f4ce23ac20f31533858ea602a96cba58e8b2edd66ae4b02/stackql/stackql/issues/668
og:image:altSummary stackql mcp --mcp.server.type=stdio exits immediately with code 0 and no error output if an incoming JSON-RPC line is terminated with \r\n instead of \n. The stray \r at the end of the line...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeffreyaven
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/stackql/stackql git https://github.com/stackql/stackql.git
octolytics-dimension-user_id95105302
octolytics-dimension-user_loginstackql
octolytics-dimension-repository_id443987542
octolytics-dimension-repository_nwostackql/stackql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id443987542
octolytics-dimension-repository_network_root_nwostackql/stackql
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec03e7e569190bc89b638cdd4acb4b6c6b38a170a
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/stackql/stackql/issues/668#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackql%2Fstackql%2Fissues%2F668
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackql%2Fstackql%2Fissues%2F668
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=stackql%2Fstackql
Reloadhttps://github.com/stackql/stackql/issues/668
Reloadhttps://github.com/stackql/stackql/issues/668
Reloadhttps://github.com/stackql/stackql/issues/668
Please reload this pagehttps://github.com/stackql/stackql/issues/668
stackql https://github.com/stackql
stackqlhttps://github.com/stackql/stackql
Please reload this pagehttps://github.com/stackql/stackql/issues/668
Notifications https://github.com/login?return_to=%2Fstackql%2Fstackql
Fork 80 https://github.com/login?return_to=%2Fstackql%2Fstackql
Star 861 https://github.com/login?return_to=%2Fstackql%2Fstackql
Code https://github.com/stackql/stackql
Issues 101 https://github.com/stackql/stackql/issues
Pull requests 1 https://github.com/stackql/stackql/pulls
Discussions https://github.com/stackql/stackql/discussions
Actions https://github.com/stackql/stackql/actions
Projects https://github.com/stackql/stackql/projects
Wiki https://github.com/stackql/stackql/wiki
Security and quality 0 https://github.com/stackql/stackql/security
Insights https://github.com/stackql/stackql/pulse
Code https://github.com/stackql/stackql
Issues https://github.com/stackql/stackql/issues
Pull requests https://github.com/stackql/stackql/pulls
Discussions https://github.com/stackql/stackql/discussions
Actions https://github.com/stackql/stackql/actions
Projects https://github.com/stackql/stackql/projects
Wiki https://github.com/stackql/stackql/wiki
Security and quality https://github.com/stackql/stackql/security
Insights https://github.com/stackql/stackql/pulse
#680https://github.com/stackql/stackql/pull/680
[FEATURE] MCP stdio server exits silently when JSON-RPC messages are CRLF-terminatedhttps://github.com/stackql/stackql/issues/668#top
#680https://github.com/stackql/stackql/pull/680
https://github.com/jeffreyaven
enhancementNew feature or requesthttps://github.com/stackql/stackql/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/jeffreyaven
jeffreyavenhttps://github.com/jeffreyaven
on Jun 12, 2026https://github.com/stackql/stackql/issues/668#issue-4646189533
jeffreyavenhttps://github.com/jeffreyaven
enhancementNew feature or requesthttps://github.com/stackql/stackql/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.