I'm a bit confused about how to integrate Puppeteer with my Claude Code setup in WSL2. I've read a lot about Claude Desktop but I'm finding it hard to locate relevant info for my situation. Docker seems to have a selection of their MCP (Model Context Protocol) images, like the Puppeteer one, and I've seen references that suggest it might be better than the base Puppeteer MCP. Can someone help clarify how I can add Puppeteer functionality to my Claude Code? Should I do this directly or should I use Docker?
2 Answers
It's a bit tricky with the documentation, but here's a straightforward way to add a Puppeteer MCP server locally. You can use this command:
```
claude mcp add puppeteer -s user -- npx -y @modelcontextprotocol/server-puppeteer
```
After that, run `claude` and check out `/mcp` to see if it's all set up properly. Once you have that running, you can tell Claude to use Puppeteer for tasks like taking screenshots.
If you’re finding the docs lacking, you can always ask Claude Code itself! I had a similar issue and just requested it to set up the MCP for my script, and it did the work for me. Just provide it with the API documentation it needs, and it should take care of it!
Thanks for the tip! I tried that but Claude hasn't been very helpful today. It's been a bit unreliable, unfortunately.