watermarkbuster-mcp 1.0.1 → 1.1.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
@@ -1,13 +1,13 @@
1
1
  # Watermark Buster MCP
2
2
 
3
- Connect an MCP client to the hosted Watermark Buster tools. This package is a local stdio bridge. It does not run the cleaning engine on your computer.
3
+ Connect an MCP client to hosted or local Watermark Buster tools. The default mode is a stdio bridge to the hosted service. `--local` starts the separately installed local cleaning package.
4
4
 
5
5
  ## Requirements
6
6
 
7
7
  - Node.js 20 or newer
8
8
  - An internet connection to `https://watermarkbuster.com/mcp`
9
9
 
10
- No account, API token, GPU, Python, or local model is required.
10
+ No account, API token, GPU, Python, or local model is required for the default hosted mode.
11
11
 
12
12
  ## Run without installing
13
13
 
@@ -39,6 +39,28 @@ To add the package to one Node.js project instead, run:
39
39
  npm install watermarkbuster-mcp
40
40
  ```
41
41
 
42
+ ## Run all cleaning locally
43
+
44
+ Install the local Python package once:
45
+
46
+ ```bash
47
+ pipx install watermarkbuster-local
48
+ ```
49
+
50
+ Then use the npm launcher in local mode:
51
+
52
+ ```bash
53
+ npx -y watermarkbuster-mcp --local --root "$PWD"
54
+ ```
55
+
56
+ Or, after the global npm install:
57
+
58
+ ```bash
59
+ watermarkbuster-mcp --local --root "$PWD"
60
+ ```
61
+
62
+ `--root` limits agent file access to one folder. Add `--allow-network` only when the local agent must run the website sitemap audit.
63
+
42
64
  ## Add the npx bridge to an MCP client
43
65
 
44
66
  Set these values in your MCP client:
@@ -143,14 +165,18 @@ Example agent requests:
143
165
  - “Clean this file and return the cleaned copy.”
144
166
  - “Show the current Watermark Buster capabilities.”
145
167
 
168
+ Local mode exposes the larger local tool set: direct file paths, folder audit, opt-in website audit, local Ollama rewriting, and an adapter for the optional `noai-watermark` pixel tool. See the [local package guide](https://pypi.org/project/watermarkbuster-local/).
169
+
146
170
  ## Data flow
147
171
 
148
- Tool input is sent to `https://watermarkbuster.com` for processing. The hosted service processes content for the call and does not archive it. Do not use this npm bridge if content must stay on your computer.
172
+ In the default mode, tool input is sent to `https://watermarkbuster.com` for processing. In `--local` mode, normal cleaning stays on the computer. Optional website audit uses the network, and optional pixel cleaning can download model files.
149
173
 
150
174
  ## Connection errors
151
175
 
152
176
  If the hosted service cannot be reached, the command writes `Watermark Buster MCP: <reason>` to standard error and exits with a failure status. Check that `https://watermarkbuster.com/mcp` is reachable, then let the MCP client start the command again.
153
177
 
178
+ If local mode says that the local package is missing, run `pipx install watermarkbuster-local`, then start the command again.
179
+
154
180
  For more setup help, see [the full MCP guide](https://watermarkbuster.com/mcp).
155
181
 
156
182
  ## License
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "watermarkbuster-mcp",
3
- "version": "1.0.1",
4
- "description": "Connect local MCP clients to the hosted Watermark Buster tools.",
3
+ "version": "1.1.0",
4
+ "description": "Connect MCP clients to hosted or local Watermark Buster tools.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "watermarkbuster-mcp": "src/cli.js"
@@ -15,7 +15,7 @@
15
15
  "node": ">=20"
16
16
  },
17
17
  "scripts": {
18
- "check": "node --check src/cli.js && node --check src/server.js",
18
+ "check": "node --check src/cli.js && node --check src/local.js && node --check src/server.js",
19
19
  "test": "node --test"
20
20
  },
21
21
  "keywords": [
package/src/cli.js CHANGED
@@ -11,6 +11,36 @@ import {
11
11
  REMOTE_MCP_ENDPOINT,
12
12
  createBridgeServer,
13
13
  } from "./server.js";
14
+ import { startLocalServer } from "./local.js";
15
+
16
+ const HELP = `Watermark Buster MCP
17
+
18
+ Usage:
19
+ watermarkbuster-mcp Connect to the hosted MCP server
20
+ watermarkbuster-mcp --local Start the installed local MCP server
21
+
22
+ Local options:
23
+ --root <folder> Limit agent file access to this folder
24
+ --allow-network Let the local website audit access the network
25
+ -h, --help Show this help
26
+ `;
27
+
28
+ function parseArguments(argumentsList) {
29
+ const options = { local: false, root: null, allowNetwork: false, help: false };
30
+ for (let index = 0; index < argumentsList.length; index += 1) {
31
+ const argument = argumentsList[index];
32
+ if (argument === "--local") options.local = true;
33
+ else if (argument === "--allow-network") options.allowNetwork = true;
34
+ else if (argument === "--root") options.root = argumentsList[++index];
35
+ else if (argument === "--help" || argument === "-h") options.help = true;
36
+ else throw new Error(`unknown option: ${argument}`);
37
+ }
38
+ if (options.root === undefined) throw new Error("--root needs a folder");
39
+ if (!options.local && (options.root || options.allowNetwork)) {
40
+ throw new Error("--root and --allow-network need --local");
41
+ }
42
+ return options;
43
+ }
14
44
 
15
45
  function reportFailure(error) {
16
46
  const message = error instanceof Error ? error.message : String(error);
@@ -60,7 +90,27 @@ async function startBridge() {
60
90
  registerShutdown(stdioHandle, remoteClient);
61
91
  }
62
92
 
63
- startBridge().catch((error) => {
64
- reportFailure(error);
65
- process.exitCode = 1;
66
- });
93
+ function main() {
94
+ let options;
95
+ try {
96
+ options = parseArguments(process.argv.slice(2));
97
+ } catch (error) {
98
+ reportFailure(error);
99
+ process.exitCode = 2;
100
+ return;
101
+ }
102
+ if (options.help) {
103
+ process.stdout.write(HELP);
104
+ return;
105
+ }
106
+ if (options.local) {
107
+ startLocalServer(options);
108
+ return;
109
+ }
110
+ startBridge().catch((error) => {
111
+ reportFailure(error);
112
+ process.exitCode = 1;
113
+ });
114
+ }
115
+
116
+ main();
package/src/local.js ADDED
@@ -0,0 +1,30 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ export const LOCAL_EXECUTABLE = "watermarkbuster-local";
4
+
5
+ export function localArguments(options) {
6
+ const argumentsList = ["mcp"];
7
+ if (options.root) argumentsList.push("--root", options.root);
8
+ if (options.allowNetwork) argumentsList.push("--allow-network");
9
+ return argumentsList;
10
+ }
11
+
12
+ export function startLocalServer(options) {
13
+ const child = spawn(LOCAL_EXECUTABLE, localArguments(options), {
14
+ stdio: "inherit",
15
+ });
16
+ child.once("error", (error) => {
17
+ if (error.code === "ENOENT") {
18
+ console.error(
19
+ "Watermark Buster MCP: local package not found. Run: pipx install watermarkbuster-local",
20
+ );
21
+ } else {
22
+ console.error(`Watermark Buster MCP: ${error.message}`);
23
+ }
24
+ process.exitCode = 1;
25
+ });
26
+ child.once("exit", (code, signal) => {
27
+ if (signal) process.kill(process.pid, signal);
28
+ else process.exitCode = code ?? 1;
29
+ });
30
+ }