Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@atxtechbro
Copy link
Owner

feat(mcp): route Playwright MCP through Patchright by default

Summary

  • Make Patchright the default undetectable backend for any Playwright MCP usage launched via dotfiles.
  • Non-invasive: implemented as shim + wrapper; no app code changes.

Changes

  • Add Patchright shim that intercepts require('playwright') → Patchright.
  • Add wrapper script and point Playwright MCP to it in configs:
    • mcp/mcp.json, .mcp.json
    • .codex/config.toml
  • Default enabled; provide simple opt-out flag.

Usage

  • Default: Patchright enabled.
  • Opt-out: set USE_PATCHRIGHT=0 (or false) to use vanilla Playwright.
  • Optional debug: USE_PATCHRIGHT_DEBUG=1 prints shim activation to stderr.

Dependencies (not auto-installed)

  • Install Patchright in shim dir and Chromium once:
    • cd mcp/patchright-shim && npm init -y && npm i patchright
    • npx patchright install chromium
  • Playwright MCP can run via npx (current config) or be installed locally if desired.

Verification

  • List MCP tools to confirm server runs via wrapper.
  • Navigate to about:blank and screenshot using mcp__playwright__* tools.

Notes

  • No references to private apps; this is general dotfiles MCP wiring.
  • Flag-driven approach keeps behavior reversible and minimal.

…d Patchright shim and wrapper script\n- Update MCP configs (mcp.json, .mcp.json)\n- Update Codex config to use wrapper\n\nToggle: set USE_PATCHRIGHT=0 to opt out\nSetup: run 'npx patchright install chromium' for undetectable Chromium\n\nNo references to private apps; general-purpose MCP wiring only.
@amazon-q-developer
Copy link
Contributor

Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation.

Slash Commands

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository.

For more detailed information, visit the Amazon Q for GitHub documentation.

Footnotes

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

…se PATH command\n\n- Wrapper resolves its own directory; no absolute NODE_PATH\n- MCP configs use 'patchright-playwright-mcp' on PATH\n- setup-all-mcp-servers.sh creates ~/.local/bin symlink for portability
@atxtechbro
Copy link
Owner Author

Addressed portability: removed hardcoded absolute paths.\n\n- Wrapper now resolves its own directory and sets NODE_PATH dynamically\n- MCP configs call 'patchright-playwright-mcp' from PATH (no absolute paths)\n- setup-all-mcp-servers.sh creates ~/.local/bin symlink to the wrapper\n\nThis keeps the repo portable across machines/worktrees without referencing private directories.

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.

2 participants