modelcontextprotocol / modelcontextprotocol/servers
MacOS Claude Desktop - 'Server transport closed unexpectedly, this is likely due to the process exiting early' error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 90.5k
- Forks
- 11.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 5
Description
Describe the bug
MCP Server starts fine
Claude Desktop (the client) connects and sends an "initialize" message
Immediately after, the connection drops
Either Claude Desktop crashes / exits
Or the server crashes right after receiving the message
Server tries to write back → EPIPE error (because client connection is already closed)
Everything shuts down cleanly but prematurely
To Reproduce
Steps to reproduce the behavior:
- Install MCP server with
npm i @modelcontextprotocol/server-filesystem
Expected behavior
Claude Desktop connects to sever successfully.
Logs
2025-05-12T13:59:25.751Z [info] [filesystem] Initializing server...
2025-05-12T13:59:25.773Z [info] [filesystem] Server started and connected successfully
2025-05-12T13:59:25.783Z [info] [filesystem] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-05-12T13:59:25.784Z [error] [filesystem] write EPIPE
2025-05-12T13:59:25.786Z [info] [filesystem] Server transport closed
2025-05-12T13:59:25.786Z [info] [filesystem] Client transport closed
2025-05-12T13:59:25.787Z [info] [filesystem] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...') in JavaScript, print('...', file=sys.stderr) in python) and it will appear in this log.
2025-05-12T13:59:25.787Z [error] [filesystem] Server disconnected. For troubleshooting guidance, please visit our debugging documentation
2025-05-12T13:59:25.787Z [info] [filesystem] Client transport closed
2025-05-12T14:01:11.577Z [info] [filesystem] Initializing server...
2025-05-12T14:01:11.591Z [info] [filesystem] Server started and connected successfully
2025-05-12T14:01:11.596Z [info] [filesystem] Server transport closed
2025-05-12T14:01:11.596Z [info] [filesystem] Client transport closed
2025-05-12T14:01:11.596Z [info] [filesystem] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...') in JavaScript, print('...', file=sys.stderr) in python) and it will appear in this log.
2025-05-12T14:01:11.596Z [error] [filesystem] Server disconnected. For troubleshooting guidance, please visit our debugging documentation
2025-05-12T14:01:11.597Z [info] [filesystem] Client transport closed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with @modelcontextprotocol/server-filesystem from Claude Desktop on macOS, using the initialize-message and EPIPE logs as the baseline. Inspect the server transport and package entry point involved in handling initialization. Done means Claude Desktop remains connected after initialization without the EPIPE or premature transport-closure errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, node.js, typescript
- Domain
- api, backend, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100