Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bin/chrome-devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/daemon/daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(
Expand Down Expand Up @@ -118,6 +118,7 @@ async function handleRequest(msg: DaemonMessage) {
socketPath,
startDate: startDate.toISOString(),
version: VERSION,
args: mcpServerArgs,
}),
};
}
Expand Down
Loading