I’m working with the MCP memory server integration in n8n and running into a frustrating issue. When I try to use the add_observations functionality, I keep getting this error message:
Failed to execute operation: Failed to execute tool 'add_observations': MCP error -32603: Cannot read properties of undefined (reading 'includes')
I’ve been testing this with both the tool configuration and the node setup, but both approaches give me the same error. The JSON structure looks correct to me, so I’m not sure what’s causing this undefined property issue.
Has anyone successfully implemented the MCP memory server with n8n? I’m wondering if there’s something specific about how the data needs to be formatted or if there’s a compatibility issue I’m missing. Any help would be appreciated since I can’t seem to get past this error no matter what I try.
I hit this exact error last month during a project migration. The problem was how n8n passes data to the MCP memory server - there’s a subtle difference in JSON serialization. Here’s what fixed it: I explicitly checked that all string fields in the observation payload were properly defined before sending them to the memory server. The includes method gets called on certain string properties during validation, so if any expected string field comes through as undefined or null, it crashes. Log your payload right before the MCP call to see what n8n’s actually sending. In my case, some fields that should’ve been empty strings were coming through as undefined, breaking the server-side validation. Adding default empty string values fixed it completely.
i had a similar issue too! turn out it was due to passing in empty arrays. make sure your observations data is filled out properly, no null values. start testing with just a few entries so you can isolate the problem easier. good luck!
This happens when the MCP memory server gets malformed data instead of what it expects. I ran into this exact problem with n8n - turns out the observation object structure was wrong. The memory server validates fields using the includes method, and if those fields are undefined or badly formatted, you get this error. Make sure your observation objects have all the required properties: content, metadata, and timestamp. Also check that any arrays in your payload are actually initialized as arrays, not undefined. MCP is strict about schema - even small formatting mistakes will break property validation.