-
Notifications
You must be signed in to change notification settings - Fork 205
Description
Bug
When an MCP tool returns a { type: "resource", resource: { uri, mimeType, text } } content item, the resource text/blob is silently dropped across all --output modes. The result is either empty output or a truncated [Object] placeholder with no accessible content.
Reproduction
Using the GitHub MCP server (github.get_file_contents):
# plain output
mcporter call github.get_file_contents owner=myorg repo=myrepo path=docs/README.md
# Output: "successfully downloaded text file (SHA: abc123)"
# File content: MISSING
# --output json
mcporter call github.get_file_contents owner=myorg repo=myrepo path=docs/README.md --output json
# Output: { content: [ { type: 'text', text: 'successfully downloaded...' }, { type: 'resource', resource: [Object] } ] }
# resource blob: [Object] -- Node.js truncation, content unreachableThe actual MCP server response (verified by calling the SSE endpoint directly with curl) contains:
{
"type": "resource",
"resource": {
"uri": "repo://org/repo/sha/.../path",
"mimeType": "text/plain; charset=utf-8",
"text": "...full file contents here..."
}
}Workaround
Calling the SSE endpoint directly with curl bypasses mcporter and returns full content.
Expected Behavior
--output text/--output markdown: renderresource.textor decoderesource.blob--output json/--output raw: include the full resource object, not a Node.js[Object]truncation
Environment
- mcporter 0.7.3, Node v22.22.1, Linux x64
- GitHub MCP server via HTTP/SSE transport
Root Cause Hypothesis
Output renderers likely only handle type: "text" and type: "image". The type: "resource" content items appear to have no renderer -- the text/blob fields inside are never extracted. The --output raw path compounds this by using Node.js object serialization which truncates nested objects as [Object].