-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Bug Description
The GitHub MCP server's create_or_update_file tool silently truncates large files (~500+ lines) when pushing to GitHub. The tool reports success (returns a valid commit SHA and file metadata), but the file content that lands on GitHub is incomplete. No error or warning is produced.
Impact on This Project
Our install.sh script was updated via the MCP create_or_update_file tool. The tool reported success, but the file that landed on GitHub was truncated, breaking the installer for users.
Root Cause
The bug is in github/github-mcp-server (GitHub's official MCP server). An issue has been filed upstream:
Upstream issue: github/github-mcp-server#2182
Reproduction Notes
A controlled test pushing 600 identical comment lines (~72KB) via create_or_update_file did NOT truncate. The truncation appears to be content-dependent — likely triggered by shell script special characters (heredocs, variable expansions, backticks, quotes).
Workaround
For large files (especially shell scripts), use gh api or git push directly instead of the MCP create_or_update_file tool. Always verify file content after pushing via MCP tools.
Severity
High — Silent data loss with a success response.