Native binary content for media/blob results, instead of base64-only inline encoding #2861
tfcace
started this conversation in
Ideas - Transports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been exploring various use-cases for a binary wire format for MCP.
My exploration went beyond the media/base64 case: I also experimented with replacing JSON with MessagePack entirely.
I wrote up the full exploration here: Binary vs JSON for MCP: I Went Looking
Today, when a tool returns media inline (an image, audio, or a blob), the MCP content schema gives you exactly one way to carry the bytes: a base64-encoded JSON string. That's a fixed ~33% size tax on the wire, plus the CPU to encode on the way out and decode on the way in.
To be clear about scope: I'm not proposing a binary transport. I'm suggesting a content-schema change limited to the three inline-binary fields (
ImageContent.data,AudioContent.data,BlobResourceContents.blob), allowing a native binary representation alongside today's base64 string.Beta Was this translation helpful? Give feedback.
All reactions