You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_file_contents returns [non-text content: resource] instead of file text in Claude voice mode #3189
When using the hosted GitHub MCP connector from Claude (claude.ai), get_file_contents for a Markdown file sometimes returns no file body — the tool result only shows [non-text content: resource] instead of the file text. In my testing this happened consistently while using Claude's voice mode, while the exact same file was returned correctly in text mode within the same session.
Affected version
Hosted GitHub MCP connector (remote server via claude.ai's GitHub connector). Client: Claude (claude.ai), observed on 2026-08-31.
Steps to reproduce
Connect Claude (claude.ai) to the hosted GitHub MCP server.
In a voice-mode conversation, ask Claude to read a Markdown file via get_file_contents — e.g. README.md of this repository (github/github-mcp-server), which is where I reproduced it, so it is not specific to my own repositories.
The tool result contains [non-text content: resource] and no file text, so the model cannot see the file content.
In the same session, switching to text mode and requesting the same file returns the full content normally.
What I observed while isolating the issue
Mode-dependent: the failure occurred in voice mode; the same file succeeded in text mode. I confirmed both the reproduction and the recovery within a single session.
Workaround exists: fetching the same content via list_commits + get_commit (with detail: full_patch) returns the full file text even in voice mode.
Not repo-specific: reproduced with github/github-mcp-server's own README.md.
Not size/content-dependent: a file that failed in voice mode succeeded in text mode in the same session, so file size/content does not seem to be the deciding factor.
I searched existing issues and found #1168 (binary mimeType handling, already closed) and #1176 (resource not found error), but neither matches this symptom: here the call succeeds but the content arrives as an embedded resource the client renders as [non-text content: resource] rather than as text.
Expected behavior
get_file_contents returns the Markdown file body as text (or in a form the client can present to the model) regardless of the client conversation mode.
Additional context
My guess is that the response uses an embedded resource content type that some client surfaces (e.g. Claude's voice mode) cannot unwrap, whereas plain text content would work everywhere. If there is a way to force a plain-text response, I'm happy to test it.
I'm picking this up. Root cause is in the OSS handler: for text files GetFileContents (pkg/github/repositories.go) returns the body only inside the EmbeddedResource, while the TextContent carries just the successfully downloaded text file (SHA: …) line — so any client surface that drops embedded resources (Claude voice mode here) leaves the model with no file content at all.
Planned fix (minimal, backward compatible): also carry the file body in the TextContent for plain text files, keeping the embedded resource untouched (same Content length/order, no schema change). Binary/large-file/empty-file/symlink-metadata paths stay as-is. I'll open a PR with a regression test shortly.
@Bruce-Yii we have known that some clients offer poor support for embedded resources, I considered adding a compatibility mode, but for context size reasons we are not intending to add the content to the response.
I would open issues with your client vendor rather than change the server, clients should support the specification, which supports embedded resources.
Activity
Bruce-Yii commentedon Sep 7, 2026
I'm picking this up. Root cause is in the OSS handler: for text files
GetFileContents(pkg/github/repositories.go) returns the body only inside theEmbeddedResource, while theTextContentcarries just thesuccessfully downloaded text file (SHA: …)line — so any client surface that drops embedded resources (Claude voice mode here) leaves the model with no file content at all.Planned fix (minimal, backward compatible): also carry the file body in the
TextContentfor plain text files, keeping the embedded resource untouched (sameContentlength/order, no schema change). Binary/large-file/empty-file/symlink-metadata paths stay as-is. I'll open a PR with a regression test shortly.SamMorrowDrums commentedon Sep 7, 2026
@Bruce-Yii we have known that some clients offer poor support for embedded resources, I considered adding a compatibility mode, but for context size reasons we are not intending to add the content to the response.
I would open issues with your client vendor rather than change the server, clients should support the specification, which supports embedded resources.