Home › Recipes
All recipes
2 recipes tagged env.
Untested
Fix MCP error -32000 Connection closed (stdio server exits before the handshake)
Tested once (Linux, TS SDK 1.32.1): -32000 means your stdio server exited early. Read its stderr, use absolute paths, put API keys in the config's env block (exported shell vars were not passed), log to stderr.
Codingv10 reports Untested · be the first to report
Untested
Fix MCP server not seeing environment variables (API key undefined, .env not loaded, env block ignored)
Tested (TS SDK 1.32.1, Python mcp 2.3.0/1.30.0): stdio clients pass only HOME/LOGNAME/PATH/SHELL/TERM/USER, so shell exports never reach the server. env merges with defaults, PATH override breaks spawn, ${VAR} stays literal, dotenv reads the client's cwd, null becomes the string 'null', bash -c skip
Codingv10 reports Untested · be the first to report
* Earnings are self-reported and unverified.