brave-real-browser-mcp-server 2.17.9 → 2.17.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import 'dotenv/config';
3
+ // CRITICAL: Redirect console.log to console.error to prevent stdout pollution
4
+ // Antigravity AI IDE and other MCP clients require stdout to be exclusively for JSON-RPC
5
+ const originalConsoleLog = console.log;
6
+ console.log = (...args) => {
7
+ console.error(...args);
8
+ };
3
9
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
4
10
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
11
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ListPromptsRequestSchema, InitializeRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "brave-real-browser-mcp-server",
3
- "version": "2.17.9",
3
+ "version": "2.17.10",
4
4
  "description": "Universal AI IDE MCP Server - Auto-detects and supports all AI IDEs (Claude Desktop, Cursor, Windsurf, Cline, Zed, VSCode, Qoder AI, etc.) with Brave browser automation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
8
- "preinstall": "npm view brave-real-puppeteer-core version > .latest-version 2>&1 || echo 'Version check skipped'",
8
+ "preinstall": "npm update && node scripts/check-version.js",
9
9
  "postinstall": "node scripts/patch-puppeteer-screen-recorder.cjs",
10
10
  "clean": "rimraf dist",
11
11
  "clean:cache": "npm cache clean --force",
@@ -0,0 +1,33 @@
1
+ import { exec } from 'child_process';
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import { fileURLToPath } from 'url';
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+
9
+ const packageName = 'brave-real-puppeteer-core';
10
+ const outputFile = path.join(process.cwd(), '.latest-version');
11
+
12
+ console.log(`Checking latest version for ${packageName}...`);
13
+
14
+ exec(`npm view ${packageName} version`, (error, stdout, stderr) => {
15
+ if (error) {
16
+ console.error(`Error checking version: ${error.message}`);
17
+ console.log('Version check skipped');
18
+ return;
19
+ }
20
+
21
+ const version = stdout.trim();
22
+ if (version) {
23
+ console.log(`Latest version found: ${version}`);
24
+ try {
25
+ fs.writeFileSync(outputFile, version);
26
+ console.log(`Saved to ${outputFile}`);
27
+ } catch (err) {
28
+ console.error(`Failed to write .latest-version: ${err.message}`);
29
+ }
30
+ } else {
31
+ console.log('Version check returned empty. Skipped.');
32
+ }
33
+ });