Skip to content

[BUG] GitHub MCP server disconnects unexpectedly during Claude Code Desktop multi-file operations — recurring since v1.1.5749 #38395

@DC-AAIA

Description

@DC-AAIA

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The GitHub MCP server (@modelcontextprotocol/server-github v0.6.2) disconnects unexpectedly mid-operation during multi-file sessions in Claude Code Desktop. This has occurred repeatedly across multiple Claude Code Desktop versions (v1.1.5749 through v1.1.8359). The MCP child process is killed when the parent Desktop app crashes, leaving GitHub operations partially complete — some files pushed, others not.

Actual behavior:
GitHub error Server disconnected. For troubleshooting guidance, please visit our debugging documentation
GitHub info Server transport closed unexpectedly, this is likely due to the process exiting early.
GitHub info Client transport closed

The MCP server has no awareness of the parent crash and cannot protect in-flight operations.

What Should Happen?

The GitHub MCP server should either: (a) complete in-flight operations before allowing the parent process to exit, or (b) record sufficient state to resume or roll back the partial operation on next launch.

Error Messages/Logs

Log Evidence (mcp-server-GitHub.log — pattern recurring across dates)
[During active create_or_update_file sequence]
GitHub info 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 (console.error in JavaScript, 
  print(..., file=sys.stderr) in Python) and it will appear in this log.
GitHub error Server disconnected. metadata: { context: 'connection' }
GitHub info Client transport closed
First occurrence in logs: 2026-01-17T13:32:07.528Z
Most recent occurrence: 2026-03-24T07:25:52 (triggered by v1.1.8359 first-boot crash, see related issue #38393)

Steps to Reproduce

  1. Open a Claude Code session in Claude Desktop with the GitHub MCP server connected

  2. Initiate a multi-file operation using create_or_update_file (e.g., pushing 5+ files sequentially to a repository)

  3. During the operation, the Desktop app crashes (due to session limit exhaustion, update restart, or first-boot instability)

4.Observe: mcp-server-GitHub.log records Server transport closed unexpectedly and Server disconnected with no graceful shutdown

  1. GitHub repository is left in partial state — some commits succeeded, others were dropped

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.78

Platform

Claude Code Desktop — Windows 10 x64

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Environment:
OS: Windows 10/11 x64
Claude Desktop versions affected: v1.1.5749, v1.1.7714, v1.1.8359 (confirmed across all three)
Claude Code version: v2.1.78
MCP server: @modelcontextprotocol/server-github v0.6.2
Node version: 24.13.0

Additional Context

This issue is directly compounded by the first-boot crash bug (filed separately). The lack of graceful shutdown coordination between the Electron parent process and MCP child processes means any Desktop instability immediately corrupts in-flight git operations. A partial-operation detection or transaction-style commit grouping in the GitHub MCP server would mitigate the data loss impact even if the parent crash cannot be prevented.

Related Issues

First-boot crash of v1.1.8359: #38393

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssue doesn't seem to be related to Claude Code

    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