Skip to content

add Playwright MCP server config#25

Merged
AntonNiklasson merged 2 commits into
mainfrom
an/playwright-mcp
Apr 30, 2026
Merged

add Playwright MCP server config#25
AntonNiklasson merged 2 commits into
mainfrom
an/playwright-mcp

Conversation

@AntonNiklasson
Copy link
Copy Markdown
Owner

Summary

  • Adds project-scoped .mcp.json so Claude Code sessions in this repo can use Playwright MCP
  • Lets Claude take browser screenshots and interact with the running dev app at localhost — closes the UI feedback loop where Claude couldn't previously verify visual changes
  • --isolated keeps it from touching the persistent browser profile

Activation

After merging, restart Claude Code in this repo. It'll prompt to approve the MCP server. Once approved, tools like browser_navigate, browser_snapshot, browser_take_screenshot, browser_click are available.

Test plan

  • Restart Claude Code → approval prompt for playwright server appears
  • After approval, /mcp lists playwright as connected

@AntonNiklasson AntonNiklasson marked this pull request as ready for review April 30, 2026 06:30
Copilot AI review requested due to automatic review settings April 30, 2026 06:30
@AntonNiklasson AntonNiklasson merged commit 5d3b58c into main Apr 30, 2026
1 check passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a project-scoped Playwright MCP configuration and agent-facing guidance so coding agents can interact with the running web UI (navigate, snapshot, screenshot) during development.

Changes:

  • Add .mcp.json configuring a playwright MCP server using npx with --isolated
  • Add AGENTS.md with suggested validation workflow and Playwright MCP usage notes
  • Ignore Playwright MCP local state directory via .gitignore

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
AGENTS.md Documents local dev commands and a Playwright MCP-driven UI validation loop for coding agents
.mcp.json Introduces project-level MCP server config for Playwright browser automation
.gitignore Ignores .playwright-mcp/ local runtime artifacts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .mcp.json
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--isolated"]
Comment thread AGENTS.md

Typical loop: edit → dev server hot-reloads → snapshot/interact → check console + `.logs/*` → iterate.

A `config.yaml` with valid tokens already exists locally; don't overwrite it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants