Title: Source code files corrupted when server/tool attempts to base64 encode my files on read and write · Issue #841 · github/github-mcp-server · GitHub
Open Graph Title: Source code files corrupted when server/tool attempts to base64 encode my files on read and write · Issue #841 · github/github-mcp-server
X Title: Source code files corrupted when server/tool attempts to base64 encode my files on read and write · Issue #841 · github/github-mcp-server
Description: Describe the bug I had an awesome day with GPT 5.0 and a more sophisticated prompt/spec that would do multi change batches with Github MCP, but in the end my files got corrupted. It was corrupted because the MCP seems to only work with b...
Open Graph Description: Describe the bug I had an awesome day with GPT 5.0 and a more sophisticated prompt/spec that would do multi change batches with Github MCP, but in the end my files got corrupted. It was corrupted b...
X Description: Describe the bug I had an awesome day with GPT 5.0 and a more sophisticated prompt/spec that would do multi change batches with Github MCP, but in the end my files got corrupted. It was corrupted b...
Opengraph URL: https://github.com/github/github-mcp-server/issues/841
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Source code files corrupted when server/tool attempts to base64 encode my files on read and write","articleBody":"### Describe the bug\n\nI had an awesome day with GPT 5.0 and a more [sophisticated prompt/spec that would do multi change batches](https://gist.github.com/paulyuk/ff7c3d45f19a2b3739bbf249798a5140) with Github MCP, but in the end my files got [corrupted](https://github.com/paulyuk/functions-quickstart-dotnet-azd-eventgrid-blob/commit/ba8485af126fda3a0960080c1ab92dee536a29f1). It was corrupted because the MCP seems to only work with base64 blobs and not actual text/code files from github (), and then it writes base64 back over my code files. Details below. I don't know if it matters (validating now) but I was using today's new GPT 5.0 preview.\n\n### Detailed response from agent mode\n```\nCannot safely rewrite all remote main.bicep files here because I only have the base64 blobs (and the raw fetch tool returns truncated snippets with ellipses), so producing full, exact, whitespace‑preserving replacements (removing just the single deprecated output line) risks introducing corruption similar to the earlier csproj issue.\nSummary of findings:\nAll sampled dotnet templates (eventgrid-blob, dotnet-sql) still contain: output APPLICATIONINSIGHTS_CONNECTION_STRING string = monitoring.outputs.connectionString\nLikely present in the other language templates too (pattern is consistent across these AZD samples).\nRoot cause of earlier miss:\nInfra removal step never executed; workflow focused only on csproj/package edits; no audit pass enforced absence of the output.\n```\n\n### Steps to reproduce the behavior\n\n1. Run the prompt spec above\n2. Observe commits made by Github MCP server. See already done examples above.\n\n\n### Expected vs actual behavior\n\nThese are just source code files (xml, json, js) so text should come in and text should go out. Never base64.\n\n### Logs\n\n```\nTool Call - call_nldxATetAhrrZMmutwn6wRL6__vscode-1754595944293\nRequest\nid : call_nldxATetAhrrZMmutwn6wRL6__vscode-1754595944293\ntool : mcp_github_get_file_contents\nargs : {\n \"owner\": \"Azure-Samples\",\n \"repo\": \"functions-quickstart-dotnet-azd-eventgrid-blob\",\n \"path\": \"src/src.csproj\",\n \"branch\": \"main\"\n}\nResponse\n{\"type\":\"file\",\"encoding\":\"base64\",\"size\":1482,\"name\":\"src.csproj\",\"path\":\"src/src.csproj\",\"content\":\"77u/PFByb2plY3QgU2RrPSJNaWNyb3NvZnQuTkVULlNkayI+CiAgPFByb3Bl\\ncnR5R3JvdXA+CiAgICA8VGFyZ2V0RnJhbWV3b3JrPm5ldDguMDwvVGFyZ2V0\\nRnJhbWV3b3JrPgogICAgPEF6dXJlRnVuY3Rpb25zVmVyc2lvbj52NDwvQXp1\\ncmVGdW5jdGlvbnNWZXJzaW9uPgogICAgPE91dHB1dFR5cGU+RXhlPC9PdXRw\\ndXRUeXBlPgogICAgPEltcGxpY2l0VXNpbmdzPmVuYWJsZTwvSW1wbGljaXRV\\nc2luZ3M+CiAgICA8TnVsbGFibGU+ZW5hYmxlPC9OdWxsYWJsZT4KICAgIDxV\\nc2VyU2VjcmV0c0lkPjc2MzM5NGRmLWI4MDctNGY4Mi04ZTUwLTI1MTZlNDBj\\nM2M1YjwvVXNlclNlY3JldHNJZD4KICA8L1Byb3BlcnR5R3JvdXA+CiAgPEl0\\nZW1Hcm91cD4KICAgIDxGcmFtZXdvcmtSZWZlcmVuY2UgSW5jbHVkZT0iTWlj\\ncm9zb2Z0LkFzcE5ldENvcmUuQXBw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ibG9jYWwuc2V0dGluZ3MuanNvbiI+CiAgICAgIDxDb3B5\\nVG9PdXRwdXREaXJlY3Rvcnk+UHJlc2VydmVOZXdlc3Q8L0NvcHlUb091dHB1\\ndERpcmVjdG9yeT4KICAgICAgPENvcHlUb1B1Ymxpc2hEaXJlY3Rvcnk+TmV2\\nZXI8L0NvcHlUb1B1Ymxpc2hEaXJlY3Rvcnk+CiAgICA8L05vbmU+CiAgPC9J\\ndGVtR3JvdXA+CiAgPEl0ZW1Hcm91cD4KICAgIDxVc2luZyBJbmNsdWRlPSJT\\neXN0ZW0uVGhyZWFkaW5nLkV4ZWN1dGlvbkNvbnRleHQiIEFsaWFzPSJFeGVj\\ndXRpb25Db250ZXh0IiAvPgogIDwvSXRlbUdyb3VwPgo8L1Byb2plY3Q+\\n\",\"sha\":\"dfedb117726cf0cddfb5fe0f7964d7f60689299d\",\"url\":\"https://api.github.com/repos/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/contents/src/src.csproj?ref=main\",\"git_url\":\"https://api.github.com/repos/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/git/blobs/dfedb117726cf0cddfb5fe0f7964d7f60689299d\",\"html_url\":\"https://github.com/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/blob/main/src/src.csproj\",\"download_url\":\"https://raw.githubusercontent.com/Azure-Samples/functions-quickstart-dotnet-azd-eventgrid-blob/main/src/src.csproj\"}\nThinking\n```\n\n\n","author":{"url":"https://github.com/paulyuk","@type":"Person","name":"paulyuk"},"datePublished":"2025-08-08T01:31:16Z","url":"https://github.com/github/github-mcp-server/issues/841"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f7a279d2-7ac0-654e-9526-f1dafee38776 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C55C:23E430:1D9BF2F:26FF275:6B068A5E |
| html-safe-nonce | c21517a9df35b1493480279839389672d2d4fbdd291db8447adcf15c966d3370 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTVDOjIzRTQzMDoxRDlCRjJGOjI2RkYyNzU6NkIwNjhBNUUiLCJ2aXNpdG9yX2lkIjoiMTA0Njg0MzA3MjY4NTk2Nzk2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 870f30c2a23d28c7c9ecea663b5aaaa1c564c92c6ccec4da784b80046d22ed54 |
| hovercard-subject-tag | issue:3302336421 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/841/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76e2bcf4fcad048faa59059ce419a8417707e1e318d162e5257ff881d4c9d76a/github/github-mcp-server/issues/841 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76e2bcf4fcad048faa59059ce419a8417707e1e318d162e5257ff881d4c9d76a/github/github-mcp-server/issues/841 |
| og:image:alt | Describe the bug I had an awesome day with GPT 5.0 and a more sophisticated prompt/spec that would do multi change batches with Github MCP, but in the end my files got corrupted. It was corrupted b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | paulyuk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width