Chrome DevTools for coding agents
feat: Add --allow-unrestricted-paths by default for CLI (#2618)
Dominik Inführ2dc104ce1bec
diff --git a/skills/chrome-devtools-cli/SKILL.md b/skills/chrome-devtools-cli/SKILL.mdindex 2f28ddf2..093c3a36 100644--- a/skills/chrome-devtools-cli/SKILL.md+++ b/skills/chrome-devtools-cli/SKILL.md@@ -24,12 +24,7 @@ uid=1_0 RootWebArea "Example Domain" url="https://example.com/"## Permissions & File Access-By default, the server only has access to the **OS temp directory** (as defined by Node APIs, `os.tmpdir()`). File-saving parameters (`--filePath`, `--outputDirPath`) and `upload_file` outside the temp directory require unrestricted filesystem access:--```bash-# Start daemon with full filesystem access-chrome-devtools start --allowUnrestrictedPaths=true-```+By default, the CLI has full filesystem access (`--allowUnrestrictedPaths=true`), allowing file-saving parameters (`--filePath`, `--outputDirPath`) and `upload_file` to access files anywhere on the system. Pass `--allowUnrestrictedPaths=false` if you want to restrict file access to the OS temp directory.## Command Usage@@ -191,7 +186,6 @@ chrome-devtools execute_3p_developer_tool 1 "tool_name" --params '{"arg":"val"}'```bashchrome-devtools start # Start or restart chrome-devtools-mcp-chrome-devtools start --allowUnrestrictedPaths=true # Start with full filesystem accesschrome-devtools start --headless=false # Start with visible browser windowchrome-devtools status # Checks if chrome-devtools-mcp is runningchrome-devtools stop # Stop chrome-devtools-mcp if anydiff --git a/src/config/mcp-options.ts b/src/config/mcp-options.tsindex c42d2821..ac5d06c8 100644--- a/src/config/mcp-options.ts+++ b/src/config/mcp-options.ts@@ -383,6 +383,11 @@ export function getMcpOptionsForViaCli(): typeof mcpOptions {if (!('default' in mcpOptions.headless)) {throw new Error('headless cli option unexpectedly does not have a default');}+ if (!('default' in mcpOptions.allowUnrestrictedPaths)) {+ throw new Error(+ 'allowUnrestrictedPaths cli option unexpectedly does not have a default',+ );+ }if (!('default' in mcpOptions.experimentalStructuredContent)) {throw new Error('experimentalStructuredContent cli option unexpectedly does not have a default',@@ -394,6 +399,10 @@ export function getMcpOptionsForViaCli(): typeof mcpOptions {return {...mcpOptions,+ allowUnrestrictedPaths: {+ ...mcpOptions.allowUnrestrictedPaths,+ default: true,+ },headless: {...mcpOptions.headless,default: true,diff --git a/tests/cli.test.ts b/tests/cli.test.tsindex 4df7e797..d460ea9c 100644--- a/tests/cli.test.ts+++ b/tests/cli.test.ts@@ -45,6 +45,7 @@ describe('cli args parsing', () => {it('parses with viaCli args', async () => {const args = parseArguments(['--viaCli']);+ assert.strictEqual(args.allowUnrestrictedPaths, true);assert.strictEqual(args.headless, true);assert.strictEqual(args.memoryDebugging, true);assert.strictEqual(args.categoryExtensions, true);