@icoretech/warden-mcp 0.2.22 → 0.2.23
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 +2 -2
- package/dist/tools/registerTools.js +15 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -469,7 +469,7 @@ Credential resolution:
|
|
|
469
469
|
|
|
470
470
|
Mutation control:
|
|
471
471
|
|
|
472
|
-
- Set `READONLY=true` to
|
|
472
|
+
- Set `READONLY=true` to hide mutating tools from the advertised MCP catalog and reject direct write calls (create/edit/delete/move/restore/attachments).
|
|
473
473
|
- Set `NOREVEAL=true` to force all `reveal` parameters to `false` server-side. Clients can still request `reveal: true`, but the server will silently downgrade to redacted output. This prevents prompt injection from tricking an LLM agent into exfiltrating secrets.
|
|
474
474
|
- Set `KEYCHAIN_TEXT_COMPAT_MODE=structured_json` to mirror supported structured tool results into `TextContent` as serialized JSON. This is useful for text-only MCP clients that ignore `structuredContent`, but it also duplicates revealed secrets into the plain-text transcript.
|
|
475
475
|
- Tool names default to `keychain_*`. Override `TOOL_PREFIX` to change the namespace and `TOOL_SEPARATOR` to change the separator (default `_`, set `.` for legacy clients).
|
|
@@ -508,7 +508,7 @@ If you run `warden-mcp` beyond local development, review these items:
|
|
|
508
508
|
|
|
509
509
|
3. **Do not enable `KEYCHAIN_ALLOW_ENV_FALLBACK` on shared networks.** This flag makes the server's own vault credentials available to any HTTP client that omits headers. Only use it in single-tenant setups where the network is fully trusted.
|
|
510
510
|
|
|
511
|
-
4. **Enable `READONLY=true` when writes are not needed.** This
|
|
511
|
+
4. **Enable `READONLY=true` when writes are not needed.** This hides mutating tools from the advertised MCP catalog and rejects direct write calls at the MCP layer, limiting blast radius if an agent or client is compromised.
|
|
512
512
|
|
|
513
513
|
5. **Restrict filesystem access to `/data/bw-profiles`.** The `bw` CLI stores decrypted state under its HOME directory. Ensure the profile directory is not world-readable and is mounted with appropriate permissions (the Docker image runs as non-root by default).
|
|
514
514
|
|
|
@@ -18,8 +18,23 @@ export function registerTools(server, deps) {
|
|
|
18
18
|
const publicName = name.startsWith(legacyPrefix)
|
|
19
19
|
? `${publicPrefix}${name.slice(legacyPrefix.length)}`
|
|
20
20
|
: name;
|
|
21
|
+
if (isReadOnly && isMutatingToolRegistration(args)) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
21
24
|
return rawRegisterTool(publicName, ...args);
|
|
22
25
|
});
|
|
26
|
+
function isRecord(value) {
|
|
27
|
+
return typeof value === 'object' && value !== null;
|
|
28
|
+
}
|
|
29
|
+
function isMutatingToolRegistration(args) {
|
|
30
|
+
const options = args[0];
|
|
31
|
+
if (!isRecord(options))
|
|
32
|
+
return false;
|
|
33
|
+
const annotations = options.annotations;
|
|
34
|
+
if (!isRecord(annotations))
|
|
35
|
+
return false;
|
|
36
|
+
return annotations.readOnlyHint === false;
|
|
37
|
+
}
|
|
23
38
|
function parseBoolEnv(...names) {
|
|
24
39
|
for (const name of names) {
|
|
25
40
|
const v = process.env[name];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@icoretech/warden-mcp",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.23",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Vaultwarden/Bitwarden MCP server backed by Bitwarden CLI (bw).",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@biomejs/biome": "^2.4.16",
|
|
56
56
|
"@types/express": "^5.0.6",
|
|
57
|
-
"@types/node": "^25.9.
|
|
57
|
+
"@types/node": "^25.9.2",
|
|
58
58
|
"playwright": "1.60.0",
|
|
59
59
|
"tsx": "^4.22.4",
|
|
60
60
|
"typescript": "^6.0.3"
|