MCP puppeteer does not work #5069
Answered
by
danny-avila
michnovka
asked this question in
Troubleshooting
-
What happened?Puppeteer MCP fails to fetch a y URL. I have this version: 1.2.0
mcpServers:
puppeteer:
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-puppeteer" Steps to Reproduce
Relevant log outputsuperuser@SuperTower:~/dockers/LibreChat$ docker compose logs -f | grep puppe
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "GID" variable is not set. Defaulting to a blank string.
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "GID" variable is not set. Defaulting to a blank string.
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.
WARN[0000] The "GID" variable is not set. Defaulting to a blank string.
librechat-api | puppeteer.type: "stdio",
librechat-api | puppeteer.command: "npx",
librechat-api | puppeteer.args: ["-y","@modelcontextprotocol/server-puppeteer"],
librechat-api | 2024-12-21T13:48:35.412Z info: [MCP][puppeteer] Connection state: connecting
librechat-api | 2024-12-21T13:48:35.415Z debug: [MCP][puppeteer] Transport sending: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"... [truncated]
librechat-api | 2024-12-21T13:48:45.415Z info: [MCP][puppeteer] Connection state: error
librechat-api | 2024-12-21T13:48:45.416Z error: [MCP][puppeteer] Connection failed: Connection timeout
librechat-api | 2024-12-21T13:48:47.418Z info: [MCP][puppeteer] Connection state: disconnected
librechat-api | 2024-12-21T13:48:47.418Z info: [MCP][puppeteer] Connection state: connecting
librechat-api | 2024-12-21T13:48:47.420Z debug: [MCP][puppeteer] Transport sending: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"... [truncated]
librechat-api | 2024-12-21T13:48:48.109Z info: [MCP][puppeteer] Connection state: error
librechat-api | 2024-12-21T13:48:48.110Z error: [MCP][puppeteer] Connection failed: MCP error -1: Connection closed
librechat-api | 2024-12-21T13:48:52.112Z info: [MCP][puppeteer] Connection state: disconnected
librechat-api | 2024-12-21T13:48:52.113Z info: [MCP][puppeteer] Connection state: connecting
librechat-api | 2024-12-21T13:48:52.117Z debug: [MCP][puppeteer] Transport sending: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"... [truncated]
librechat-api | 2024-12-21T13:48:54.180Z debug: [MCP][puppeteer] Transport sending: {"method":"notifications/initialized","jsonrpc":"2.0"}
librechat-api | 2024-12-21T13:48:54.180Z info: [MCP][puppeteer] Connection state: connected
librechat-api | 2024-12-21T13:48:54.181Z info: [MCP][puppeteer] Capabilities: {"resources":{},"tools":{}}
librechat-api | 2024-12-21T13:48:54.181Z debug: [MCP][puppeteer] Transport sending: {"method":"tools/list","jsonrpc":"2.0","id":3}
librechat-api | 2024-12-21T13:48:54.183Z info: [MCP][puppeteer] Available tools: puppeteer_navigate, puppeteer_screenshot, puppeteer_click, puppeteer_fill, puppeteer_select, puppeteer_hover, puppet... [truncated]
librechat-api | 2024-12-21T13:48:54.183Z info: [MCP][puppeteer] ✓ Initialized
librechat-api | 2024-12-21T13:48:54.184Z debug: [MCP][puppeteer] Transport sending: {"method":"tools/list","jsonrpc":"2.0","id":4}
librechat-api | 2024-12-21T13:49:12.840Z debug: [MCP][puppeteer] Transport sending: {"method":"tools/call","params":{"name":"puppeteer_navigate","arguments":{"url":"https://www.google.com"}},"jsonrp... [truncated]
librechat-api | 2024-12-21T13:49:12.851Z error: puppeteer_navigate MCP server tool call failed MCP error -32603: Failed to launch the browser process! spawn /root/.cache/puppeteer/chrome/linux-131.0... [truncated]
librechat-api | 2024-12-21T13:49:14.095Z debug: [MCP][puppeteer] Transport sending: {"method":"tools/call","params":{"name":"puppeteer_navigate","arguments":{"url":"https://www.google.com"}},"jsonrp... [truncated]
librechat-api | 2024-12-21T13:49:14.102Z error: puppeteer_navigate MCP server tool call failed MCP error -32603: Failed to launch the browser process! spawn /root/.cache/puppeteer/chrome/linux-131.0... [truncated] error log: {"code":-32603,"level":"error","message":"puppeteer_navigate MCP server tool call failed MCP error -32603: Failed to launch the browser process! spawn /root/.cache/puppeteer/chrome/linux-131.0.6778.204/chrome-linux64/chrome ENOENT\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n","stack":"Error: MCP error -32603: Failed to launch the browser process! spawn /root/.cache/puppeteer/chrome/linux-131.0.6778.204/chrome-linux64/chrome ENOENT\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n\n at Yr._onresponse (file:///app/packages/mcp/dist/index.es.js:1:68940)\n at _transport.onmessage (file:///app/packages/mcp/dist/index.es.js:1:66850)\n at ts.processReadBuffer (file:///app/packages/mcp/dist/index.es.js:1:78981)\n at Socket.<anonymous> (file:///app/packages/mcp/dist/index.es.js:1:78584)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:191:23)\n at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)"} ScreenshotsCode of Conduct
|
Beta Was this translation helpful? Give feedback.
Answered by
danny-avila
Dec 21, 2024
Replies: 1 comment 1 reply
-
It works but it won’t work in a headless or virtual (docker) environment. 3 options:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
michnovka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works but it won’t work in a headless or virtual (docker) environment.
3 options: