-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Our platform serves multiple tenants from the same domain, with tenant isolation handled via HTTP headers rather than separate subdomains or paths.
Current Limitation
The Playwright MCP currently doesn't provide a way to set custom headers, which prevents us from testing different tenant contexts in our local development environment.
Proposed Feature
Enable the MCP agent to specify custom headers (specifically tenant identification headers) when initiating browser sessions or making requests.
Use Case
Multi-tenant testing: Switch between different tenant contexts during end-to-end tests
Local development: Test tenant-specific functionality without deploying to separate environments
CI/CD integration: Automate testing across multiple tenant configurations
Expected Behavior
The agent should be able to pass custom headers (e.g., X-Tenant-ID: tenant-123) that persist throughout the browser session, allowing seamless testing of tenant-specific features and workflows.
This enhancement would significantly improve our ability to perform comprehensive end-to-end testing in multi-tenant environments.
Many Thanks!
I had previously tried to implement this functionality on the PR here: microsoft/playwright-mcp#801 -- however, as part of moving the MCP within the playwright monorepo, I was going to raise a new PR
Example
No response
Motivation
Our platform serves multiple tenants from the same domain, with tenant isolation handled via HTTP headers rather than separate subdomains or paths.
The Playwright MCP currently doesn't provide a way to set custom headers, which prevents us from testing different tenant contexts in our local development environment.