Skip to content

Commit 86a7dd0

Browse files
christian-byrnegithub-actions
andauthored
[Dev] Add Playwright MCP for Local Development (#4028)
Co-authored-by: github-actions <[email protected]>
1 parent dee00ed commit 86a7dd0

File tree

8 files changed

+1876
-79
lines changed

8 files changed

+1876
-79
lines changed

.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"playwright": {
4+
"command": "npx",
5+
"args": ["-y", "@executeautomation/playwright-mcp-server"]
6+
}
7+
}
8+
}

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,68 @@ This project includes `.vscode/launch.json.default` and `.vscode/settings.json.d
609609

610610
We've also included a list of recommended extensions in `.vscode/extensions.json`. Your editor should detect this file and show a human friendly list in the Extensions panel, linking each entry to its marketplace page.
611611

612+
### Recommended MCP Integrations
613+
614+
#### Playwright Browser Automation
615+
616+
The Playwright MCP server enables LLM coding assistants (like Copilot, Claude Code, etc.) to control and inspect web browsers programmatically. This allows assistants to navigate websites, take screenshots, and interact with web pages on your behalf.
617+
618+
For ComfyUI_frontend development, you can ask coding assistants to use Playwright screenshots to continuously verify that your code changes produce the expected visual results.
619+
620+
##### Setup for Claude Code
621+
622+
After installing dependencies with `npm i`, the Playwright MCP server will be automatically available when you start Claude Code locally.
623+
624+
Here's how Claude Code can use the Playwright MCP server to inspect the interface of the local development server (assuming you're running the dev server at `localhost:5173`):
625+
626+
627+
```
628+
> navigate to localhost:5173 and take a screenshot.
629+
tell me the items in the menubar
630+
631+
● I'll navigate to localhost:5173 and take a
632+
screenshot to see the menubar items.
633+
634+
● playwright:playwright_navigate (MCP)(url: …
635+
"http://local
636+
host:5173")
637+
⎿  Navigated to http://localhost:5173
638+
639+
● playwright:playwright_screenshot (MCP)(name: "lo…
640+
alhost_5173
641+
_menubar")
642+
643+
⎿ Screenshot saved to: ../../../Downloads/localho
644+
st_5173_menubar-2025-05-30T17-23-00-942Z.png
645+
⎿  Screenshot also stored in memory with name:
646+
'localhost_5173_menubar'
647+
648+
● Read(../../../Downloads/localhost_5173_menubar-2…
649+
25-05-30T17-23-00-942Z.png)
650+
⎿  Read image (94.3KB)
651+
652+
● Based on the screenshot, I can see the menubar at
653+
the top of the ComfyUI interface contains the
654+
following items:
655+
656+
Main Menubar Items:
657+
- Workflow - Menu for workflow-related actions
658+
- Edit - Menu for editing operations
659+
- Help - Menu for help and documentation
660+
661+
Additional UI Elements:
662+
- ComfyUI Logo - On the far left
663+
- Workflow Tab - Shows "Unsaved Workflow" with a
664+
dropdown and close button
665+
- Layout Controls - On the far right (grid view
666+
and hamburger menu icons)
667+
668+
The interface shows a typical ComfyUI workflow
669+
graph with nodes like "Load Checkpoint", "CLIP
670+
Text Encode (Prompt)", "KSampler", and "Empty
671+
Latent Image" connected with colored cables.
672+
```
673+
612674
### Unit Test
613675

614676
- `npm i` to install all dependencies
-1.54 KB
Loading
-1.74 KB
Loading
-185 Bytes
Loading
-2.72 KB
Loading

0 commit comments

Comments
 (0)