watermarkbuster-mcp 1.0.0 → 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 +132 -17
- package/package.json +3 -3
- package/src/cli.js +54 -4
- package/src/local.js +30 -0
package/README.md
CHANGED
|
@@ -1,15 +1,67 @@
|
|
|
1
1
|
# Watermark Buster MCP
|
|
2
2
|
|
|
3
|
-
Connect
|
|
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
|
+
|
|
14
|
+
Use `npx` to download and start the current package:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx -y watermarkbuster-mcp
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The command waits for MCP messages on standard input. It does not open a user interface or show a prompt. Normally, your MCP client starts this command for you.
|
|
21
|
+
|
|
22
|
+
## Install the command
|
|
23
|
+
|
|
24
|
+
Install the command on your computer:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install --global watermarkbuster-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Your MCP client can then start:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
watermarkbuster-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To add the package to one Node.js project instead, run:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install watermarkbuster-mcp
|
|
40
|
+
```
|
|
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
|
+
|
|
64
|
+
## Add the npx bridge to an MCP client
|
|
13
65
|
|
|
14
66
|
Set these values in your MCP client:
|
|
15
67
|
|
|
@@ -18,7 +70,7 @@ Command: npx
|
|
|
18
70
|
Arguments: -y watermarkbuster-mcp
|
|
19
71
|
```
|
|
20
72
|
|
|
21
|
-
|
|
73
|
+
Clients that use an `mcpServers` JSON object commonly use this form:
|
|
22
74
|
|
|
23
75
|
```json
|
|
24
76
|
{
|
|
@@ -31,39 +83,102 @@ For clients that use an `mcpServers` JSON object, the matching form is:
|
|
|
31
83
|
}
|
|
32
84
|
```
|
|
33
85
|
|
|
34
|
-
|
|
86
|
+
## Connect directly to the remote server
|
|
87
|
+
|
|
88
|
+
Clients that support remote Streamable HTTP MCP do not need this npm bridge. Connect them directly to:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
https://watermarkbuster.com/mcp
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Codex
|
|
35
95
|
|
|
36
|
-
|
|
96
|
+
Add this to `~/.codex/config.toml`:
|
|
97
|
+
|
|
98
|
+
```toml
|
|
99
|
+
[mcp_servers.watermark_buster]
|
|
100
|
+
url = "https://watermarkbuster.com/mcp"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Restart Codex, then run `codex mcp list` or use `/mcp` inside Codex.
|
|
104
|
+
|
|
105
|
+
### Claude Code
|
|
37
106
|
|
|
38
107
|
```bash
|
|
39
|
-
|
|
108
|
+
claude mcp add --transport http watermark-buster https://watermarkbuster.com/mcp
|
|
40
109
|
```
|
|
41
110
|
|
|
42
|
-
|
|
111
|
+
Run `claude mcp list` or use `/mcp` inside Claude Code.
|
|
43
112
|
|
|
44
|
-
|
|
45
|
-
|
|
113
|
+
### Gemini CLI
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
gemini mcp add --transport http watermark-buster https://watermarkbuster.com/mcp
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run `gemini mcp list` to confirm the connection.
|
|
120
|
+
|
|
121
|
+
### Cursor
|
|
122
|
+
|
|
123
|
+
Add this to `.cursor/mcp.json` for one project or `~/.cursor/mcp.json` for all projects:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"mcpServers": {
|
|
128
|
+
"watermark-buster": {
|
|
129
|
+
"url": "https://watermarkbuster.com/mcp"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Open Cursor's Customize sidebar, select MCP, and confirm that the server is enabled.
|
|
136
|
+
|
|
137
|
+
### Google Antigravity
|
|
138
|
+
|
|
139
|
+
Add this to `~/.gemini/config/mcp_config.json` for all workspaces or `.agents/mcp_config.json` for one workspace:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"watermark-buster": {
|
|
145
|
+
"serverUrl": "https://watermarkbuster.com/mcp"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
46
149
|
```
|
|
47
150
|
|
|
151
|
+
Save the file, then refresh Installed MCP Servers.
|
|
152
|
+
|
|
48
153
|
## Tools
|
|
49
154
|
|
|
50
155
|
The bridge reads the current tool list from the hosted MCP server when it starts. The current tools are:
|
|
51
156
|
|
|
52
|
-
- `inspect_text`
|
|
53
|
-
- `clean_text`
|
|
54
|
-
- `clean_file`
|
|
55
|
-
- `get_capabilities`
|
|
157
|
+
- `inspect_text` — report supported hidden Unicode without changing the text
|
|
158
|
+
- `clean_text` — remove supported hidden Unicode and exotic spaces
|
|
159
|
+
- `clean_file` — clean a supported file and return the cleaned copy
|
|
160
|
+
- `get_capabilities` — read the current formats, limits, and behavior
|
|
56
161
|
|
|
57
|
-
|
|
162
|
+
Example agent requests:
|
|
58
163
|
|
|
59
|
-
|
|
164
|
+
- “Inspect this text for hidden Unicode.”
|
|
165
|
+
- “Clean this file and return the cleaned copy.”
|
|
166
|
+
- “Show the current Watermark Buster capabilities.”
|
|
60
167
|
|
|
61
|
-
|
|
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
|
+
|
|
170
|
+
## Data flow
|
|
171
|
+
|
|
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.
|
|
62
173
|
|
|
63
174
|
## Connection errors
|
|
64
175
|
|
|
65
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.
|
|
66
177
|
|
|
178
|
+
If local mode says that the local package is missing, run `pipx install watermarkbuster-local`, then start the command again.
|
|
179
|
+
|
|
180
|
+
For more setup help, see [the full MCP guide](https://watermarkbuster.com/mcp).
|
|
181
|
+
|
|
67
182
|
## License
|
|
68
183
|
|
|
69
184
|
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watermarkbuster-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Connect
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
+
}
|