MCP `get_email_data` always fails with "invalid response" while other MCP tools work

Environment

  • eM Client version: 11.0.865
  • OS: macOS 27.0.1
  • MCP client: Claude Desktop 2.26454.0 (98e3cc)
  • Accounts configured: several, including Gmail/Google Workspace (IMAP), iCloud, and a self-hosted IMAP server

Summary
Every call to get_email_data fails with “The connector returned an error or an invalid response.” The other MCP tools work normally against the same messages and conversations, so the connection itself is fine. The problem appears specific to get_email_data.

Steps to reproduce

  1. Connect Claude Desktop to eM Client through the MCP feature.
  2. Call search_emails with a from_contains filter. It succeeds and returns email IDs.
  3. Call get_conversation_data on one of the returned conversations. It succeeds and returns 10 email IDs.
  4. Call get_email_data with any of those email IDs.

Expected result
Message details (headers, body, attachment info) are returned.

Actual result
The call fails with “The connector returned an error or an invalid response.”

What I tried

  • Requesting all 10 emails at once, a subset of 3, and a single email: all fail.
  • Requesting the body in several formats (plain_or_html_as_plaintext, html_as_plaintext_or_plain): all fail.
  • A minimal request (preview only; to, cc, bcc, folder path, notes, tags, attachments, and body all disabled): still fails.
  • Restarting eM Client: no change.

Tools confirmed working in the same session
list_email_accounts, search_emails, get_conversation_data, display_conversation

Possibly relevant

  • The affected messages are in a Google Workspace account and sit in the [Gmail]/All Mail folder. I haven’t confirmed whether messages in other accounts or folders behave differently.
  • The thread contains messages with attachments.

Separate issue: MCP connection doesn’t recover after an eM Client restart
After eM Client was restarted, the first MCP call failed with “The connection to the connector closed while the tool was running.” After that, every call failed with “Tool execution failed,” including list_email_accounts. Toggling the connector off and on in Claude didn’t restore it. Only restarting Claude Desktop brought the connection back.

As a followup, I can confirm that this fails in iCloud and Gmail accounts, and not just on messages in the All Mail folder, but in the Inbox as well. get_email_data fails in both, while search_emails succeeds in both. The failure doesn’t appear to depend on account type or folder.

Hi @jfmorris,
I wanted to let you know that our development team is aware of the issue and is currently working on a fix.

Good to know! I just wanted to make sure you were aware of it.