MCP Server Memory Integration Error: Property 'includes' Cannot Be Read from Undefined Object in n8n

I’m working with the memory server component for MCP (Model Context Protocol) in my n8n automation workflow. When I try to use the add_observations functionality, I keep getting this error message:

Failed to execute tool 'add_observations': MCP error -32603: Cannot read properties of undefined (reading 'includes')

I’ve attempted two different approaches to resolve this issue. First, I configured it as a tool within my workflow, but that didn’t work. Then I tried setting it up as a regular node instead, thinking that might fix the problem, but I’m still seeing the exact same error.

The error suggests there’s an issue with accessing the ‘includes’ property on something that’s undefined. I’m pretty confident my JSON configuration is correct, so I’m not sure what’s causing this.

Has anyone else run into this problem when working with MCP memory servers? Any suggestions on what might be wrong with my setup or how to troubleshoot this further would be really helpful.

This happens when the MCP memory server gets malformed or incomplete data while processing observations. The ‘includes’ method error means it’s expecting an array but getting undefined instead. I’ve seen this when observation data isn’t structured right or there’s a schema mismatch. Check that your observation payload has all required fields, especially any array properties the memory server needs. Also, make sure your MCP server connection is fully up before adding observations - sometimes the server context isn’t ready when first calls are made, causing undefined references.

had this same issue with my n8n setup! double check the data going into the memory server. i messed up the format of my observations too and it threw the same error. enabling debug logging helped me a lot to figure out what was wrong.

I hit this exact error with MCP memory integration in n8n. The undefined ‘includes’ error happens when the memory server gets null or empty observation data instead of proper structured content. For me, I was passing observations with missing metadata fields that the memory server needed. Check your observation object structure - don’t send empty strings or null values for required properties. Also make sure your MCP server version matches your n8n setup. I found version mismatches can break observation validation and cause this undefined property error.