Skip to content

Chrome DevTools for coding agents

chore: report current cli args (#1133)

Alex Rudenkof07353f88a77
diff --git a/src/bin/chrome-devtools.ts b/src/bin/chrome-devtools.ts
index ceb0496a..09f4def5 100644
--- a/src/bin/chrome-devtools.ts
+++ b/src/bin/chrome-devtools.ts
@@ -114,10 +114,12 @@ y.command('status', 'Checks if chrome-devtools-mcp is running', async () => {
socketPath: string;
startDate: string;
version: string;
+ args: string[];
};
console.log(
`pid=${data.pid} socket=${data.socketPath} start-date=${data.startDate} version=${data.version}`,
);
+ console.log(`args=${JSON.stringify(data.args)}`);
} else {
console.error('Error:', response.error);
process.exit(1);
diff --git a/src/daemon/daemon.ts b/src/daemon/daemon.ts
index b38f47b8..8402a9fd 100644
--- a/src/daemon/daemon.ts
+++ b/src/daemon/daemon.ts
@@ -44,6 +44,7 @@ logger(`Writing ${process.pid.toString()} to ${pidFilePath}`);
const socketPath = getSocketPath();
const startDate = new Date();
+const mcpServerArgs = process.argv.slice(2);
let mcpClient: Client | null = null;
let mcpTransport: StdioClientTransport | null = null;
@@ -52,11 +53,10 @@ let server: Server | null = null;
async function setupMCPClient() {
console.log('Setting up MCP client connection...');
- const args = process.argv.slice(2);
// Create stdio transport for chrome-devtools-mcp
mcpTransport = new StdioClientTransport({
command: process.execPath,
- args: [INDEX_SCRIPT_PATH, ...args],
+ args: [INDEX_SCRIPT_PATH, ...mcpServerArgs],
env: process.env as Record<string, string>,
});
mcpClient = new Client(
@@ -118,6 +118,7 @@ async function handleRequest(msg: DaemonMessage) {
socketPath,
startDate: startDate.toISOString(),
version: VERSION,
+ args: mcpServerArgs,
}),
};
}