[BUG] Slack MCP slack_read_file fails with invalid_union content validation error (content[1]) for binary files
Summary
The official Slack MCP server (https://mcp.slack.com/mcp, connected via claude mcp add --transport http) successfully returns metadata and message content, but slack_read_file always fails when reading file contents. Claude Code's MCP client rejects the tool response with an invalid_union schema validation error on content[1].
This is distinct from #35995 (which was an OAuth-scope issue where slack_read_channel/slack_search_public failed). Here, channel reads and searches work fine — only file content retrieval fails, and it fails at the content-block schema layer rather than with a generic internal error.
What works
slack_read_user_profile✅slack_search_channels✅slack_read_channel✅ (reads messages + file listings cleanly)
What fails
slack_read_file❌ — for both.docx(21 KB) and.pdf(174 KB) files
Error
The client rejects the MCP tool result because content[1] matches none of the five allowed content block types (text, image, audio, resource_link, resource):
MCP error -32602: Invalid tools/call result: [
{
"code": "invalid_union",
"path": ["content", 1],
"errors": [
[ { "code": "invalid_value", "values": ["text"], "path": ["type"] }, ... ],
[ { "code": "invalid_value", "values": ["image"], "path": ["type"] }, ... ],
[ { "code": "invalid_value", "values": ["audio"], "path": ["type"] }, ... ],
[ { "code": "invalid_value", "values": ["resource_link"], "path": ["type"] }, ... ],
[ { "code": "invalid_union", "path": ["resource"], ... } ]
],
"message": "Invalid input"
}
]
content[0] validates (text metadata); content[1] — the file payload block — does not. This points to the Slack MCP server returning a binary file payload in a content-block shape that Claude Code's content-union validator does not accept (a server-returns-X / client-expects-Y mismatch).
Reproduction
claude mcp add --scope user --transport http slack https://mcp.slack.com/mcp- Authenticate via
/mcp(OAuth). - Find a channel containing an uploaded
.docxor.pdffile. - Call
slack_read_filewith that file's ID. - Observe the
invalid_unionerror oncontent[1]; no file content is returned.
Note: claude mcp list reports the server as ✗ Failed to connect because the out-of-session health check does not carry the OAuth token; in-session tools work, so this is unrelated.
Expected
slack_read_file returns the file's content (text, or base64 for binary) per its tool description ("Returns text content directly or base64-encoded data for binary/image files ... 10MB size limit"), so it can be summarized/used downstream.
Actual
The entire tool result is rejected at validation; no content reaches the model.
Environment
- Claude Code: 2.1.96
- macOS: 26.5.1 (build 25F80)
- Slack MCP: official server, HTTP transport, user scope, OAuth authenticated
- Other Slack MCP tools in same session: working
Impact
File content cannot be read from Slack at all, which blocks any Slack -> read / Slack -> Drive document workflow, since the file bytes never make it through the file-read tool.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗