@principlebreach/scopedown-mcp 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -6,8 +6,8 @@ Your session never leaves the browser. The agent talks to this server, the serve
6
6
 
7
7
  ## Set up
8
8
 
9
- 1. Install the ScopeDown extension and sign in to HackerOne or Bugcrowd in that browser.
10
- 2. Register the bridge with your browsers:
9
+ 1. Install the [ScopeDown extension](https://github.com/PrincipleBreach/scopedown#install) and sign in to HackerOne or Bugcrowd in that browser.
10
+ 2. Register the bridge with your browsers. Each browser must have been opened at least once.
11
11
 
12
12
  ```sh
13
13
  npx @principlebreach/scopedown-mcp install
@@ -22,7 +22,7 @@ Your session never leaves the browser. The agent talks to this server, the serve
22
22
 
23
23
  Any other MCP client: run `npx -y @principlebreach/scopedown-mcp` as a stdio server.
24
24
 
25
- `scopedown-mcp doctor` shows which browsers are registered and connected. `scopedown-mcp uninstall` removes everything it installed.
25
+ `npx @principlebreach/scopedown-mcp doctor` shows which browsers are registered and connected, `uninstall` removes everything it installed, and `--version` prints the version.
26
26
 
27
27
  ## Tools
28
28
 
@@ -54,11 +54,11 @@ Every operation is listed in the extension's activity log.
54
54
 
55
55
  ## Requirements
56
56
 
57
- Node 20 or later. Tested with Chrome and Brave on macOS. Edge, Arc, Chromium, Vivaldi and Firefox registration, and Linux and Windows installs, are implemented but not yet tested.
57
+ Node 22 or later. Tested with Chrome and Brave on macOS. Edge, Arc, Chromium, Vivaldi and Firefox registration, and Linux and Windows installs, are implemented but not yet tested.
58
58
 
59
59
  ## License
60
60
 
61
- MIT. See [LICENSE](LICENSE).
61
+ MIT. See [LICENSE](LICENSE). Source, issues and the security policy: [github.com/PrincipleBreach/scopedown](https://github.com/PrincipleBreach/scopedown).
62
62
 
63
63
  ---
64
64
 
@@ -2,14 +2,17 @@
2
2
  // scopedown-mcp: the MCP server (default), the native messaging host the browser starts,
3
3
  // and the commands that install and check both.
4
4
 
5
+ import { VERSION } from '../src/version.js';
6
+
5
7
  const [command = 'serve', ...rest] = process.argv.slice(2);
6
8
 
7
- const usage = `scopedown-mcp, the ScopeDown agent bridge by Principle Breach
9
+ const usage = `scopedown-mcp ${VERSION}, the ScopeDown agent bridge by Principle Breach
8
10
 
9
11
  scopedown-mcp Run the MCP server on stdio (what your agent harness starts)
10
12
  scopedown-mcp install Register the bridge with your installed browsers
11
13
  scopedown-mcp uninstall Remove it again
12
14
  scopedown-mcp doctor Show what is installed and which browsers are connected
15
+ scopedown-mcp --version Print the version
13
16
 
14
17
  Install options:
15
18
  --browser <name> Only this browser (chrome, brave, edge, arc, chromium, vivaldi, firefox)
@@ -43,12 +46,12 @@ switch (command) {
43
46
  const extensionIds = option('--extension-id') ? [option('--extension-id')] : [];
44
47
  const out = install({ only, extensionIds });
45
48
  if (!out.installed.length) {
46
- console.log('No supported browser profile was found. Install Chrome, Brave, Edge, Arc, Chromium, Vivaldi or Firefox first.');
49
+ console.log('No browser profile was found. Open Chrome, Brave, Edge, Arc, Chromium, Vivaldi or Firefox once, then run install again.');
47
50
  process.exitCode = 1;
48
51
  break;
49
52
  }
50
53
  for (const i of out.installed) console.log(`Registered with ${i.browser}: ${i.manifest}`);
51
- console.log(`\nNext:\n 1. In the browser, click the ScopeDown icon and turn on Agent access.\n 2. Add the server to your harness, for example:\n claude mcp add scopedown -- npx -y @principlebreach/scopedown-mcp`);
54
+ console.log(`\nNext:\n 1. In the browser, click the ScopeDown icon and switch Agents on.\n 2. Add the server to your harness, for example:\n claude mcp add scopedown -- npx -y @principlebreach/scopedown-mcp`);
52
55
  break;
53
56
  }
54
57
  case 'uninstall': {
@@ -68,6 +71,11 @@ switch (command) {
68
71
  case '-h':
69
72
  console.log(usage);
70
73
  break;
74
+ case 'version':
75
+ case '--version':
76
+ case '-v':
77
+ console.log(VERSION);
78
+ break;
71
79
  default:
72
80
  // Firefox starts native hosts with the manifest path as the first argument.
73
81
  if (/\.json$/i.test(command) || command.startsWith('chrome-extension://')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principlebreach/scopedown-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server that gives AI agents your HackerOne and Bugcrowd access through the ScopeDown browser extension.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -33,7 +33,7 @@
33
33
  "LICENSE"
34
34
  ],
35
35
  "engines": {
36
- "node": ">=20"
36
+ "node": ">=22"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
package/src/client.js CHANGED
@@ -108,7 +108,7 @@ export class Bridge {
108
108
  async pick(browser) {
109
109
  const all = await this.browsers();
110
110
  if (!all.length) {
111
- throw new BridgeError('no_browser', 'No browser is connected. Open the browser where you use HackerOne or Bugcrowd, click the ScopeDown icon, and turn on Agent access.');
111
+ throw new BridgeError('no_browser', 'No browser is connected. Open the browser where you use HackerOne or Bugcrowd, click the ScopeDown icon, and switch Agents on.');
112
112
  }
113
113
  if (!browser) return all[0];
114
114
  const want = browser.toLowerCase();
package/src/install.js CHANGED
@@ -7,6 +7,7 @@ import { join, dirname } from 'node:path';
7
7
  import { execFileSync } from 'node:child_process';
8
8
  import { fileURLToPath } from 'node:url';
9
9
  import { HOST_NAME, CHROMIUM_EXTENSION_IDS, FIREFOX_EXTENSION_IDS, binDir, scopedownHome, socketsDir } from './paths.js';
10
+ import { VERSION } from './version.js';
10
11
 
11
12
  const PACKAGE = join(dirname(fileURLToPath(import.meta.url)), '..');
12
13
 
@@ -16,7 +17,7 @@ function copyApp() {
16
17
  const app = join(scopedownHome(), 'app');
17
18
  rmSync(app, { recursive: true, force: true });
18
19
  for (const dir of ['bin', 'src']) cpSync(join(PACKAGE, dir), join(app, dir), { recursive: true });
19
- writeFileSync(join(app, 'package.json'), '{ "type": "module" }\n');
20
+ writeFileSync(join(app, 'package.json'), `${JSON.stringify({ type: 'module', version: VERSION })}\n`);
20
21
  return join(app, 'bin', 'scopedown-mcp.js');
21
22
  }
22
23
 
@@ -34,7 +35,8 @@ function nodePath() {
34
35
  }
35
36
 
36
37
  // Per-user NativeMessagingHosts folders. Only browsers whose profile folder exists get a manifest.
37
- function targets(home = homedir()) {
38
+ function targets(given) {
39
+ const home = given || homedir();
38
40
  const os = platform();
39
41
  if (os === 'darwin') {
40
42
  const lib = join(home, 'Library', 'Application Support');
@@ -50,7 +52,8 @@ function targets(home = homedir()) {
50
52
  ].map(([name, root, kind]) => ({ name, root, kind, dir: join(root, kind === 'firefox' ? 'NativeMessagingHosts' : 'NativeMessagingHosts') }));
51
53
  }
52
54
  if (os === 'linux') {
53
- const cfg = process.env.XDG_CONFIG_HOME || join(home, '.config');
55
+ // XDG_CONFIG_HOME belongs to the real home, so a home passed in (tests) keeps its own .config.
56
+ const cfg = (!given && process.env.XDG_CONFIG_HOME) || join(home, '.config');
54
57
  return [
55
58
  ['Chrome', join(cfg, 'google-chrome'), 'chromium'],
56
59
  ['Chromium', join(cfg, 'chromium'), 'chromium'],
package/src/server.js CHANGED
@@ -6,8 +6,9 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
6
6
  import { z } from 'zod';
7
7
  import { Bridge, BridgeError } from './client.js';
8
8
  import { readEvidence, FileRefused } from './files.js';
9
+ import { VERSION } from './version.js';
9
10
 
10
- export const VERSION = '1.0.0';
11
+ export { VERSION };
11
12
 
12
13
  const INSTRUCTIONS = `ScopeDown connects you to the HackerOne and Bugcrowd programs the user can access, through the user's own logged-in browser.
13
14
 
package/src/version.js ADDED
@@ -0,0 +1,5 @@
1
+ // The package version, read from package.json so the CLI, the MCP handshake and npm agree.
2
+
3
+ import { readFileSync } from 'node:fs';
4
+
5
+ export const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;