Skip to content

Add playwright-mcp package - #23

Closed
Pentusha wants to merge 35 commits into
pietdevries94:mainfrom
Pentusha:main
Closed

Add playwright-mcp package#23
Pentusha wants to merge 35 commits into
pietdevries94:mainfrom
Pentusha:main

Conversation

@Pentusha

@Pentusha Pentusha commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the Playwright MCP server and introduces automated dependency updates with CI integration.

New features

  • playwright-mcp package — new flake output #playwright-mcp that packages the official Microsoft Playwright MCP server
  • Auto-update workflow — daily cron job that checks for new Playwright/MCP versions, updates flake.lock, and creates/updates a PR with a detailed summary of changes
  • CI workflow — runs nix build and nix flake check on Linux and macOS for every PR; auto-merges PRs labeled auto-update after CI passes
  • Nix flake checks — add automated checks to validate the flake

Cleanup

  • Remove dead code (fix deadnix and statix warnings)
  • Consolidate duplicate MCP config examples in README; add config file locations table
  • Bump actions/checkout from v4 to v6

Setup required by the repository owner

The auto-update workflow needs a Personal Access Token so that PRs it creates trigger the CI workflow (events from the default GITHUB_TOKEN do not trigger other workflows).

1. Create a fine-grained PAT

gh auth token  # verify you're authenticated

# Create a fine-grained PAT scoped to this repo with the required permissions
# This opens a browser to complete the token creation
open "https://github.com/settings/personal-access-tokens/new"

When creating the token:

  • Repository access: select only this repository
  • Permissions: Contents: Read and write, Pull requests: Read and write
  • Expiration: choose an appropriate lifetime

2. Add the token as a repository secret

# You'll be prompted to paste the token value
gh secret set PAT_TOKEN --repo pietdevries94/playwright-web-flake

3. Create the auto-update label

The CI workflow uses this label to identify PRs eligible for auto-merge.

gh label create auto-update \
  --description "Automated dependency update" \
  --color "0E8A16" \
  --repo pietdevries94/playwright-web-flake

Usage

nix shell github:pietdevries94/playwright-web-flake#playwright-mcp

Claude Configuration

Add to your MCP config file:

{
  "mcpServers": {
    "playwright": {
      "command": "nix",
      "args": ["shell", "github:pietdevries94/playwright-web-flake#playwright-mcp", "--command", "playwright-mcp", "--headless"]
    }
  }
}
Tool Config File Path
Claude Desktop ~/.config/claude/claude_desktop_config.json
Claude Code .mcp.json (project root)

Copilot AI review requested due to automatic review settings April 2, 2026 15:01
@Pentusha Pentusha changed the title docs: consolidate duplicate MCP config examples Add playwright-mcp package Apr 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for running the Playwright MCP server from the flake and documents how to configure it for MCP-compatible clients.

Changes:

  • Added a playwright-mcp Nix package (Node workspace build) and exposed it via flake.nix.
  • Added flake checks for playwright-test, playwright-driver, and playwright-mcp.
  • Updated driver-related Nix expressions (deps/args cleanups) and documented MCP configuration + config file locations in the README.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents how to run/configure the new Playwright MCP server and where MCP config files live for Claude tools.
playwright-mcp/package.nix Introduces a playwright-mcp package build and wraps the executable with Playwright-related environment.
flake.nix Exposes playwright-mcp as a flake package and adds basic build/runtime checks.
playwright-driver/webkit.nix Adds hyphen to WebKit runtime deps and minor overrideAttrs lambda cleanup.
playwright-driver/ffmpeg.nix Removes an unused argument and normalizes the revisionOverrides default.
playwright-driver/driver.nix Removes unused parameters/defaults and minor attribute-set cleanup.
playwright-driver/chromium.nix Removes unused parameters from the function signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread playwright-mcp/package.nix Outdated
Comment thread playwright-mcp/package.nix
Pentusha and others added 22 commits April 2, 2026 18:13
- Fetch latest version from Microsoft/playwright-mcp releases

- Update version, src hash, and npmDepsHash in package.nix
- Replace hardcoded 'playwright-mcp-internal' with ${pname}

- Add comment explaining why manual copy/symlink fix is needed
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix empty PR summary caused by backticks being interpreted as command
substitution when expanded via ${{ }} in shell context. Add dedicated
flake inputs section showing nixpkgs and flake-utils revision changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitHub Actions events created with GITHUB_TOKEN do not trigger other
workflows. Switch to a PAT so that PRs created by auto-update properly
trigger the CI workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused github_api_get(), github_api_curl_args, and major_minor()
functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace separate check-linux and check-darwin jobs with a single job
using an os matrix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change commit message from single version to 'Auto-update dependencies DATE'
- Include full PR body in commit message for better context
- Remove unused version.txt reference
## Summary

### Flake inputs

| Input | Old | New |
|-------|-----|-----|
| nixpkgs | `68d8aa3` | `4c1018d` |
## Summary

### Flake inputs

| Input | Old | New |
|-------|-----|-----|
| nixpkgs | `4c1018d` | `4bd9165` |
@bitbloxhub

bitbloxhub commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

This does a lot more than it says in the title, including many minor stylistic changes, changing how update scripts work, and has an messy commit history. I'd be happy to review individual PRs for each of these changes, but not one big messy one.

github-actions Bot and others added 9 commits April 21, 2026 00:16
## Summary

### Flake inputs

| Input | Old | New |
|-------|-----|-----|
| nixpkgs | `4bd9165` | `b12141e` |
## Summary

### Flake inputs

| Input | Old | New |
|-------|-----|-----|
| nixpkgs | `b12141e` | `0726a0e` |
## Summary

### Core packages

| Package | Old | New |
|---------|-----|-----|
| Playwright MCP | `0.0.70` | `0.0.71` |

### Release notes

- [Playwright MCP v0.0.71](https://github.com/microsoft/playwright-mcp/releases/tag/v0.0.71)
Remove workspace-specific build logic as v0.0.71 is now a flat package structure

Agent-Logs-Url: https://github.com/Pentusha/playwright-web-flake/sessions/2068e708-699b-4d15-9ec7-b1f2cb22f29d

Co-authored-by: Pentusha <1904496+Pentusha@users.noreply.github.com>
## Summary

### Flake inputs

| Input | Old | New |
|-------|-----|-----|
| nixpkgs | `0726a0e` | `1c3fe55` |
@Pentusha

Copy link
Copy Markdown
Contributor Author

@bitbloxhub yes, for sure. I'll open few new PRs instead soon.

@Pentusha Pentusha closed this Apr 30, 2026
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.

4 participants