Hi all,
The Zoho Mail MCP tool ZohoMail_get_mail_attachment returns binary attachments as UTF-8 text, so PDFs come back corrupted and an AI client can't read or save them.
What we see:
- The response header is content-type: application/octet-stream;charset=UTF-8.
- The file arrives as a plain string in data.result. It starts with %PDF-1.7, but every byte that isn't valid UTF-8 has been replaced with U+FFFD, so the PDF can't be rebuilt.
- Text attachments (e.g. .html) come through fine. Only binary files break.
- ZohoMail_get_mail_original returns the same email with the PDF intact as base64 in the raw MIME, so the data is fine on Zoho's side.
To reproduce:
1. Connect an MCP client (we use Claude) to the Zoho Mail MCP server.
2. Call ZohoMail_list_mail_attachments on an email with a PDF.
3. Call ZohoMail_get_mail_attachment with that messageId and attachmentId.
Suggested fix: return base64 with file name and content type, or a short-lived download URL. ZohoMail_upload_mail_attachment already takes base64, so download should match.
Has anyone else hit this, or found a workaround? I'm also wondering whether ZohoWorkdrive_Download_Server_File has the same problem. I've emailed
support@zohomcp.com as well.
Thanks,
Rich (Massey Wines)