I recently downloaded the new MCP community node.
I have used the node successfully (Brave MCP). I input all the appropriate credentials and everything, just like the example in the community node documentation shows, and it works great.
HOWEVER, whenever I try to use it as an agent tool I see this error -
Super appreciate that advice, but I’ve done this.
I have the environment variable in my system and in my n8n files.
I’ve confirmed it comes back as true through my terminal as well.
Hi Anthony_Lee, I am getting the same problem and have done everything you did too. This happens on both localhost and hosted server for me. Just wondering if you have found a solution. Thanks in advance
Please make sure that you are on the latest version, and N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE env variable is actually set to true.
Please also try to add the MCP node as a regular node. If the package is installed correctly, even without the env variable, you should still be able to see the regular node. If you don’t see the node, then the package isn’t installed correctly.
I’ve tried a few things, and have not been able to reproduce this so far. Looking at the code, the only possibilities seem to be that the env variable isn’t actually reaching the code that checks for it.
Can you try running this workflow to check if the “Execute Command” node can read the env variable or not:
The key issues were ensuring n8n ran on a compatible Node.js version (v18.17.0) and enabling the community packages tool usage flag. This combination allowed the MCP nodes to function correctly.
Thanks to @netroy I was able to determine that my configuration isn’t passing in the env variable because I’m getting 0, empty, empty.
I tried @ade_RiverIsland 's suggestion with the Node.js versions, but that did not fix the problem.
Anyone else have solutions that worked for them? Have the latest version of n8n on my machine in a Docker container. Docker-compose file has correct env variable, etc. Any ideas as to what configurations outside of n8n may be causing this?
Thanks in advance for any ideas!
can you please share the docker-compose file (with any secrets redacted)?
or maybe try asking one of the LLMs if they see any obvious issues in your stack.
I have the same issue.
I installed N8N on top of Heltzner+Coolify, and I’m not tech-savvy, so I don’t distinguish between Node.js and Docker… yet. Meaning, I need more explained instructions, without coding-skilled assumptions.
@yo-yo.eco This bit is the issue. When you add environment: to the n8n service, it’s overwriting the environment: in the x-n8n: &service-n8n block above.
either move these variable to the block above, or drop the yaml anchors, and duplicate the config.
You could also try changing to this to
environment:
<<: *service-n8n.environment
- WEBHOOK_URL=https://your-domain.com/ # Replace with your tunnel domain
- N8N_HOST=your-domain.com # The hostname Cloudflare will use
- N8N_PROTOCOL=https
@davdelven That looks like Coolify isn’t passing the env variables for you. can you try adding the env variable in the environment: block in the third screenshot?