| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Fixes double-base64 encoding of binary MCP resources.
Changes:
| File | Description |
|---|---|
| pkg/github/repository_resource.go | Returns raw response bytes as blobs. |
| pkg/github/repository_resource_test.go | Verifies single-encoded PNG resources. |
| pkg/github/repositories.go | Removes manual blob encoding. |
| pkg/github/repositories_test.go | Tests text and binary wire serialization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Returns raw binary bytes through MCP resource blobs so the Go SDK performs exactly one base64 encoding. The same migration bug is fixed in both get_file_contents and repository resource reads.
Why
Fixes #3097.
Binary resources were manually base64-encoded before being assigned to mcp.ResourceContents.Blob []byte, causing encoding/json to encode the base64 text a second time. Images were corrupted after a spec-compliant single decode and could poison subsequent client conversation turns.
What changed
MCP impact
Binary resource behavior is corrected to the MCP wire contract. Tool names, descriptions, input schemas, and response shapes are unchanged.
Prompts tested (tool changes only)
Security / limits
The change removes the extra base64 layer and its persistent invalid payload growth; existing 1 MiB resource-link behavior and data exposure are unchanged.
Tool renaming
Lint & tests
Docs