Skip to main content
Glama

Chrome DevTools MCP

sed.ts653 B
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as fs from 'node:fs'; /** * Replaces content in a file. * @param filePath The path to the file. * @param find The regex to find. * @param replace The string to replace with. */ export function sed( filePath: string, find: RegExp | string, replace: string, ): void { if (!fs.existsSync(filePath)) { console.warn(`File not found for sed operation: ${filePath}`); return; } const content = fs.readFileSync(filePath, 'utf-8'); const newContent = content.replace(find, replace); fs.writeFileSync(filePath, newContent, 'utf-8'); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ctrlShiftBryan/chrome-devtools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server