Skip to content

MacOS Claude Desktop - 'Server transport closed unexpectedly, this is likely due to the process exiting early' error #1748

Description

@srustamo

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:

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions