Skip to content

fix(mcp): add auto-install to Playwright MCP wrapper#952

Open
atxtechbro wants to merge 1 commit intomainfrom
fix/playwright-mcp-auto-install
Open

fix(mcp): add auto-install to Playwright MCP wrapper#952
atxtechbro wants to merge 1 commit intomainfrom
fix/playwright-mcp-auto-install

Conversation

@atxtechbro
Copy link
Owner

Overview

This PR enhances the Playwright MCP wrapper script to automatically install the Playwright MCP server if it's not already installed. This follows the Spilled Coffee Principle by ensuring that the system can recover automatically without manual intervention.

Changes

  • Update wrapper script to detect if playwright-mcp is installed
  • Automatically run the setup script if the command is not found
  • Add proper error handling and logging during the installation process
  • Ensure the setup script is executable before running it

Motivation

The previous implementation required manual execution of the setup script, which violates the Spilled Coffee Principle. This change ensures that anyone can use the Playwright MCP server without having to manually run setup scripts.

Testing

  • Tested by verifying that the wrapper script correctly detects when playwright-mcp is not installed
  • Confirmed that the automatic installation process works correctly

Principles Applied

  • Spilled Coffee Principle: Anyone should be able to destroy their machine and be fully operational again that afternoon
  • Systems Stewardship: Maintaining and improving systems through consistent patterns

- Update wrapper script to automatically run setup script if needed
- Follow Spilled Coffee Principle by making installation automatic
- Improve error handling and logging during installation

Principle: spilled-coffee-principle
@amazon-q-developer
Copy link
Contributor

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-q-developer
Copy link
Contributor

✅ I finished the code review, and left comments with the issues I found. I will now generate code fix suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant