-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Pupeteer can click xy #1595
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
Pupeteer can click xy #1595
Conversation
olaservo
left a comment
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.
Thanks for the PR - added some comments on cleaning up the commented parts (and if this is meant to be a draft, you can mark it as a 'draft' PR instead to clarify that its still WIP).
| @@ -0,0 +1,17 @@ | |||
| --- | |||
| description: Advice for using the puppeteer tool | |||
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.
Could you add more context around what this new file is for?
| }, | ||
| }, | ||
| // { | ||
| // name: "puppeteer_click_semantic", |
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.
Rather than adding commented-out code, lets create a follow-up issue for this as an enhancement (and feel free to assign to yourself if you are planning to implement this).
|
|
||
| // Function to call Claude for semantic clicking | ||
| /* | ||
| async function callClaudeForClick(screenshot: string, description: string): Promise<{x: number, y: number} | null> { |
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.
Same as above comment (applies to any commented code)
| "@modelcontextprotocol/server-slack": "*" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node-fetch": "^2.6.12" |
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.
I think you can remove this given that it seems its only used in the commented code?
|
Thanks for contributing this PR. This server has been moved to the archived repository at https://github.com/modelcontextprotocol/servers-archived to reduce maintenance overhead, so we can focus our efforts on a smaller set of core servers. |
Description
Added new browser interaction tools to the puppeteer MCP server:
Server Details
Motivation and Context
These additions enhance browser automation capabilities by providing more precise control over scrolling and clicking behaviors. The scroll functionality fills a critical gap in the previous implementation, allowing automated workflows to navigate longer pages effectively. The click_position tool enables exact coordinate-based interactions when selectors aren't available or appropriate.
How Has This Been Tested?
Breaking Changes
No breaking changes. All additions are backward compatible and don't affect existing functionality.
Types of changes
Checklist
Additional context
The implementation follows the same pattern as other puppeteer tools for consistency and maintainability. The scroll functionality supports both element-based scrolling (via selector) and position-based scrolling (via x/y coordinates) with configurable behavior (smooth/auto). Error handling follows the established pattern of the codebase.
The semantic click feature was commented out rather than removed completely to preserve the code for potential future enhancements.