MCP (Model Context Protocol) servers extend Claude Code's capabilities. They run locally — no extra cost.
- Node.js 18+ installed
- Claude Code installed and working
Let Claude open browsers, take screenshots, click elements, and test UI.
claude mcp add playwright -- npx -y @executeautomation/playwright-mcp-serverUsage:
> Open a browser, navigate to localhost:3000 and take a screenshot
> Click the login button and verify the redirect works
> Fill in the registration form with test data and submit
Note: The official
@modelcontextprotocol/server-puppeteeris deprecated. Use Playwright instead.
claude mcp add github -- npx -y @modelcontextprotocol/server-githubclaude mcp add postgres -- npx -y @modelcontextprotocol/server-postgresclaude mcp add context7 -- npx -y @upstash/context7-mcpIn Claude Code:
/mcp
You should see servers listed with connected status.
| Problem | Fix |
|---|---|
Server shows failed |
/mcp → select server → Reconnect |
| Tools not appearing | Restart Claude Code session |
| npx timeout | Check Node.js: node --version |
| Permission errors | Run terminal as Administrator (Windows) |
If claude mcp add doesn't work, add to ~/.claude.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@executeautomation/playwright-mcp-server"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}Restart Claude Code after editing.