-
Notifications
You must be signed in to change notification settings - Fork 859
feat: add MCP Chrome extension #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4280890
to
dcce7ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
big change!
ed6a65c
to
eaf5fa3
Compare
53be395
to
7040a41
Compare
Let's structure your code a bit differently:
|
7040a41
to
0698d71
Compare
extension/background.js
Outdated
this.dispatch({ id: message.id, result: versionInfo }); | ||
return; | ||
} | ||
if (message.method === 'Target.setAutoAttach' && !message.sessionId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If message.sessionId
exists, I assume it will just forward the request to chrome.debugger.sendCommand
, right? I had some issues in the past with Target.setAutoAttach
requests on pages with service workers:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there was also issues with oopif that I had to address on Target.setAutoAttach
:
1876084
to
1edc6f5
Compare
1edc6f5
to
8890b76
Compare
f9a4598
to
1913cc7
Compare
1913cc7
to
9e5fadd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's land and iterate further.
Instructions:
git clone https://github.com/mxschmitt/playwright-mcp && git checkout extension-drafft
npm ci && npm run build
chrome://extensions
in your normal Chrome, "load unpacked" and select the extension folder.node cli.js --port=4242 --extension
- The URL it prints at the end you can put into the extension popup.Put either this into Claude Desktop (it does not support SSE yet hence wrapping it or just put the URL into Cursor/VSCode)
Things like
Take a snapshot of my browser.
should now work in your Prompt Chat.window.open
/target=_blank
.