Skip to content

get_file_contents fails to parse the response #607

Closed as not planned
Closed as not planned
@asaf-shohet-ma

Description

@asaf-shohet-ma

Describe the bug

get_file_contents returns (today) this format:
{"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"successfully downloaded text file"},{"type":"resource","resource":{"uri":"repo://MY_ORG/MY_REPO/contents/logic/index.js","mimeType":"text/plain; charset=utf-8","text":"module.exports = require('./src/tasks-service');\n"}}]}}

When using get_file_contents, and getting such response, cursor continues with an error:
"content type 'resource' not supported"

Affected version

Taken from docker logs:
GitHub MCP Server running on stdio
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-03-26","capabilities":{"logging":{},"resources":{"subscribe":true,"listChanged":true},"tools":{"listChanged":true}},"serverInfo":{"name":"github-mcp-server","version":"v0.5.0"}}}

Steps to reproduce the behavior

Ask to summarize readme in some repo.
eg https://github.com/github/github-mcp-server

Expected vs actual behavior

readme summarized.

Actual:

"content type 'resource' not supported"

Image

Previously (from memory) github used to return response in base64... so perhaps something had changed in the response

Logs

Paste any available logs. Redact if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions