feat: Add Dockerfile for MCP registry support#573
Closed
kgprs wants to merge 6 commits intoChromeDevTools:mainfrom
Closed
feat: Add Dockerfile for MCP registry support#573kgprs wants to merge 6 commits intoChromeDevTools:mainfrom
kgprs wants to merge 6 commits intoChromeDevTools:mainfrom
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.
Collaborator
|
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 |
Open
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.