Problem in node 'AI Agent' Provider returned error using MCP Client / MCP Server Trigger

Hi, I am testing the new MCP Server Trigger and MCP Client nodes with a very simple workflow example. A MCP Server Trigger with 2 tools (of Airtable): getContacts and createContact:

The main workflow (that calls MCP Server Trigger) is a simple IA Agent with a MCP client as tool. Everything seems to be working correctly with MCP nodes but the ‘IA Agent’ return the following error: Provider returned error.

I think the problem is related on the format response that MCP Client returns to ‘IA Agent’ whose structure I think ‘IA Agent’ does not know to interpret (show below):

Output MCP Client >> IA Agent

[{ “response”: [{“type”: “text”, “text”: “[{"records":[{"id":"rec8OnAOUgj9wEL9U","createdTime":"2025-03-31T07:45:32.000Z","fields":{"nombre":"Juan Pérez","email":"[email protected]"}},{"id":"rec8sWXDfDzmpYS0h","createdTime":"2025-03-07T19:46:32.000Z","fields":{"nombre":"Álvaro García","email":"[email protected]"}}]}]”}]}]

Information about my n8n setup

  • **n8n version: 1.88.0
  • Running n8n via: web localhost:5678
  • **Operating system: Windows 10

I appreciate your help!!
Thanks in advance!!

Im running to exact same problem. And as same as the author mentioned, it looks like MCP returns incorrect json format. Im guessing it should be

{
 "response": "[{ 'json': 'schema_here' }]",
}

Tested this using directly connected Gmail tool to the AI Agent node and it works good

This is the error shown in the console:

Error MCP

I am having the exact same issue. Has this been resolved yet? Or is there a work around? During testing I would have to execute the step twice for it to work only to not work the third. It is working every other time.

The new 1.93 version seems to fix this for me.

1 Like

Hi Robert,

Yes, it has been solved.

Thank you!

I just ran mine and the same problem popped up. IT was solved for about 2 hours.

https://rcojinc.app.n8n.cloud/mcp/7ed7df63-7d35-467b-bb0c-c88303cc4aef/sse

it could be the ai agent need system prompt, also maybe on the last node of mcp trigger add a donothing node maybe it will return better.