I’m working with the MCP memory server integration and running into a frustrating issue. When I try to execute the add_observations function, I keep getting this error message:
MCP error -32603: Cannot read properties of undefined (reading 'includes')
I’ve tested this both as a tool and as a regular node, but the same error keeps popping up. The workflow seems to be set up correctly and the JSON structure looks right to me, but something is definitely wrong.
Has anyone else encountered this specific error when working with MCP memory servers? I’m not sure if this is a configuration issue or if there’s something wrong with how I’m formatting the data being passed to the add_observations function.
Any help would be really appreciated since I’m stuck on this and can’t figure out what’s causing the undefined property error.
Same issue here! Make sure you’re not sending undefined values in your observation payload. The MCP server doesn’t handle missing properties well - it’ll try running includes() on whatever junk it gets. I had to clean up my input data before sending it.
This usually happens when the MCP memory server expects certain metadata that isn’t getting passed through properly. I ran into the same thing - turns out the observation object structure was messed up. The memory server was looking for a property that should’ve been an array but got null or undefined instead. Check that your observation data has all the required fields, especially arrays for tags, categories, or metadata that the server’s trying to access with the includes method. Also make sure your MCP server version matches your client - API changes often break this stuff.
I encountered a similar issue recently when working with the MCP memory server. It turned out that the error was due to how the observations were being defined prior to the add_observations function’s call. Although the JSON structure seemed correct, the server wouldn’t process it properly if observations weren’t initialized as an array. My solution was to check if observations both existed and were indeed an array before invoking the function. Make sure to validate your data just before the function execution, as sometimes parameters can change unexpectedly during the process.
Had this exact same error a few months ago while integrating MCP memory servers. In my case, the server was trying to process observation data where the content property was undefined - not the array fields everyone talks about. The MCP server uses includes() internally to filter observation content against schemas, but it chokes when the observation object is malformed. Check that your observation objects have the basic structure: content, timestamp, and type fields all properly defined. Also make sure any custom schemas match what the server expects. Version mismatches between client and server create subtle structural differences that’ll trigger this error.
This error totally caught me off guard when I started using MCP memory servers. The server tries to validate input parameters that aren’t built correctly. For me, it was failing during parameter validation before it even got to processing observations. The MCP server was checking if certain config options existed in a settings array, but that array was undefined. Check your MCP server config and make sure you’re passing all required parameters with the right data types. I fixed it by explicitly defining empty arrays for optional parameters, even when I wasn’t using them. The server’s validation logic expects these structures to exist whether they have data or not.
Had this exact error last week! I was passing the observations parameter without checking if it was initialized first. The MCP server tries to call .includes() on undefined data. Quick fix - add if (observations && Array.isArray(observations)) before calling add_observations. Also check your connection settings. Sometimes the server isn’t ready when you make the call.
This error got me too when I first started with MCP memory servers. The server’s trying to use the includes method on something that wasn’t initialized properly. For me, it was how the observation context got passed through the workflow. The MCP server was getting an object where one of the array properties came through as undefined instead of an empty array. Check if you’re accidentally overwriting properties during data transformation before the add_observations call. Middleware or preprocessing sometimes strips required fields without you knowing. Log the exact payload structure right before the function runs - see what the server’s actually getting vs what you think you’re sending.
I’ve hit this exact issue! You’re probably sending data that doesn’t match what the server expects. Check if your tags and metadata fields are arrays - the server wants for empty arrays, not null or strings. Console.log your data right before the function call to see what’s actually going through.
I’ve dealt with MCP memory servers for months - this error hits when the server gets bad observation data. Most people don’t realize the MCP server validates incoming data structures. If an expected array field shows up as null or gets corrupted, includes() crashes instantly. Usually it’s a version mismatch between your MCP client library and server. The server expects certain field structures that change between versions. Downgrade your MCP client to an earlier stable release and test again. Also check your network isn’t dropping packets - incomplete JSON triggers the same undefined property errors.