MCP Server/Client Error with Groq/Ollama: 'Non-string message content not supported

problem

I’ve created a custom MCP Server that works correctly when accessed by a MCP Client using certain chat models nodes. It performs well with Google Gemini and OpenAI, but when I use Ollama or Groq, I encounter an error stating: “Non-string message content not supported.”

workflow

Information on your n8n setup

  • n8n version: 1.88.0
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted
  • Operating system: windows 10

I’m having this issue with Groq as well when trying to pass an image, even though the model accepts it…

Keeping a close eye on this post…

1 Like

I have the same problem

tl,dr: put an “Edit Field” node and pass all data, then reference this in the Agent using Groq model.

I had the same problem when trying to send text extracted from a PDF
But I noticed that when I sent text from another kind of node, the problem didn`t happen

So I tried putting and Edit Field node between the “Extract from file” node and the Agent node, where the output is identical to the input.

This “new” data didn’t cause any problems then.

I’m still unable to figure this out because I can’t modify the data being sent by the MCPServer. When the agent calls a tool from the server using the MCPClient, I have no way to intercept or alter the content during that process.

I have the same problem and that’s exactly as [Hamza_Idrissi] said, using Groq LLM and trying to get a simple Google Sheet data list, but there is the “non string message content not supported” error “error” there is an error.

The problem has been solved now with the 1.91.3 version.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.