bookmark-bridge 2.0.3 → 3.0.0

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
@@ -3,171 +3,67 @@
3
3
  An MCP client can read and reorganize your Chrome bookmarks through this.
4
4
  Every change lands in git first, so anything can be rolled back.
5
5
 
6
- ```
7
- MCP client --stdio--> bookmark-bridge --ws(127.0.0.1)-- Chrome extension --chrome.bookmarks--> Chrome
8
- ```
9
-
10
- The extension dials out rather than listening, because an extension cannot open
11
- a port. A second MCP process that finds the port taken joins the first as a peer
12
- and relays through it, so several sessions share one browser.
6
+ Chrome starts the Bridgey host through Native Messaging. An MCP client runs
7
+ the server over stdio, and the server talks to the host over an authenticated
8
+ loopback connection.
13
9
 
14
10
  ## Install
15
11
 
16
- The default package uses the existing WebSocket connection. For the opt-in
17
- Native Messaging release, see [Native Messaging](#native-messaging).
18
-
19
- **1. Register the server with your MCP client.** It downloads itself on first
20
- run, so you do not need Rust. macOS, Linux and Windows.
21
-
22
- <details open>
23
- <summary><b>Claude Code</b></summary>
24
-
25
- ```sh
26
- claude mcp add bookmark-bridge -- npx -y bookmark-bridge
27
- ```
28
-
29
- </details>
30
-
31
- <details>
32
- <summary><b>Codex</b> — <code>~/.codex/config.toml</code></summary>
33
-
34
- ```toml
35
- [mcp_servers.bookmark-bridge]
36
- command = "npx"
37
- args = ["-y", "bookmark-bridge"]
38
- ```
39
-
40
- </details>
41
-
42
- <details>
43
- <summary><b>Any other client</b> — the standard entry</summary>
44
-
45
- ```json
46
- {
47
- "mcpServers": {
48
- "bookmark-bridge": {
49
- "command": "npx",
50
- "args": ["-y", "bookmark-bridge"]
51
- }
52
- }
53
- }
54
- ```
55
-
56
- Put it wherever your client keeps its MCP servers.
57
-
58
- </details>
59
-
60
- <details>
61
- <summary><b>Or have your agent do it</b> — paste this</summary>
62
-
63
- ```
64
- Install the bookmark-bridge MCP server for me.
65
-
66
- 1. Register it with this client as an MCP server named "bookmark-bridge",
67
- running: npx -y bookmark-bridge
68
- Use whatever config file this client uses, and do not disturb the servers
69
- already there.
70
- 2. Restart or reload so the server is picked up, then call its bridge_status
71
- tool and tell me what it reports.
72
- 3. If it says the extension is not connected, tell me to install the Chrome
73
- extension from https://github.com/semanticist21/bookmark-bridge and then
74
- check again.
75
-
76
- Do not build from source; the npx package fetches a prebuilt binary.
77
- ```
78
-
79
- </details>
80
-
81
- Your client starts and stops it for you. Nothing to leave running. `git` must be
82
- on PATH — the snapshots are a real git repository.
83
-
84
- **2. Install the extension.** Get [Bridgey from the Chrome Web Store](https://chromewebstore.google.com/detail/ekokljgbbianihlpahackkfdendobngd)
85
- and leave its mode set to **Legacy (WebSocket)**. For the unpacked legacy
86
- extension, use `extension/` from the `v0.1.2` tag.
87
-
88
- That is all of it. The extension's popup goes green once the two find each other.
89
-
90
- The extension sleeps when you are not using it. Chrome ends an idle service
91
- worker, and this one is not woken on a timer — tidying bookmarks is occasional
92
- work, and polling a socket nobody is using is what Manifest V3 set out to stop.
93
- It wakes on its own when the browser starts, when a setting changes, when you
94
- touch a bookmark, and when you open its popup. If an agent reports that the
95
- extension is not connected, clicking the toolbar icon reconnects it.
96
-
97
- <details>
98
- <summary>Build the legacy server from source</summary>
99
-
100
- Use the `v0.1.2` tag for the legacy server.
101
-
102
- ```sh
103
- cd mcp && cargo build --release
104
- ```
105
-
106
- Then point the same config entry at the binary instead:
107
- `"command": "<repo>/mcp/target/release/bookmark-bridge"`, with no `args`.
108
-
109
- A source checkout also gets a shared token automatically: the server writes one
110
- to `~/.config/bookmark-bridge/token` and copies it into `extension/`, so both
111
- ends have it. A Web Store install is read-only and cannot receive one, so the
112
- server runs without a token there and relies on the loopback binding — a token
113
- only one side knows would reject the extension forever. Set
114
- `BOOKMARK_BRIDGE_TOKEN` to demand one regardless, and put the same value in the
115
- extension's storage. `BOOKMARK_BRIDGE_PORT` changes the port.
116
-
117
- </details>
118
-
119
- ## Native Messaging
120
-
121
- The v2 server is available on the npm `native` channel. The standard
122
- `bookmark-bridge` command still installs the legacy server.
123
-
124
- 1. Open `chrome://extensions` and check the Bridgey extension version. Native
125
- Messaging requires **2.0.0 or later**. If you have an older version, keep
126
- using the legacy MCP command or [load the unpacked extension](#unpacked-development-extension)
127
- before changing your MCP configuration.
128
- 2. In your MCP client, change the command arguments from `-y bookmark-bridge`
129
- to `-y bookmark-bridge@native`, then restart its MCP connection. With Claude
130
- Code, the command for a new entry is
131
- `claude mcp add bookmark-bridge -- npx -y bookmark-bridge@native`.
132
- 3. Open Bridgey's popup and choose **Native Messaging**. Approve Chrome's
133
- permission prompt. If setup fails, the extension stays in Legacy mode.
134
- Restore the legacy MCP command to reconnect.
135
- 4. Run `bridge_status` from your MCP client to confirm the connection.
136
-
137
- The Native npm package contains the prebuilt servers and their checksums.
138
- The first server startup installs the native host in a user data directory
139
- outside the npm cache and registers it with Chrome. Chrome launches that host
140
- when the extension connects. The host and the MCP process communicate over an
141
- authenticated loopback connection. Keep `git` on the MCP client's PATH. The
142
- server remembers its absolute path so the Chrome-launched host can use it.
143
-
144
- Bridgey serves one Native Messaging browser profile at a time. Each profile's
145
- v2 snapshots live under `native-v2/<profileId>` inside the existing history
146
- state directory. Legacy snapshots remain available in Legacy mode.
147
-
148
- To switch back, choose **Legacy (WebSocket)** if the popup shows a mode
149
- selector, restore the MCP command arguments to `-y bookmark-bridge`, and
150
- restart its MCP connection.
151
- Restarting Chrome or reconnecting the popup refreshes the browser connection.
152
- Restart the MCP connection after updating the server to refresh its tool list.
12
+ 1. Install [Bridgey from the Chrome Web Store](https://chromewebstore.google.com/detail/ekokljgbbianihlpahackkfdendobngd).
13
+ 2. Add the server to your MCP client. You need Node.js 18 or later and Git on
14
+ the client's PATH. The npm package includes verified binaries for macOS,
15
+ Linux and Windows.
16
+
17
+ **Claude Code**
18
+ ```sh
19
+ claude mcp add bookmark-bridge -- npx -y bookmark-bridge
20
+ ```
21
+
22
+ **Codex** (~/.codex/config.toml)
23
+ ```toml
24
+ [mcp_servers.bookmark-bridge]
25
+ command = "npx"
26
+ args = ["-y", "bookmark-bridge"]
27
+ ```
28
+
29
+ **Other MCP clients**
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "bookmark-bridge": {
34
+ "command": "npx",
35
+ "args": ["-y", "bookmark-bridge"]
36
+ }
37
+ }
38
+ }
39
+ ```
40
+ 3. Restart your MCP client so the server can register the host with Chrome.
41
+ Open the Bridgey popup and click **Reconnect**. When it shows
42
+ **Bridge Connected**, call `bridge_status` from your MCP client.
43
+
44
+ The first server startup installs the native host outside the npm cache and
45
+ registers it with Chrome. Bridgey connects one Chrome profile at a time. If
46
+ another profile is connected, turn Bridgey off in that profile first.
153
47
 
154
48
  ### Unpacked development extension
155
49
 
156
- At `chrome://extensions`, enable Developer mode and load the `extension/`
157
- directory from this repository at `v2.0.0` or later. Copy the unpacked
158
- extension's ID and run `npx -y bookmark-bridge@native register-native <extension-id>`
159
- before selecting Native Messaging. The host remembers this ID alongside the
160
- published one.
161
- On macOS and Linux, set `BOOKMARK_BRIDGE_CHROME_USER_DATA_DIR` to the absolute
162
- user data directory when registering for a Chrome test profile outside the
163
- default location.
50
+ In `chrome://extensions`, enable Developer mode and load the `extension/`
51
+ directory. Copy the extension ID and run
52
+ `npx -y bookmark-bridge register-native <extension-id>` before reconnecting.
53
+ For a non-default Chrome user data directory on macOS and Linux, set
54
+ `BOOKMARK_BRIDGE_CHROME_USER_DATA_DIR` to its absolute path when registering.
55
+
56
+ To run from source, build with `cargo build --release --locked --manifest-path mcp/Cargo.toml`
57
+ and point the MCP client at the resulting binary. The binary accepts the same
58
+ `register-native` command.
164
59
 
165
60
  ## Safety model
166
61
 
167
62
  Three mechanisms, in the order they engage.
168
63
 
169
- **Snapshots.** Every mutating call commits the whole tree to a git repository at
170
- `~/.local/state/bookmark-bridge/history`, before and after. A failed
64
+ **Snapshots.** Every mutating call commits the whole tree to a git repository under
65
+ `bookmark-bridge/native-v2/<profileId>/history` in the user state directory,
66
+ before and after. A failed
171
67
  before-snapshot refuses the change: a mutation nobody can undo is not worth
172
68
  making. `force: true` overrides that.
173
69
 
@@ -223,10 +119,9 @@ does not read your real Chrome bookmarks.
223
119
 
224
120
  ## Privacy
225
121
 
226
- The extension holds `bookmarks` and `storage`. Native Messaging also requires
227
- an optional permission and uses Chrome's extension allowlist. Legacy mode uses
228
- `127.0.0.1` and rejects handshakes carrying a web origin. Both transports keep
229
- bookmark data on this computer.
122
+ The extension uses Chrome's `bookmarks`, `storage` and `nativeMessaging`
123
+ permissions. Chrome restricts access to the host by extension ID. Bridgey
124
+ keeps bookmark data on this computer.
230
125
 
231
126
  ## License
232
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bookmark-bridge",
3
- "version": "2.0.3",
3
+ "version": "3.0.0",
4
4
  "description": "Chrome bookmarks as MCP tools, with every change recorded in git so it can be rolled back",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,10 +17,7 @@
17
17
  "README.md"
18
18
  ],
19
19
  "scripts": {
20
- "prepublishOnly": "node -e \"if (process.env.npm_config_tag !== 'native' || !require('fs').existsSync('release-assets/SHA256SUMS')) { console.error('Publish the bundled release with npm publish --tag native.'); process.exit(1); }\""
21
- },
22
- "publishConfig": {
23
- "tag": "native"
20
+ "prepublishOnly": "node -e \"if (!require('fs').existsSync('release-assets/SHA256SUMS')) { console.error('Bundle the release binaries before publishing.'); process.exit(1); }\""
24
21
  },
25
22
  "engines": {
26
23
  "node": ">=18"
@@ -1,5 +1,5 @@
1
- a55375e6a1e8fd9cfb4aaa595a594ae62d8e4c5047dccda59c9631a3a7a5b1fc bookmark-bridge-aarch64-apple-darwin.tar.gz
2
- ee37b2bf74d9670bef55b0464ce880272d63b76cafe16f501be4cd53fedb7b55 bookmark-bridge-aarch64-unknown-linux-gnu.tar.gz
3
- 944b198396dc0becdfe926e83f5f71130329eb2241e337b416bccf7b5be1251e bookmark-bridge-x86_64-apple-darwin.tar.gz
4
- 2df2e9704ba897d96f0b8466d1e20256ef3d30afe2a61103ec69339f6d6420a6 bookmark-bridge-x86_64-pc-windows-msvc.tar.gz
5
- 4fdd3d39d3560fad4749dbd9208698a39b3c8b6d232f4a9f2c91ab53175b6116 bookmark-bridge-x86_64-unknown-linux-gnu.tar.gz
1
+ 535fe1fbf39b9f8011a4c56f5e8e3f382e5b975c9f4312139dc4164b049bccb7 bookmark-bridge-aarch64-apple-darwin.tar.gz
2
+ 5b4bd7ffef2ee55e069e2501a8b1797831ecb491a3c561d9ac89e4d33886594b bookmark-bridge-aarch64-unknown-linux-gnu.tar.gz
3
+ 58cf6ed481022558fcdb69276a1b9e6dac6706ac48bfaf871b6dc1d4d2a725b5 bookmark-bridge-x86_64-apple-darwin.tar.gz
4
+ 9785fe84c1d77b9280f57d01c75c0620af450201ad3ddedb770a6e42456a4524 bookmark-bridge-x86_64-pc-windows-msvc.tar.gz
5
+ 80ab34e0d61236ba7d6de86a33a072de590167bbf4dc48c208879641d4060b1b bookmark-bridge-x86_64-unknown-linux-gnu.tar.gz