I’m trying to use the MCP server memory with n8n but I’m running into problems. I’ve set up the add_observations tool but it’s not working right.
When I try to run it, I get this error:
Failed to execute operation: Failed to execute tool 'add_observations': MCP error -32603: Cannot read properties of undefined (reading 'includes')
I thought maybe using it as a node instead of a tool might help but no luck. The error stays the same.
I’m pretty sure my JSON is correct but now I’m not so sure. Has anyone else run into this? Any ideas what might be causing it or how to fix it? I’m kind of stuck here and could really use some help figuring out what’s going wrong.
I’ve been working with n8n and MCP server memory for a while now, and I’ve seen this error pop up before. It’s usually related to how the data is structured when it’s being sent to the add_observations tool.
One thing that helped me was to double-check the schema of the data I was sending. Make sure all the required fields are there and that they’re named exactly as the MCP server expects them. Sometimes, even a small typo can cause this kind of error.
Another trick I found useful was to use the Function node just before the MCP node. In this node, I’d log the entire payload to the console. This way, you can see exactly what data is being passed to the MCP node and spot any issues.
If you’re still stuck, it might be worth reaching out to the n8n community forums or checking their documentation. They often have specific troubleshooting guides for common errors like this one.
I’ve encountered a similar issue with the MCP server memory in n8n before. The error you’re seeing typically indicates a problem with the data structure being passed to the add_observations tool. Make sure your JSON payload is correctly formatted and that all required fields are present.
Double-check that you’re not inadvertently passing undefined values, especially in arrays or objects where the ‘includes’ method might be applied. It may be helpful to verify your MCP server connection and permissions. If the problem persists, consider logging the input data just before the add_observations step to inspect what is being passed.
hey, ive run into this b4. check ur data structure carefully. sometimes the error happens when theres an undefined value in an array. try console.logging ur payload right before the add_observations step. that should help u spot whats wrong. good luck!