@icoretech/warden-mcp 0.2.3 → 0.2.4
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.
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export function registerTools(server, deps) {
|
|
4
4
|
const toolMeta = {};
|
|
5
|
+
const mutatingToolAnnotations = {
|
|
6
|
+
readOnlyHint: false,
|
|
7
|
+
destructiveHint: false,
|
|
8
|
+
};
|
|
9
|
+
const destructiveToolAnnotations = {
|
|
10
|
+
readOnlyHint: false,
|
|
11
|
+
destructiveHint: true,
|
|
12
|
+
};
|
|
5
13
|
const rawRegisterTool = server.registerTool.bind(server);
|
|
6
14
|
const legacyPrefix = `${deps.toolPrefix}.`;
|
|
7
15
|
const publicPrefix = `${deps.toolPrefix}${deps.toolSeparator}`;
|
|
@@ -244,6 +252,7 @@ export function registerTools(server, deps) {
|
|
|
244
252
|
registerTool(`${deps.toolPrefix}.create_folder`, {
|
|
245
253
|
title: 'Create Folder',
|
|
246
254
|
description: 'Create a Bitwarden folder (personal).',
|
|
255
|
+
annotations: mutatingToolAnnotations,
|
|
247
256
|
inputSchema: {
|
|
248
257
|
name: z.string(),
|
|
249
258
|
},
|
|
@@ -261,6 +270,7 @@ export function registerTools(server, deps) {
|
|
|
261
270
|
registerTool(`${deps.toolPrefix}.edit_folder`, {
|
|
262
271
|
title: 'Edit Folder',
|
|
263
272
|
description: 'Rename a Bitwarden folder (personal).',
|
|
273
|
+
annotations: mutatingToolAnnotations,
|
|
264
274
|
inputSchema: {
|
|
265
275
|
id: z.string(),
|
|
266
276
|
name: z.string(),
|
|
@@ -279,6 +289,7 @@ export function registerTools(server, deps) {
|
|
|
279
289
|
registerTool(`${deps.toolPrefix}.delete_folder`, {
|
|
280
290
|
title: 'Delete Folder',
|
|
281
291
|
description: 'Delete a Bitwarden folder (personal).',
|
|
292
|
+
annotations: destructiveToolAnnotations,
|
|
282
293
|
inputSchema: {
|
|
283
294
|
id: z.string(),
|
|
284
295
|
},
|
|
@@ -326,6 +337,7 @@ export function registerTools(server, deps) {
|
|
|
326
337
|
registerTool(`${deps.toolPrefix}.create_org_collection`, {
|
|
327
338
|
title: 'Create Org Collection',
|
|
328
339
|
description: 'Create an organization collection.',
|
|
340
|
+
annotations: mutatingToolAnnotations,
|
|
329
341
|
inputSchema: {
|
|
330
342
|
organizationId: z.string(),
|
|
331
343
|
name: z.string(),
|
|
@@ -344,6 +356,7 @@ export function registerTools(server, deps) {
|
|
|
344
356
|
registerTool(`${deps.toolPrefix}.edit_org_collection`, {
|
|
345
357
|
title: 'Edit Org Collection',
|
|
346
358
|
description: 'Rename an organization collection.',
|
|
359
|
+
annotations: mutatingToolAnnotations,
|
|
347
360
|
inputSchema: {
|
|
348
361
|
organizationId: z.string(),
|
|
349
362
|
id: z.string(),
|
|
@@ -363,6 +376,7 @@ export function registerTools(server, deps) {
|
|
|
363
376
|
registerTool(`${deps.toolPrefix}.delete_org_collection`, {
|
|
364
377
|
title: 'Delete Org Collection',
|
|
365
378
|
description: 'Delete an organization collection.',
|
|
379
|
+
annotations: destructiveToolAnnotations,
|
|
366
380
|
inputSchema: {
|
|
367
381
|
organizationId: z.string(),
|
|
368
382
|
id: z.string(),
|
|
@@ -381,6 +395,7 @@ export function registerTools(server, deps) {
|
|
|
381
395
|
registerTool(`${deps.toolPrefix}.move_item_to_organization`, {
|
|
382
396
|
title: 'Move Item To Organization',
|
|
383
397
|
description: 'Move an item to an organization (optionally assigning collection ids).',
|
|
398
|
+
annotations: mutatingToolAnnotations,
|
|
384
399
|
inputSchema: {
|
|
385
400
|
id: z.string(),
|
|
386
401
|
organizationId: z.string(),
|
|
@@ -617,6 +632,7 @@ export function registerTools(server, deps) {
|
|
|
617
632
|
registerTool(`${deps.toolPrefix}.delete_item`, {
|
|
618
633
|
title: 'Delete Item',
|
|
619
634
|
description: 'Delete an item by id (soft-delete by default; set permanent=true to hard delete).',
|
|
635
|
+
annotations: destructiveToolAnnotations,
|
|
620
636
|
inputSchema: {
|
|
621
637
|
id: z.string(),
|
|
622
638
|
permanent: z.boolean().optional(),
|
|
@@ -635,6 +651,7 @@ export function registerTools(server, deps) {
|
|
|
635
651
|
registerTool(`${deps.toolPrefix}.delete_items`, {
|
|
636
652
|
title: 'Delete Items',
|
|
637
653
|
description: 'Delete multiple items by id. Returns per-id results (soft-delete by default; set permanent=true to hard delete).',
|
|
654
|
+
annotations: destructiveToolAnnotations,
|
|
638
655
|
inputSchema: {
|
|
639
656
|
ids: z.array(z.string()).min(1).max(200),
|
|
640
657
|
permanent: z.boolean().optional(),
|
|
@@ -656,6 +673,7 @@ export function registerTools(server, deps) {
|
|
|
656
673
|
registerTool(`${deps.toolPrefix}.restore_item`, {
|
|
657
674
|
title: 'Restore Item',
|
|
658
675
|
description: 'Restore an item from trash by id.',
|
|
676
|
+
annotations: mutatingToolAnnotations,
|
|
659
677
|
inputSchema: {
|
|
660
678
|
id: z.string(),
|
|
661
679
|
},
|
|
@@ -673,6 +691,7 @@ export function registerTools(server, deps) {
|
|
|
673
691
|
registerTool(`${deps.toolPrefix}.create_attachment`, {
|
|
674
692
|
title: 'Create Attachment',
|
|
675
693
|
description: 'Attach a file (base64) to an existing item. Returns the updated (redacted) item.',
|
|
694
|
+
annotations: mutatingToolAnnotations,
|
|
676
695
|
inputSchema: {
|
|
677
696
|
itemId: z.string(),
|
|
678
697
|
filename: z.string(),
|
|
@@ -693,6 +712,7 @@ export function registerTools(server, deps) {
|
|
|
693
712
|
registerTool(`${deps.toolPrefix}.delete_attachment`, {
|
|
694
713
|
title: 'Delete Attachment',
|
|
695
714
|
description: 'Delete an attachment from an item. Returns the updated (redacted) item.',
|
|
715
|
+
annotations: destructiveToolAnnotations,
|
|
696
716
|
inputSchema: {
|
|
697
717
|
itemId: z.string(),
|
|
698
718
|
attachmentId: z.string(),
|
|
@@ -999,6 +1019,7 @@ export function registerTools(server, deps) {
|
|
|
999
1019
|
registerTool(`${deps.toolPrefix}.create_login`, {
|
|
1000
1020
|
title: 'Create Login',
|
|
1001
1021
|
description: 'Create a login item.',
|
|
1022
|
+
annotations: mutatingToolAnnotations,
|
|
1002
1023
|
inputSchema: {
|
|
1003
1024
|
name: z.string(),
|
|
1004
1025
|
username: z.string().optional(),
|
|
@@ -1046,6 +1067,7 @@ export function registerTools(server, deps) {
|
|
|
1046
1067
|
registerTool(`${deps.toolPrefix}.create_logins`, {
|
|
1047
1068
|
title: 'Create Logins',
|
|
1048
1069
|
description: 'Create multiple login items in a single call.',
|
|
1070
|
+
annotations: mutatingToolAnnotations,
|
|
1049
1071
|
inputSchema: {
|
|
1050
1072
|
items: z.array(z.object({
|
|
1051
1073
|
name: z.string(),
|
|
@@ -1101,6 +1123,7 @@ export function registerTools(server, deps) {
|
|
|
1101
1123
|
registerTool(`${deps.toolPrefix}.set_login_uris`, {
|
|
1102
1124
|
title: 'Set Login URIs',
|
|
1103
1125
|
description: 'Set or update the URIs (and per-URI match types) for a login item. mode=replace overwrites; mode=merge updates/adds by uri.',
|
|
1126
|
+
annotations: mutatingToolAnnotations,
|
|
1104
1127
|
inputSchema: {
|
|
1105
1128
|
id: z.string(),
|
|
1106
1129
|
mode: z.enum(['replace', 'merge']).optional(),
|
|
@@ -1129,6 +1152,7 @@ export function registerTools(server, deps) {
|
|
|
1129
1152
|
registerTool(`${deps.toolPrefix}.create_note`, {
|
|
1130
1153
|
title: 'Create Note',
|
|
1131
1154
|
description: 'Create a secure note item.',
|
|
1155
|
+
annotations: mutatingToolAnnotations,
|
|
1132
1156
|
inputSchema: {
|
|
1133
1157
|
name: z.string(),
|
|
1134
1158
|
notes: z.string().optional(),
|
|
@@ -1158,6 +1182,7 @@ export function registerTools(server, deps) {
|
|
|
1158
1182
|
registerTool(`${deps.toolPrefix}.create_ssh_key`, {
|
|
1159
1183
|
title: 'Create SSH Key',
|
|
1160
1184
|
description: 'Create an SSH key object (stored as secure note with fields).',
|
|
1185
|
+
annotations: mutatingToolAnnotations,
|
|
1161
1186
|
inputSchema: {
|
|
1162
1187
|
name: z.string(),
|
|
1163
1188
|
publicKey: z.string(),
|
|
@@ -1184,6 +1209,7 @@ export function registerTools(server, deps) {
|
|
|
1184
1209
|
registerTool(`${deps.toolPrefix}.create_card`, {
|
|
1185
1210
|
title: 'Create Card',
|
|
1186
1211
|
description: 'Create a payment card item.',
|
|
1212
|
+
annotations: mutatingToolAnnotations,
|
|
1187
1213
|
inputSchema: {
|
|
1188
1214
|
name: z.string(),
|
|
1189
1215
|
cardholderName: z.string().optional(),
|
|
@@ -1219,6 +1245,7 @@ export function registerTools(server, deps) {
|
|
|
1219
1245
|
registerTool(`${deps.toolPrefix}.create_identity`, {
|
|
1220
1246
|
title: 'Create Identity',
|
|
1221
1247
|
description: 'Create an identity item.',
|
|
1248
|
+
annotations: mutatingToolAnnotations,
|
|
1222
1249
|
inputSchema: {
|
|
1223
1250
|
name: z.string(),
|
|
1224
1251
|
identity: z
|
|
@@ -1270,6 +1297,7 @@ export function registerTools(server, deps) {
|
|
|
1270
1297
|
registerTool(`${deps.toolPrefix}.update_item`, {
|
|
1271
1298
|
title: 'Update Item',
|
|
1272
1299
|
description: 'Update selected fields of an item by id.',
|
|
1300
|
+
annotations: mutatingToolAnnotations,
|
|
1273
1301
|
inputSchema: {
|
|
1274
1302
|
id: z.string(),
|
|
1275
1303
|
patch: z.object({
|
package/dist/transports/http.js
CHANGED
|
@@ -8,6 +8,7 @@ import { bwEnvFromHeadersOrEnv } from '../bw/bwHeaders.js';
|
|
|
8
8
|
import { BwSessionPool } from '../bw/bwPool.js';
|
|
9
9
|
import { KeychainSdk } from '../sdk/keychainSdk.js';
|
|
10
10
|
import { registerTools } from '../tools/registerTools.js';
|
|
11
|
+
import { SERVER_VERSION } from '../version.js';
|
|
11
12
|
export function createKeychainApp(opts = {}) {
|
|
12
13
|
const parsePositiveInt = (raw, fallback) => {
|
|
13
14
|
const parsed = Number.parseInt(raw ?? '', 10);
|
|
@@ -44,7 +45,7 @@ export function createKeychainApp(opts = {}) {
|
|
|
44
45
|
`${process.env.HOME ?? '/data'}/bw-profiles`,
|
|
45
46
|
});
|
|
46
47
|
function createMcpServer() {
|
|
47
|
-
const server = new McpServer({ name: APP_NAME, version:
|
|
48
|
+
const server = new McpServer({ name: APP_NAME, version: SERVER_VERSION });
|
|
48
49
|
registerTools(server, {
|
|
49
50
|
getSdk: async (authInfo) => {
|
|
50
51
|
const extra = authInfo?.extra;
|
package/dist/transports/stdio.js
CHANGED
|
@@ -5,6 +5,7 @@ import { BwSessionPool } from '../bw/bwPool.js';
|
|
|
5
5
|
import { readBwEnv } from '../bw/bwSession.js';
|
|
6
6
|
import { KeychainSdk } from '../sdk/keychainSdk.js';
|
|
7
7
|
import { registerTools } from '../tools/registerTools.js';
|
|
8
|
+
import { SERVER_VERSION } from '../version.js';
|
|
8
9
|
export async function runStdioTransport() {
|
|
9
10
|
const TOOL_PREFIX = process.env.TOOL_PREFIX ?? 'keychain';
|
|
10
11
|
const TOOL_SEPARATOR = process.env.TOOL_SEPARATOR ?? '_';
|
|
@@ -15,7 +16,7 @@ export async function runStdioTransport() {
|
|
|
15
16
|
rootDir: process.env.KEYCHAIN_BW_HOME_ROOT ??
|
|
16
17
|
`${process.env.HOME ?? '/data'}/bw-profiles`,
|
|
17
18
|
});
|
|
18
|
-
const server = new McpServer({ name: APP_NAME, version:
|
|
19
|
+
const server = new McpServer({ name: APP_NAME, version: SERVER_VERSION });
|
|
19
20
|
registerTools(server, {
|
|
20
21
|
getSdk: async () => {
|
|
21
22
|
const bw = await pool.getOrCreate(bwEnv);
|
package/dist/version.js
ADDED
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.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Vaultwarden/Bitwarden MCP server backed by Bitwarden CLI (bw).",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"lint": "biome check --write --assist-enabled=true . && tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
49
49
|
"express": "^5.2.1",
|
|
50
50
|
"patch-package": "^8.0.1",
|
|
51
51
|
"zod": "^4.3.6"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@bitwarden/cli": "2026.2.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "^2.4.
|
|
57
|
+
"@biomejs/biome": "^2.4.9",
|
|
58
58
|
"@types/express": "^5.0.6",
|
|
59
59
|
"@types/node": "^25.5.0",
|
|
60
60
|
"playwright": "1.58.2",
|