Open6

MCP Playwrightを試す。

kynmh69kynmh69

Claudeに下記を設定する。

{
  "globalShortcut": "Alt+C",
  "mcpServers": {
  	"playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
kynmh69kynmh69

下記のエラー発生。。

2025-04-05T02:01:53.046Z [playwright] [info] 
Message from client: {
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {},
    "clientInfo": {
      "name": "claude-ai",
      "version": "0.1.0"
    }
  },
  "jsonrpc": "2.0",
  "id": 0
}

2025-04-05T02:01:53.047Z [playwright] [error] write EPIPE {
  "context": "connection",
  "stack": "Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:161:15)
    at writeGeneric (node:internal/stream_base_commons:152:3)
    at Socket._writeGeneric (node:net:958:11)
    at Socket._write (node:net:970:8)
    at writeOrBuffer (node:internal/streams/writable:572:12)
    at _write (node:internal/streams/writable:501:10)
    at Writable.write (node:internal/streams/writable:510:10)
    at /Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:109:2240
    at new Promise (<anonymous>)
    at j$e.send (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:109:2095)"
}
kynmh69kynmh69

デスクトップアプリを取り合えずアンインストールしてみる。。

kynmh69kynmh69

アンインストール後、エラーが変わった。。

2025-04-05T02:41:06.123Z [playwright] [info] Initializing server...
2025-04-05T02:41:06.148Z [playwright] [info] Server started and connected successfully
2025-04-05T02:41:06.150Z [playwright] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
env: node: No such file or directory
2025-04-05T02:41:06.175Z [playwright] [info] Server transport closed
2025-04-05T02:41:06.175Z [playwright] [info] Client transport closed
2025-04-05T02:41:06.175Z [playwright] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log.
2025-04-05T02:41:06.175Z [playwright] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) {"context":"connection"}
2025-04-05T02:41:06.175Z [playwright] [info] Client transport closed
kynmh69kynmh69

Claudeを再起動すると再発。。

2025-04-05T02:48:40.933Z [playwright] [info] Initializing server...
2025-04-05T02:48:40.954Z [playwright] [info] Server started and connected successfully
env: node: No such file or directory
2025-04-05T02:48:40.958Z [playwright] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-04-05T02:48:40.959Z [playwright] [error] write EPIPE {"context":"connection","stack":"Error: write EPIPE\n    at afterWriteDispatched (node:internal/stream_base_commons:161:15)\n    at writeGeneric (node:internal/stream_base_commons:152:3)\n    at Socket._writeGeneric (node:net:958:11)\n    at Socket._write (node:net:970:8)\n    at writeOrBuffer (node:internal/streams/writable:572:12)\n    at _write (node:internal/streams/writable:501:10)\n    at Writable.write (node:internal/streams/writable:510:10)\n    at /Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:109:2240\n    at new Promise (<anonymous>)\n    at j$e.send (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:109:2095)"}
2025-04-05T02:48:40.959Z [playwright] [info] Server transport closed
2025-04-05T02:48:40.959Z [playwright] [info] Client transport closed
2025-04-05T02:48:40.960Z [playwright] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log.
2025-04-05T02:48:40.960Z [playwright] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) {"context":"connection"}
2025-04-05T02:48:40.960Z [playwright] [info] Client transport closed