I’m trying to run Puppeteer MCP on the N8N, it works normally up to the MCP node with operation List Tools, but on the next MCP node with operation Execute Tool it gives this error. Can anyone help me solve it? I’ve tried a lot of things and it still gives this error.
In this case, I asked it to access google, then the AI Agent node executes the first tool that has the operation list tools, but when it executes the tool that has the operation execute tool, it gives the error.
Failed to execute operation: Operation not permitted, make sure you have the right permissions
Error details
n8n version: 1.82.3 (Self Hosted)
Time: 16/03/2025, 14:53:35
Error cause: { “message”: “Failed to execute operation: Operation not permitted, make sure you have the right permissions”, “timestamp”: 1742147615047, “name”: “NodeOperationError”, “context”: {}, “cause”: { “level”: “error”, “tags”: {} } }
Hi, have you noticed that it spins up a new container on each request and never closes since the node process keep listening. just naming the instance creates an error on the second one. not really a scalable solution.
That’s right. I even found a way for it to use just one container, but it still loses the snapshot references with each run.
In this case, I’m trying with the Docker MCP Server Playwright that I created. Running an N8N project with Puppeteer or Playwright using MCP is something complex that needs a lot of testing before it finally works.
Thanks for the feedback. I’m still struggling to generate a non-empty (blank) screenshot through the mcp itself. Directly via a custom js on the same container it works Mind sharing how you managed to only spin up one container?
This is because in the MCP Client credential on the N8N you are using docker run to list tools and execute tools, the way I found is to do docker run from the terminal using:
docker run -d --name name-container --entrypoint sleep name-image infinity
Then in the MCP Client inside the N8N, you will continue using the STDIO credential, with the command “Docker” and in Arguments use “docker exec -i nome-container node /app/cli.js --headless”
I’ve created a Dockerfile repository on GitHub for this project of mine, but it’s from Playwright.
But even with this solution, I still had problems because when playwright goes to the URL it takes the snapshot and with that we have page references such as login fields, password and button, and when asking to insert text in these elements it gives an error.
And from what I understand it’s because we’re losing these references when the MCP Server is run again.
I don’t know what else to do. Please help me if you can.