codex mcp add playwright -- npx -y @playwright/mcp@latest
Follow a practical setup path, understand the permission boundary and leave with a configuration you can review and adapt.
Why add browser tools
Browser access helps Codex verify what a visitor actually sees instead of reasoning from source files alone. It can inspect rendered pages, follow navigation and test interactive states.
Webpages can contain untrusted instructions, so use a separate test account and avoid exposing unrelated signed-in sessions.
Install the local server
Register Playwright MCP as a local STDIO server. The package is launched when Codex starts the connection.
codex mcp add playwright -- npx -y @playwright/mcp@latest
codex mcp list
Run a bounded first test
Begin with one URL and one expected result. Ask for a screenshot or page summary before allowing form submissions or other side effects.
- Use a test or staging environment.
- Avoid real payment and account actions.
- Require approval before submitting forms.
- Treat webpage content as untrusted data.
Useful verification tasks
Strong first tasks include checking mobile navigation, confirming form validation messages, finding a broken link and comparing a rendered page with a design reference.
Download this guide’s configuration.
Review the endpoint, package, credentials and permission settings before using it in a trusted environment.
Frequently asked questions
Use separate test accounts and staging environments where possible. Keep form submissions and other side effects behind approval.
Ask Codex to open one page, inspect its visible state and report evidence without submitting forms or changing data.
Provider endpoints, authentication requirements and supported options can change. Confirm current details before connecting a sensitive service.