-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
While building a skill to launch Chrome with an extension side-loaded and connect Playwright MCP via CDP, I encountered some friction points that could be improved.
Use case: Launch Chrome with --remote-debugging-port=9222 and have Playwright connect to it via --cdp-endpoint instead of launching its own browser. This enables debugging Chrome extensions with the extension already loaded.
What Worked Well
- Progressive disclosure - Only loading tool schemas on-demand is excellent for context management
- Server isolation - One server crashing (
playwright-cdp) didn't affect others (filesystem,context7) - Custom server config - Adding a custom server to
~/.pmcp.jsonwas straightforward once discovered - Health endpoint - Clearly shows which servers are healthy vs errored
Suggestions for Improvement
1. Server arg override/merge capability
I had to create a separate playwright-cdp entry rather than being able to add args to the manifest's playwright:
{
"mcpServers": {
"playwright-cdp": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest", "--cdp-endpoint", "http://localhost:9222"]
}
}
}Suggestion: Allow overriding/extending manifest server configs:
{
"serverOverrides": {
"playwright": {
"extraArgs": ["--cdp-endpoint", "http://localhost:9222"]
}
}
}This would let users customize manifest servers without duplicating the entire config.
2. Error details in health endpoint
When playwright-cdp went to "error" state, the health endpoint showed:
{
"name": "playwright-cdp",
"status": "error",
"tool_count": 22
}Suggestion: Include error details:
{
"name": "playwright-cdp",
"status": "error",
"tool_count": 22,
"error": "Server process exited unexpectedly during browser_take_screenshot",
"last_error_ts": 1234567890
}3. CDP connection mode in manifest
For browser automation servers, the manifest could document alternative connection modes:
playwright:
# ... existing config ...
variants:
cdp:
description: "Connect to existing browser via CDP"
extra_args: ["--cdp-endpoint", "http://localhost:9222"]
note: "Requires browser launched with --remote-debugging-port=9222"Or at minimum, a comment in the manifest noting this capability exists.
4. Config discovery documentation
The README mentions ~/.mcp.json for custom servers, but I initially looked in several wrong places (Claude plugin configs, etc.).
Suggestion: Add a clear "Configuration Locations" section with priority order:
Config Discovery Priority:
1. Project: .mcp.json in current directory
2. User: ~/.mcp.json or ~/.pmcp.json
3. Custom: --config flag or PMCP_CONFIG env var
Additional Note
During testing, I discovered that browser_take_screenshot causes the Playwright MCP server to disconnect when using CDP mode. Navigation, snapshots, and clicks all work fine. This appears to be a Playwright MCP bug (not a gateway issue) - the gateway correctly isolated the failure and kept other servers running.
Happy to provide more details or help test any of these improvements!