PlaywrightGen

com.playwrightgen由 playwrightgen.com 发布官方发布者v1.0.0更新于 Oct 26, 2026

Approved test intent, reviewed Playwright automation and run evidence, inside your editor.

已验证Streamable HTTP可网页运行浏览器自动化开发者工具

概览

AI 生成的概览

远程 MCP 服务器,让助手读取已批准的测试意图、在真实页面上编写并验证 Playwright 测试,并提交待审草稿。

可以做什么
  • 读取已批准的需求、测试用例与已批准的自动化版本
  • 根据公开网址编写 Playwright 测试,在远程浏览器中运行并修复失败步骤直至通过
  • 查看近期失败记录与关联到已批准版本的运行证据
  • 提交需求、测试用例和自动化的草稿供人工审核
  • 通过签名证明链接分享结果(在工作区中完成,不由代理执行)
适用场景
适合希望助手基于已达成一致的测试意图而非猜测来工作,并产出经过校验、运行且有人工批准证据的 Playwright 测试的团队。适用于重视从需求到通过运行可追溯性的测试与发布流程。
运行要求
通过 streamable HTTP 连接 playwrightgen.com 的远程端点。需在 Authorization 请求头中提供 bearer 令牌,即项目 Automation 页面中的个人编辑令牌。免费工具无需账号;工作区记录需要 PlaywrightGen 账号与项目。
安装前请注意
令牌拥有其所属人员的全部权限,建议使用专用账号。服务器只能提议和发送代码,无法批准、接受、分享或删除,批准必须由人完成。它编写的测试会在远程浏览器中针对你提供的页面运行,CI 回传的运行证据为有限摘要。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PlaywrightGen,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.playwrightgen%2Fplaywrightgen/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "playwrightgen": {
      "type": "http",
      "url": "https://playwrightgen.com/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

PlaywrightGen

Playwright tests written from your real page, run until they pass, and kept as evidence a person approved.

Live at playwrightgen.com.

Writing a Playwright test is no longer the hard part — every editor has an assistant that will do it. What none of them keep is the thing an audit, a release decision or a customer actually asks for: which behaviour was agreed, by whom, at which version, and what the last run proved. That record is what this product is.

How it works

Two ways in, one chain.

The free tools need no account. Say what to test, paste a public URL, and PlaywrightGen reads the page, writes a test from its real accessibility tree, runs it in a remote browser, and fixes the failing step until it passes. You get working code and the run that proves it, signed so the evidence survives if you later bring it into a workspace. Nothing durable is claimed until you do.

The workspace turns that into a record:

  1. A Requirement is drafted, reviewed and approved. Approving writes an immutable version.
  2. Test Cases carry objective, steps and expected results, are approved the same way, and link to the Requirements they verify.
  3. Automation is generated from an approved Test Case version, validated against deterministic rules, proven on the live page, and then approved by a person — never by the generator and never by an agent.
  4. Run evidence arrives from your own CI. Your tests run on your runners, against your environment, with your secrets; only a bounded summary of results is sent. A [pwg:...] marker in the test title is what ties a result to the approved version it is evidence for.
  5. A proof link shares the result outside the team: a signed URL anybody can open, with an acceptance signature and a downloadable file they can keep.

Every claim on that chain names its source. A requirement with no passing test says so; a run that was skipped says it proved nothing; a report that was bounded says how much it did not cover.

What holds it honest

  • A prompt is a request; a validator is a rule. Every promise a prompt makes has a deterministic check behind it: no focused tests, no fixed sleeps, no credentials in the file, no request to an address that is not the application under test, no Node capability a browser test has no business reaching for.
  • A repair may not weaken a test. The quickest way to make a failing assertion pass is to delete it, so a fix that checks less than the test it was given is refused.
  • Separation of duties. The person who proposed something cannot be the one who approves it; the MCP server can propose and send code and has no capability to approve, accept, share or delete, which a test enforces by reading the import graph.
  • Every AI surface is measured. npm run evals grades each prompt deterministically against structured output and compares the run with a hand-blessed baseline.

For agents (MCP)

PlaywrightGen is an MCP server, so Claude Code, Cursor or Copilot can read the approved intent instead of guessing: sixteen tools covering requirements, test cases, approved automation, recent failures, writing and proving a test on a live page, and proposing drafts for review. An agent gets exactly the rights of the person whose token it used.

Running it locally

bash
npm installnpm run dev

Then npm run test:run for the suite, npm run typecheck, npm run lint, and npm run build. Integration tests need TEST_DATABASE_URL pointing at a database used for nothing else; they refuse anything that looks like production.

Built with Next.js, TypeScript, PostgreSQL (Prisma), Clerk, Tailwind, Playwright, OpenAI and Stripe.

Environment

Runtime:

  • DATABASE_URL — PostgreSQL for the application.
  • DIRECT_URL — optional direct connection preferred by migration commands.
  • TEST_DATABASE_URL — a separate database for integration tests. It never falls back to either of the above.
  • NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY, CLERK_WEBHOOK_SIGNING_SECRET
  • OPENAI_API_KEY — server-only. Per-surface model overrides exist, for example OPENAI_REQUIREMENT_REVIEW_MODEL and OPENAI_FAILURE_ANALYSIS_MODEL.
  • UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN — the per-minute and per-day AI allowances.
  • RUNNER_INGEST_SECRET — signs live-run receipts, so a receipt proves a run of that exact code.
  • BROWSERLESS_API_KEY — the remote browser the free tools and proving use.
  • EXAMPLE_EVIDENCE_PROJECT_ID — optional: the one project whose evidence is published publicly at /proof/example.

GitHub integration (separate values per environment):

  • GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, GITHUB_APP_SLUG, GITHUB_APP_CLIENT_ID, GITHUB_APP_CLIENT_SECRET, GITHUB_WEBHOOK_SECRET
  • GITHUB_SETUP_STATE_SECRET — at least 32 characters, distinct from every other secret.
  • NEXT_PUBLIC_APP_URL — the exact origin the GitHub callback returns to.

The App is held to a permission ceiling, checked on every installation and refused if exceeded: metadata: read, contents: read and write, pull_requests: read and write, issues: read. Contents write is what opens a pull request with approved test code; pull-requests write is what leaves the evidence note on it; issues read is what drafts a requirement from a ticket. User and installation tokens are transient and are never logged or stored.

Clerk webhooks go to /api/webhooks/clerk with CLERK_WEBHOOK_SIGNING_SECRET set locally and in the deployment, subscribed to:

  • user.created, user.updated, user.deleted
  • organization.created, organization.updated, organization.deleted
  • organizationMembership.created, organizationMembership.updated, organizationMembership.deleted

Local webhook delivery needs a secure tunnel to the local application. Never put a webhook secret in documentation or source control.

Operations

Reconcile one Clerk organization, dry-run by default:

bash
npm run clerk:reconcile -- --organization-id org_example# ornpm run clerk:reconcile -- --slug workspace-slug

Add --apply after reading the dry-run counts. It never sweeps every organization.

Database:

bash
npm run prisma:formatnpm run prisma:validatenpm run prisma:generatenpm run prisma:migrate:devnpm run test:database

Never commit credentials, secrets, .env or .env.local. Never point a development migration or reset command at production.

Where the work is written down

  • docs/ROADMAP.md — what shipped, what is next, and what was deliberately not done.
  • docs/DECISIONS.md — architecture decisions, each with its reason.
  • docs/ARCHITECTURE.md, docs/PRODUCTION_READINESS.md — the shape of the system and the gates before a production deploy.
  • examples/ci-proof — a disposable repository that proves the CI loop end to end.

来源:README.md,提交 87dcc0d

工具

0
该服务器需要 API 密钥等凭据,因此 SourceWeft 无法在没有凭据的情况下读取其工具,也未收录。

版本历史

1
  1. v1.0.0最新Sep 20, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Playwrightgen 集成