Skip to content

docs(memory): add WSL2 troubleshooting for npx stdout JSON parse errors#3804

Open
ssam18 wants to merge 2 commits into
modelcontextprotocol:mainfrom
ssam18:docs/memory-wsl2-troubleshooting
Open

docs(memory): add WSL2 troubleshooting for npx stdout JSON parse errors#3804
ssam18 wants to merge 2 commits into
modelcontextprotocol:mainfrom
ssam18:docs/memory-wsl2-troubleshooting

Conversation

@ssam18

@ssam18 ssam18 commented Apr 3, 2026

Copy link
Copy Markdown

Running the memory server via npx in WSL2 causes JSON parse errors at a fixed byte offset because npx writes package resolution output to stdout, which corrupts the MCP stdio JSON-RPC stream. Added a troubleshooting section with two workarounds:

  1. global install
  2. direct node invocation

So users can get unblocked without needing to dig through issues..

…e errors

Explains why `npx -y @modelcontextprotocol/server-memory` causes
"Unexpected non-whitespace character after JSON at position 127" errors
in WSL2, and provides two workarounds: global npm install and direct
node invocation. Fixes modelcontextprotocol#3013.
@cliffhall

Copy link
Copy Markdown
Member

We aren't accepting unsolicited out-of-scope guides/docs. This doesn't seem like a problem specific to this server but to WSL and stdio servers in general.

@BossChaos

This comment was marked as abuse.

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: Verified MCP server implementation for consistency with current SDK patterns.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants