Stats
Actions
Tags
From oh-my-design
Runs a local headless browser instance for web scraping, screenshot capture, and DOM interaction. Uses a temporary profile directory.
Copy this JSON into your .mcp.json to enable this server
Add to your .mcp.json:
{
"mcpServers": {
"browser-rs": {
"command": "sh",
"args": [
"-c",
"export PATH=\"$HOME/.local/bin:$PATH\"\nif ! profile_dir=\"$(mktemp -d \"${TMPDIR:-/tmp}/omd-browser-rs.XXXXXX\")\"; then\n printf '%s\\n' 'browser-rs: unable to create temporary profile' >&2\n exit 1\nfi\nchild_pid=\"\"\ncleanup() {\n if [ -n \"$child_pid\" ]; then\n kill \"$child_pid\" 2>/dev/null || true\n wait \"$child_pid\" 2>/dev/null || true\n child_pid=\"\"\n fi\n rm -rf -- \"$profile_dir\"\n}\ntrap cleanup EXIT\ntrap 'exit 129' HUP\ntrap 'exit 130' INT\ntrap 'exit 143' TERM\nif [ -n \"${OMD_BROWSER_RS_BIN:-}\" ]; then\n browser_bin=$OMD_BROWSER_RS_BIN\nelif browser_on_path=\"$(command -v browser-rs 2>/dev/null)\"; then\n browser_bin=$browser_on_path\nelse\n browser_bin=\"${HOME:?HOME must be set}/.local/share/oh-my-design/browser-rs/v0.1.10/browser-rs\"\n if ! node -e \"const { createHash } = require(\\\"node:crypto\\\");const { readFileSync } = require(\\\"node:fs\\\");const { dirname, join } = require(\\\"node:path\\\");const schemaVersion = \\\"browser-rs-receipt-v1\\\";const version = \\\"v0.1.10\\\";const releases = [{\\\"platform\\\":\\\"darwin\\\",\\\"arch\\\":\\\"arm64\\\",\\\"asset\\\":\\\"browser-rs-macos-arm64\\\",\\\"sha256\\\":\\\"9a5895fc2f07b1010226d30f081d678fa2edcc15dd6f24cdf10074cfe1573749\\\"},{\\\"platform\\\":\\\"linux\\\",\\\"arch\\\":\\\"x64\\\",\\\"asset\\\":\\\"browser-rs-linux-x64\\\",\\\"sha256\\\":\\\"792ca76e5ce0423968763556e110900a3aa65737fc6227724914aa137e972589\\\"}];const target = process.argv[1];const release = releases.find((candidate) => candidate.platform === process.platform && candidate.arch === process.arch);const digest = (value) => createHash(\\\"sha256\\\").update(value).digest(\\\"hex\\\");if (target === undefined || release === undefined) process.exit(1);try {; const receiptBytes = readFileSync(join(dirname(target), \\\"receipt.json\\\")); const receipt = JSON.parse(receiptBytes.toString(\\\"utf8\\\")); const validRecord = typeof receipt === \\\"object\\\" && receipt !== null && !Array.isArray(receipt); const validReceipt = validRecord && Object.keys(receipt).sort().join(\\\",\\\") === \\\"asset,schemaVersion,sha256,version\\\" && receipt.schemaVersion === schemaVersion && receipt.version === version && receipt.asset === release.asset && receipt.sha256 === release.sha256; const expectedReceipt = Buffer.from(JSON.stringify({ schemaVersion, version, asset: release.asset, sha256: release.sha256 }) + \\\"\\\\n\\\"); if (!validReceipt || digest(receiptBytes) !== digest(expectedReceipt) || digest(readFileSync(target)) !== release.sha256) process.exit(1);} catch { process.exit(1) }\" \"$browser_bin\"; then\n printf '%s\\n' 'browser-rs: OMD-owned binary is missing or unverified' >&2\n exit 1\n fi\nfi\n\"$browser_bin\" --headless \"--user-data-dir=$profile_dir\" <&0 &\nchild_pid=$!\nif wait \"$child_pid\"; then\n status=0\nelse\n status=$?\nfi\nchild_pid=\"\"\nexit \"$status\""
]
}
}
}Server configuration and connection parameters
shCommand-line arguments passed to the server process
Declared capabilities of this MCP server
npx claudepluginhub 3x-haust/oh-my-design --plugin omd