To modify the MCP Gateway to use the Playwright server with a custom directory (e.g., mounting a persistent directory), you need to update the MCP catalog and configure the Playwright server entry:
Export the Current MCP Catalog
Export the official MCP catalog to a local YAML file for editing:
1docker mcp catalog show docker-mcp --format yaml > docker-mcp.yamlModify the Playwright Server Entry
Open the docker-mcp.yaml file in a text editor and locate the Playwright server entry. It will look something like this:
1- name: playwright2 image: mcp/server-playwright:latest3 description: "Playwright server for browser automation"Add a volumes section to mount a persistent directory. For example:
1- name: playwright2 image: mcp/server-playwright:latest3 description: "Playwright server for browser automation"4 volumes:5 - /path/to/your/local/directory:/appReplace /path/to/your/local/directory with the path to your desired persistent directory.
Mount Playwright screenshots Directory
1volumes:2 - /path/to/your/local/directory:/tmpImport the Modified Catalog
After editing the catalog, import it back into the MCP Gateway:
1docker mcp catalog import docker-mcp.yamlEnable the Playwright Server
Enable the Playwright server in the MCP Gateway:
1docker mcp server enable playwrightVerify the Configuration
List the enabled servers to ensure the Playwright server is active:
1docker mcp server listLogging
1docker mcp gateway run --verbose --log-callsSources:
• https://www.docker.com/blog/build-custom-mcp-catalog/
• https://github.com/docker/mcp-gateway/blob/main/docs/catalog.md