Skip to main content

MCP Guide

The agent image ships with two preloaded MCPs: Playwright MCP and Email MCP. Both are installed as system services managed by supervisor and are not running by default. The run-qa command starts both MCPs at the beginning of each test run so that any configuration changes are picked up, and terminates them when the run ends.


Playwright MCP​

Provides tools for browser automation.

GitHubhttps://github.com/microsoft/playwright-mcp
Installed versionv0.0.75
File directory/services/playwright
Preinstalled browserChromium
Default config file/services/playwright/playwright-mcp-config.json
playwright-mcp-config.json (default)
{
"browser": {
"browserName": "chromium",
"launchOptions": {
"args": [
"--disable-gpu",
"--disable-setuid-sandbox"
]
},
"snapshot": {
"mode": "none"
}
}
}

URL Permissions​

When Playwright MCP starts, it reads allowed-domains.yaml to determine which URLs the agent is permitted to access. Any attempt to visit a URL not on the list returns an error immediately.

allowed-domains.yaml can be placed either under /services/playwright or /agent/instructions/. The latter is recommended as it is mounted from the host and survives container restarts.

The file contains a single array property allowed listing all permitted origins.

allowed-domains.yaml (example)
allowed:
# Wikipedia — root domain and English subdomain listed separately
- https://www.wikipedia.org
- https://en.wikipedia.org

# Local app on a specific port
- http://host.docker.internal:8080

# Staging subdomains
- https://app.staging.example.com
- https://api.staging.example.com
tip

When testing a website running on your local machine, replace localhost with host.docker.internal. For example, http://localhost:8080 becomes http://host.docker.internal:8080.

Format Rules​

FormatExampleWhat It MatchesWhat It Does NOT Match
Full originhttps://example.comOnly https://example.com on port 443http://example.com, https://sub.example.com, https://example.com:8080
Full origin with porthttps://example.com:8080Only https://example.com:8080Any other port on the same host
Wildcard subdomainhttps://*.example.comAny subdomain of example.com over HTTPShttps://example.com (root domain itself)

Behavior Rules​

RuleDetail
Subdomains are not included automaticallyhttps://wikipedia.org does NOT cover https://en.wikipedia.org. Each subdomain must be listed separately.
Protocol is exacthttps://example.com and http://example.com are different origins and must be listed separately.
Port is exacthttps://example.com does not cover https://example.com:8080. They must be listed as separate entries.
Path is ignoredhttps://example.com/app and https://example.com/admin are treated as the same origin. Access cannot be restricted by path.
Redirects are not affectedIf an allowed origin redirects to a blocked one, the redirect is still followed. This is not a security boundary.

Environment Variables​

VariableDescriptionDefault
ENABLE_PLAYWRIGHT_MCPEnable Playwright MCPtrue
FIREWALL_DEBUGEnable firewall debug logsfalse
warning

The agent will not start if Playwright MCP is disabled.


Email MCP​

Provides simple email utilities for sending and receiving emails during tests. This MCP can be ignored if no email operations are required.

GitHubhttps://github.com/taodong/duotail-test-sender
Installed versionv0.5.1
File directory/services/email
Default config file/services/email/email-mcp.properties

For full configuration and usage details, refer to the Email MCP README.

Environment Variables​

VariableDescriptionDefault
ENABLE_EMAIL_MCPEnable Email MCPtrue
MAIL_HOSTSMTP host for sending emaillocalhost
MAIL_PORTSMTP port for sending email25
MAILHOG_URLMailHog URL for checking received emailshttp://localhost:8025
EMAIL_PERM_FILEPath to the email permissions file/agent/instructions/email-permissions.yaml
warning

If ENABLE_EMAIL_MCP is set to false, also remove the email entry from /agent/config/mcp-config.json so the agent does not attempt to connect to a server that is not running.