Skip to content

Conversation

@JacobFV
Copy link

@JacobFV JacobFV commented Apr 26, 2025

Description

Added new browser interaction tools to the puppeteer MCP server:

  • Added puppeteer_scroll tool for scrolling to specific positions or elements
  • Added puppeteer_click_position tool for precise coordinate-based clicking
  • Commented out the semantic click handler (puppeteer_click_semantic)
  • Updated README documentation to reflect these changes

Server Details

  • Server: puppeteer
  • Changes to: tools, documentation

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?

  • Tested with Anthropic Claude 3.7 for full stack development workflow automation
  • Successfully used in browser-based testing and web application development

Breaking Changes

No breaking changes. All additions are backward compatible and don't affect existing functionality.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

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.

Copy link
Member

@olaservo olaservo left a 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
Copy link
Member

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",
Copy link
Member

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> {
Copy link
Member

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"
Copy link
Member

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?

@olaservo olaservo added server-puppeteer enhancement New feature or request labels May 5, 2025
@olaservo
Copy link
Member

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.
Since we're no longer accepting contributions to this server, we won't be able to merge this PR. If you're interested in contributing similar functionality, we recommend checking out the alternatives listed in the Readme.

@olaservo olaservo closed this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants