-
Notifications
You must be signed in to change notification settings - Fork 991
feat: Add Dockerfile for MCP registry support #573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
49cb645 to
a69b8cb
Compare
This Dockerfile enables the chrome-devtools-mcp server to be used with Docker-based MCP registries. It: - Uses Node.js 22 LTS with Chrome dependencies - Installs Chrome Stable for Puppeteer - Builds the TypeScript project - Runs as non-root user for security - Exposes the MCP server via stdio
a69b8cb to
4bfa245
Compare
The entrypoint script checks if BROWSER_URL environment variable is set and only passes --browserUrl flag if it's provided. This allows the MCP registry to support optional browser connection without template issues. Default behavior (no BROWSER_URL): Launches Chrome in headless mode With BROWSER_URL: Connects to existing Chrome instance
Extended entrypoint script to support all configuration options via environment variables: Connection Options: - BROWSER_URL: Connect to existing Chrome via HTTP - WS_ENDPOINT: Connect via WebSocket - WS_HEADERS: Custom headers for WebSocket (JSON) Browser Launch Options: - HEADLESS: true/false (default: true) - VIEWPORT: WIDTHxHEIGHT (default: 1280x720) - ISOLATED: true/false for temporary profile - CHANNEL: stable/canary/beta/dev - EXECUTABLE_PATH: Custom Chrome path - PROXY_SERVER: Proxy configuration - ACCEPT_INSECURE_CERTS: true/false Feature Toggles: - CATEGORY_EMULATION: true/false (default: true) - CATEGORY_PERFORMANCE: true/false (default: true) - CATEGORY_NETWORK: true/false (default: true) Debugging: - LOG_FILE: Path for debug logs
Removed the custom entrypoint script since the MCP registry doesn't support conditional command-line argument passing. The server will auto-launch Chrome with default settings (headless, 1280x720). Users who need custom Chrome configurations can build and run the server outside the registry using the standard npx approach with command-line flags.
Simple entrypoint script that converts environment variables to command-line flags only when set: - BROWSER_URL → --browserUrl - WS_ENDPOINT → --wsEndpoint - WS_HEADERS → --wsHeaders This allows the server.yaml to pass these as env vars without causing build errors when they're empty.
|
Thanks for the PR but we are not ready to ship a Docker image at this point. Could you please file a feature request instead? cc @natorion |
This PR adds a Dockerfile to enable the chrome-devtools-mcp server to be used with Docker-based MCP registries.
Changes
Testing
The Dockerfile can be tested by building and running:
docker build -t chrome-devtools-mcp . docker run -i chrome-devtools-mcpThis will enable the server to be added to Docker-based MCP registries like the one at https://github.com/docker/mcp-registry.