When I added the npx installation to my local MCP server in Claude, I get the error:
Unexpected token '◇', "◇ injected"... is not valid JSON
I dug into the source code and found out that it was because of the package json declaring an empty dotenv version and dotenv 17 onwards prints out a startup banner by default on every startup and stdio mcp servers uses stdout exclusively as its JSON-RPC channel so the default startup banner corrupts the stream which results in the client failing to parse the handshake.
I have opened a PR #8 which solves this by pinning the dotenv version and also suppressing the banner.
When I added the npx installation to my local MCP server in Claude, I get the error:
Unexpected token '◇', "◇ injected"... is not valid JSONI dug into the source code and found out that it was because of the package json declaring an empty dotenv version and dotenv 17 onwards prints out a startup banner by default on every startup and stdio mcp servers uses stdout exclusively as its JSON-RPC channel so the default startup banner corrupts the stream which results in the client failing to parse the handshake.
I have opened a PR #8 which solves this by pinning the dotenv version and also suppressing the banner.