@bitwarden/mcp-server 2025.8.2 → 2025.10.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.
Files changed (58) hide show
  1. package/README.md +102 -8
  2. package/dist/handlers/api.d.ts +186 -0
  3. package/dist/handlers/api.d.ts.map +1 -0
  4. package/dist/handlers/api.js +181 -0
  5. package/dist/handlers/api.js.map +1 -0
  6. package/dist/handlers/cli.d.ts +74 -0
  7. package/dist/handlers/cli.d.ts.map +1 -0
  8. package/dist/handlers/cli.js +198 -0
  9. package/dist/handlers/cli.js.map +1 -0
  10. package/dist/index.d.ts +8 -62
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +102 -1040
  13. package/dist/index.js.map +1 -1
  14. package/dist/schemas/api.d.ts +177 -0
  15. package/dist/schemas/api.d.ts.map +1 -0
  16. package/dist/schemas/api.js +250 -0
  17. package/dist/schemas/api.js.map +1 -0
  18. package/dist/schemas/cli.d.ts +124 -0
  19. package/dist/schemas/cli.d.ts.map +1 -0
  20. package/dist/schemas/cli.js +209 -0
  21. package/dist/schemas/cli.js.map +1 -0
  22. package/dist/tools/api.d.ts +64 -0
  23. package/dist/tools/api.d.ts.map +1 -0
  24. package/dist/tools/api.js +767 -0
  25. package/dist/tools/api.js.map +1 -0
  26. package/dist/tools/cli.d.ts +48 -0
  27. package/dist/tools/cli.d.ts.map +1 -0
  28. package/dist/tools/cli.js +311 -0
  29. package/dist/tools/cli.js.map +1 -0
  30. package/dist/tools/index.d.ts +6 -0
  31. package/dist/tools/index.d.ts.map +1 -0
  32. package/dist/tools/index.js +22 -0
  33. package/dist/tools/index.js.map +1 -0
  34. package/dist/utils/api.d.ts +18 -0
  35. package/dist/utils/api.d.ts.map +1 -0
  36. package/dist/utils/api.js +114 -0
  37. package/dist/utils/api.js.map +1 -0
  38. package/dist/utils/cli.d.ts +9 -0
  39. package/dist/utils/cli.d.ts.map +1 -0
  40. package/dist/utils/cli.js +37 -0
  41. package/dist/utils/cli.js.map +1 -0
  42. package/dist/utils/config.d.ts +8 -0
  43. package/dist/utils/config.d.ts.map +1 -0
  44. package/dist/utils/config.js +9 -0
  45. package/dist/utils/config.js.map +1 -0
  46. package/dist/utils/security.d.ts +28 -0
  47. package/dist/utils/security.d.ts.map +1 -0
  48. package/dist/utils/security.js +134 -0
  49. package/dist/utils/security.js.map +1 -0
  50. package/dist/utils/types.d.ts +38 -0
  51. package/dist/utils/types.d.ts.map +1 -0
  52. package/dist/utils/types.js +5 -0
  53. package/dist/utils/types.js.map +1 -0
  54. package/dist/utils/validation.d.ts +29 -0
  55. package/dist/utils/validation.d.ts.map +1 -0
  56. package/dist/utils/validation.js +51 -0
  57. package/dist/utils/validation.js.map +1 -0
  58. package/package.json +2 -2
package/README.md CHANGED
@@ -5,8 +5,8 @@ Model Context Protocol (MCP) server that enables interaction with the Bitwarden
5
5
  ## Prerequisites
6
6
 
7
7
  - Node.js 22
8
- - Bitwarden CLI (`bw`) installed and authenticated
9
- - Valid Bitwarden session token
8
+ - **For CLI operations**: Bitwarden CLI (`bw`) installed, authenticated, and valid session token
9
+ - **For API operations**: Bitwarden organization with API access and valid client credentials
10
10
 
11
11
  ## Installation
12
12
 
@@ -36,6 +36,10 @@ npm run build
36
36
 
37
37
  ## Setup
38
38
 
39
+ The server supports two authentication methods:
40
+
41
+ ### Option A: CLI Authentication (for personal vault operations)
42
+
39
43
  1. **Install Bitwarden CLI**:
40
44
 
41
45
  ```bash
@@ -53,6 +57,25 @@ npm run build
53
57
  export BW_SESSION=$(bw unlock --raw)
54
58
  ```
55
59
 
60
+ ### Option B: API Authentication (for organization management)
61
+
62
+ 1. **Create API credentials** in your Bitwarden organization settings
63
+
64
+ 2. **Set environment variables**:
65
+
66
+ ```bash
67
+ export BW_CLIENT_ID="your_client_id"
68
+ export BW_CLIENT_SECRET="your_client_secret"
69
+ ```
70
+
71
+ 3. **Optional: Set custom API URLs** (if using self-hosted):
72
+ ```bash
73
+ export BW_API_BASE_URL="https://api.bitwarden.com"
74
+ export BW_IDENTITY_URL="https://identity.bitwarden.com"
75
+ ```
76
+
77
+ > **Note**: You can use both authentication methods simultaneously for full functionality.
78
+
56
79
  ## Testing
57
80
 
58
81
  ### Running unit tests
@@ -95,7 +118,9 @@ This will:
95
118
 
96
119
  ### Available tools
97
120
 
98
- The server provides the following Bitwarden CLI tools:
121
+ The server provides comprehensive Bitwarden functionality through two categories of tools:
122
+
123
+ #### Personal Vault Tools (CLI Authentication)
99
124
 
100
125
  | Tool | Description | Required Parameters |
101
126
  | ---------- | ---------------------------- | ------------------------------------------------- |
@@ -110,6 +135,64 @@ The server provides the following Bitwarden CLI tools:
110
135
  | `edit` | Edit existing item or folder | `objectType`, `id`, optional fields to update |
111
136
  | `delete` | Delete vault item/folder | `object`, `id`, optional `permanent` |
112
137
 
138
+ #### Organization Management Tools (API Authentication)
139
+
140
+ ##### Collections Management
141
+
142
+ | Tool | Description | Required Parameters |
143
+ | ----------------------- | ----------------------------- | ------------------- |
144
+ | `list_org_collections` | List organization collections | None |
145
+ | `get_org_collection` | Get collection details | `id` |
146
+ | `update_org_collection` | Update existing collection | `id` |
147
+ | `delete_org_collection` | Delete collection | `id` |
148
+
149
+ ##### Members Management
150
+
151
+ | Tool | Description | Required Parameters |
152
+ | -------------------------- | --------------------------------- | ------------------- |
153
+ | `list_org_members` | List organization members | None |
154
+ | `get_org_member` | Get member details | `id` |
155
+ | `invite_org_member` | Invite new member | `email`, `type` |
156
+ | `update_org_member` | Update existing member | `id` |
157
+ | `remove_org_member` | Remove member from organization | `id` |
158
+ | `reinvite_org_member` | Re-invite member | `id` |
159
+ | `get_org_member_groups` | Get member's group assignments | `id` |
160
+ | `update_org_member_groups` | Update member's group assignments | `id`, `groupIds` |
161
+
162
+ ##### Groups Management
163
+
164
+ | Tool | Description | Required Parameters |
165
+ | -------------------------- | --------------------------------- | ------------------- |
166
+ | `list_org_groups` | List organization groups | None |
167
+ | `get_org_group` | Get group details | `id` |
168
+ | `create_org_group` | Create new group | `name` |
169
+ | `update_org_group` | Update existing group | `id`, `name` |
170
+ | `delete_org_group` | Delete group | `id` |
171
+ | `get_org_group_members` | Get group's member assignments | `id` |
172
+ | `update_org_group_members` | Update group's member assignments | `id`, `memberIds` |
173
+
174
+ ##### Policies Management
175
+
176
+ | Tool | Description | Required Parameters |
177
+ | ------------------- | -------------------------- | ------------------- |
178
+ | `list_org_policies` | List organization policies | None |
179
+ | `get_org_policy` | Get policy details | `type` |
180
+ | `update_org_policy` | Update organization policy | `type`, `enabled` |
181
+
182
+ ##### Organization Management
183
+
184
+ | Tool | Description | Required Parameters |
185
+ | ----------------------------- | ---------------------------- | ------------------- |
186
+ | `get_org_subscription` | Get subscription details | None |
187
+ | `update_org_subscription` | Update subscription settings | None |
188
+ | `import_org_users_and_groups` | Import members and groups | None |
189
+
190
+ ##### Events and Auditing
191
+
192
+ | Tool | Description | Required Parameters |
193
+ | ---------------- | --------------------------- | ------------------- |
194
+ | `get_org_events` | Get organization audit logs | None |
195
+
113
196
  ### Manual testing
114
197
 
115
198
  1. **Start the server**:
@@ -143,10 +226,12 @@ The server provides the following Bitwarden CLI tools:
143
226
 
144
227
  ## Security considerations
145
228
 
146
- - **Never commit** the `BW_SESSION` token
147
- - **Use environment variables** for sensitive configuration
229
+ - **Never commit** sensitive credentials (`BW_SESSION`, `BW_CLIENT_ID`, `BW_CLIENT_SECRET`)
230
+ - **Use environment variables** for all sensitive configuration
148
231
  - **Validate all inputs** using Zod schemas (already implemented)
149
232
  - **Test with non-production data** when possible
233
+ - **Monitor API usage** through your organization's audit logs
234
+ - **Use HTTPS** for all API communications (default)
150
235
  - Understand the security and privacy impacts of exposing sensitive vault data to LLM and AI tools. Using a self-hosted or local LLM may be appropriate, for example.
151
236
 
152
237
  ## Troubleshooting
@@ -156,15 +241,24 @@ The server provides the following Bitwarden CLI tools:
156
241
  1. **"Please set the BW_SESSION environment variable"**
157
242
  - Run: `export BW_SESSION=$(bw unlock --raw)`
158
243
 
159
- 2. **Tests failing with environment errors**
244
+ 2. **"BW_CLIENT_ID and BW_CLIENT_SECRET environment variables are required"**
245
+ - Set your API credentials: `export BW_CLIENT_ID="your_id"` and `export BW_CLIENT_SECRET="your_secret"`
246
+ - Verify credentials are valid in your Bitwarden organization settings
247
+
248
+ 3. **API authentication failures**
249
+ - Check that your organization has API access enabled
250
+ - Verify client credentials have appropriate permissions
251
+ - Ensure you're using the correct API URLs for your instance
252
+
253
+ 4. **Tests failing with environment errors**
160
254
  - Use the environment mocking helpers in tests
161
255
  - Ensure test cleanup with `restoreEnvVars()`
162
256
 
163
- 3. **Inspector not starting**
257
+ 5. **Inspector not starting**
164
258
  - Check that the server builds successfully: `npm run build`
165
259
  - Verify Node.js version is 22
166
260
 
167
- 4. **CLI commands failing**
261
+ 6. **CLI commands failing**
168
262
  - Verify Bitwarden CLI is installed: `bw --version`
169
263
  - Check vault is unlocked: `bw status`
170
264
  - Ensure valid session token: `echo $BW_SESSION`
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Organization API handlers for enterprise management
3
+ */
4
+ export declare const handleListOrgCollections: (args: unknown) => Promise<{
5
+ isError: boolean;
6
+ content: {
7
+ type: string;
8
+ text: string;
9
+ }[];
10
+ }>;
11
+ export declare const handleGetOrgCollection: (args: unknown) => Promise<{
12
+ isError: boolean;
13
+ content: {
14
+ type: string;
15
+ text: string;
16
+ }[];
17
+ }>;
18
+ export declare const handleUpdateOrgCollection: (args: unknown) => Promise<{
19
+ isError: boolean;
20
+ content: {
21
+ type: string;
22
+ text: string;
23
+ }[];
24
+ }>;
25
+ export declare const handleDeleteOrgCollection: (args: unknown) => Promise<{
26
+ isError: boolean;
27
+ content: {
28
+ type: string;
29
+ text: string;
30
+ }[];
31
+ }>;
32
+ export declare const handleListOrgMembers: (args: unknown) => Promise<{
33
+ isError: boolean;
34
+ content: {
35
+ type: string;
36
+ text: string;
37
+ }[];
38
+ }>;
39
+ export declare const handleGetOrgMember: (args: unknown) => Promise<{
40
+ isError: boolean;
41
+ content: {
42
+ type: string;
43
+ text: string;
44
+ }[];
45
+ }>;
46
+ export declare const handleInviteOrgMember: (args: unknown) => Promise<{
47
+ isError: boolean;
48
+ content: {
49
+ type: string;
50
+ text: string;
51
+ }[];
52
+ }>;
53
+ export declare const handleUpdateOrgMember: (args: unknown) => Promise<{
54
+ isError: boolean;
55
+ content: {
56
+ type: string;
57
+ text: string;
58
+ }[];
59
+ }>;
60
+ export declare const handleRemoveOrgMember: (args: unknown) => Promise<{
61
+ isError: boolean;
62
+ content: {
63
+ type: string;
64
+ text: string;
65
+ }[];
66
+ }>;
67
+ export declare const handleListOrgGroups: (args: unknown) => Promise<{
68
+ isError: boolean;
69
+ content: {
70
+ type: string;
71
+ text: string;
72
+ }[];
73
+ }>;
74
+ export declare const handleGetOrgGroup: (args: unknown) => Promise<{
75
+ isError: boolean;
76
+ content: {
77
+ type: string;
78
+ text: string;
79
+ }[];
80
+ }>;
81
+ export declare const handleCreateOrgGroup: (args: unknown) => Promise<{
82
+ isError: boolean;
83
+ content: {
84
+ type: string;
85
+ text: string;
86
+ }[];
87
+ }>;
88
+ export declare const handleUpdateOrgGroup: (args: unknown) => Promise<{
89
+ isError: boolean;
90
+ content: {
91
+ type: string;
92
+ text: string;
93
+ }[];
94
+ }>;
95
+ export declare const handleDeleteOrgGroup: (args: unknown) => Promise<{
96
+ isError: boolean;
97
+ content: {
98
+ type: string;
99
+ text: string;
100
+ }[];
101
+ }>;
102
+ export declare const handleGetOrgMemberGroups: (args: unknown) => Promise<{
103
+ isError: boolean;
104
+ content: {
105
+ type: string;
106
+ text: string;
107
+ }[];
108
+ }>;
109
+ export declare const handleGetOrgGroupMembers: (args: unknown) => Promise<{
110
+ isError: boolean;
111
+ content: {
112
+ type: string;
113
+ text: string;
114
+ }[];
115
+ }>;
116
+ export declare const handleUpdateOrgMemberGroups: (args: unknown) => Promise<{
117
+ isError: boolean;
118
+ content: {
119
+ type: string;
120
+ text: string;
121
+ }[];
122
+ }>;
123
+ export declare const handleReinviteOrgMember: (args: unknown) => Promise<{
124
+ isError: boolean;
125
+ content: {
126
+ type: string;
127
+ text: string;
128
+ }[];
129
+ }>;
130
+ export declare const handleUpdateOrgGroupMembers: (args: unknown) => Promise<{
131
+ isError: boolean;
132
+ content: {
133
+ type: string;
134
+ text: string;
135
+ }[];
136
+ }>;
137
+ export declare const handleListOrgPolicies: (args: unknown) => Promise<{
138
+ isError: boolean;
139
+ content: {
140
+ type: string;
141
+ text: string;
142
+ }[];
143
+ }>;
144
+ export declare const handleGetOrgPolicy: (args: unknown) => Promise<{
145
+ isError: boolean;
146
+ content: {
147
+ type: string;
148
+ text: string;
149
+ }[];
150
+ }>;
151
+ export declare const handleUpdateOrgPolicy: (args: unknown) => Promise<{
152
+ isError: boolean;
153
+ content: {
154
+ type: string;
155
+ text: string;
156
+ }[];
157
+ }>;
158
+ export declare const handleGetOrgEvents: (args: unknown) => Promise<{
159
+ isError: boolean;
160
+ content: {
161
+ type: string;
162
+ text: string;
163
+ }[];
164
+ }>;
165
+ export declare const handleGetOrgSubscription: (args: unknown) => Promise<{
166
+ isError: boolean;
167
+ content: {
168
+ type: string;
169
+ text: string;
170
+ }[];
171
+ }>;
172
+ export declare const handleUpdateOrgSubscription: (args: unknown) => Promise<{
173
+ isError: boolean;
174
+ content: {
175
+ type: string;
176
+ text: string;
177
+ }[];
178
+ }>;
179
+ export declare const handleImportOrgUsersAndGroups: (args: unknown) => Promise<{
180
+ isError: boolean;
181
+ content: {
182
+ type: string;
183
+ text: string;
184
+ }[];
185
+ }>;
186
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/handlers/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAsDH,eAAO,MAAM,wBAAwB;;;;;;EAMpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;EAUlC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;EAYrC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;EAUrC,CAAC;AAGF,eAAO,MAAM,oBAAoB;;;;;;EAMhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;EAU9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EASjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAajC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAUjC,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;EAM/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;EAU7B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;EAQhC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;EAYhC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;EAUhC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;EAUpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;EAUpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;EAYvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;EAUnC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;EAYvC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;;;;EAMjC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;EAU9B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAYjC,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;;EA8B9B,CAAC;AAGF,eAAO,MAAM,wBAAwB;;;;;;EASpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;EAYvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;EAiBzC,CAAC"}
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Organization API handlers for enterprise management
3
+ */
4
+ import { executeApiRequest } from '../utils/api.js';
5
+ import { withValidation } from '../utils/validation.js';
6
+ import { listCollectionsRequestSchema, getCollectionRequestSchema, updateCollectionRequestSchema, deleteCollectionRequestSchema, listMembersRequestSchema, getMemberRequestSchema, inviteMemberRequestSchema, updateMemberRequestSchema, removeMemberRequestSchema, listGroupsRequestSchema, getGroupRequestSchema, createGroupRequestSchema, updateGroupRequestSchema, deleteGroupRequestSchema, getMemberGroupsRequestSchema, getGroupMembersRequestSchema, updateMemberGroupsRequestSchema, updateGroupMembersRequestSchema, reinviteMemberRequestSchema, listPoliciesRequestSchema, getPolicyRequestSchema, updatePolicyRequestSchema, getEventsRequestSchema, getOrgSubscriptionRequestSchema, updateOrgSubscriptionRequestSchema, importOrganizationUsersAndGroupsRequestSchema, } from '../schemas/api.js';
7
+ function toMcpFormat(response) {
8
+ let text = 'Success: Operation completed';
9
+ if (response.errorMessage) {
10
+ text = `Error: ${response.errorMessage}${response.data ? `\nDetails: ${JSON.stringify(response.data, null, 2)}` : ''}`;
11
+ }
12
+ else if (response.data) {
13
+ text = JSON.stringify(response.data, null, 2);
14
+ }
15
+ return {
16
+ isError: response.errorMessage ? true : false,
17
+ content: [
18
+ {
19
+ type: 'text',
20
+ text: text,
21
+ },
22
+ ],
23
+ };
24
+ }
25
+ // Collections handlers
26
+ export const handleListOrgCollections = withValidation(listCollectionsRequestSchema, async () => {
27
+ const response = await executeApiRequest(`/public/collections`, 'GET');
28
+ return toMcpFormat(response);
29
+ });
30
+ export const handleGetOrgCollection = withValidation(getCollectionRequestSchema, async (validatedArgs) => {
31
+ const { collectionId } = validatedArgs;
32
+ const response = await executeApiRequest(`/public/collections/${collectionId}`, 'GET');
33
+ return toMcpFormat(response);
34
+ });
35
+ export const handleUpdateOrgCollection = withValidation(updateCollectionRequestSchema, async (validatedArgs) => {
36
+ const { collectionId, externalId, groups } = validatedArgs;
37
+ const body = { externalId, groups };
38
+ const response = await executeApiRequest(`/public/collections/${collectionId}`, 'PUT', body);
39
+ return toMcpFormat(response);
40
+ });
41
+ export const handleDeleteOrgCollection = withValidation(deleteCollectionRequestSchema, async (validatedArgs) => {
42
+ const { collectionId } = validatedArgs;
43
+ const response = await executeApiRequest(`/public/collections/${collectionId}`, 'DELETE');
44
+ return toMcpFormat(response);
45
+ });
46
+ // Members handlers
47
+ export const handleListOrgMembers = withValidation(listMembersRequestSchema, async () => {
48
+ const response = await executeApiRequest(`/public/members`, 'GET');
49
+ return toMcpFormat(response);
50
+ });
51
+ export const handleGetOrgMember = withValidation(getMemberRequestSchema, async (validatedArgs) => {
52
+ const { memberId } = validatedArgs;
53
+ const response = await executeApiRequest(`/public/members/${memberId}`, 'GET');
54
+ return toMcpFormat(response);
55
+ });
56
+ export const handleInviteOrgMember = withValidation(inviteMemberRequestSchema, async (validatedArgs) => {
57
+ const { email, type, externalId, collections, groups, permissions } = validatedArgs;
58
+ const body = { email, type, externalId, collections, groups, permissions };
59
+ const response = await executeApiRequest(`/public/members`, 'POST', body);
60
+ return toMcpFormat(response);
61
+ });
62
+ export const handleUpdateOrgMember = withValidation(updateMemberRequestSchema, async (validatedArgs) => {
63
+ const { memberId, type, externalId, collections, groups, permissions } = validatedArgs;
64
+ const body = { type, externalId, collections, groups, permissions };
65
+ const response = await executeApiRequest(`/public/members/${memberId}`, 'PUT', body);
66
+ return toMcpFormat(response);
67
+ });
68
+ export const handleRemoveOrgMember = withValidation(removeMemberRequestSchema, async (validatedArgs) => {
69
+ const { memberId } = validatedArgs;
70
+ const response = await executeApiRequest(`/public/members/${memberId}`, 'DELETE');
71
+ return toMcpFormat(response);
72
+ });
73
+ // Groups handlers
74
+ export const handleListOrgGroups = withValidation(listGroupsRequestSchema, async () => {
75
+ const response = await executeApiRequest(`/public/groups`, 'GET');
76
+ return toMcpFormat(response);
77
+ });
78
+ export const handleGetOrgGroup = withValidation(getGroupRequestSchema, async (validatedArgs) => {
79
+ const { groupId } = validatedArgs;
80
+ const response = await executeApiRequest(`/public/groups/${groupId}`, 'GET');
81
+ return toMcpFormat(response);
82
+ });
83
+ export const handleCreateOrgGroup = withValidation(createGroupRequestSchema, async (validatedArgs) => {
84
+ const { name, externalId, collections } = validatedArgs;
85
+ const body = { name, externalId, collections };
86
+ const response = await executeApiRequest(`/public/groups`, 'POST', body);
87
+ return toMcpFormat(response);
88
+ });
89
+ export const handleUpdateOrgGroup = withValidation(updateGroupRequestSchema, async (validatedArgs) => {
90
+ const { groupId, name, externalId, collections } = validatedArgs;
91
+ const body = { name, externalId, collections };
92
+ const response = await executeApiRequest(`/public/groups/${groupId}`, 'PUT', body);
93
+ return toMcpFormat(response);
94
+ });
95
+ export const handleDeleteOrgGroup = withValidation(deleteGroupRequestSchema, async (validatedArgs) => {
96
+ const { groupId } = validatedArgs;
97
+ const response = await executeApiRequest(`/public/groups/${groupId}`, 'DELETE');
98
+ return toMcpFormat(response);
99
+ });
100
+ export const handleGetOrgMemberGroups = withValidation(getMemberGroupsRequestSchema, async (validatedArgs) => {
101
+ const { memberId } = validatedArgs;
102
+ const response = await executeApiRequest(`/public/members/${memberId}/group-ids`, 'GET');
103
+ return toMcpFormat(response);
104
+ });
105
+ export const handleGetOrgGroupMembers = withValidation(getGroupMembersRequestSchema, async (validatedArgs) => {
106
+ const { groupId } = validatedArgs;
107
+ const response = await executeApiRequest(`/public/groups/${groupId}/member-ids`, 'GET');
108
+ return toMcpFormat(response);
109
+ });
110
+ export const handleUpdateOrgMemberGroups = withValidation(updateMemberGroupsRequestSchema, async (validatedArgs) => {
111
+ const { memberId, groupIds } = validatedArgs;
112
+ const body = { groupIds };
113
+ const response = await executeApiRequest(`/public/members/${memberId}/group-ids`, 'PUT', body);
114
+ return toMcpFormat(response);
115
+ });
116
+ export const handleReinviteOrgMember = withValidation(reinviteMemberRequestSchema, async (validatedArgs) => {
117
+ const { memberId } = validatedArgs;
118
+ const response = await executeApiRequest(`/public/members/${memberId}/reinvite`, 'POST');
119
+ return toMcpFormat(response);
120
+ });
121
+ export const handleUpdateOrgGroupMembers = withValidation(updateGroupMembersRequestSchema, async (validatedArgs) => {
122
+ const { groupId, memberIds } = validatedArgs;
123
+ const body = { memberIds };
124
+ const response = await executeApiRequest(`/public/groups/${groupId}/member-ids`, 'PUT', body);
125
+ return toMcpFormat(response);
126
+ });
127
+ // Policies handlers
128
+ export const handleListOrgPolicies = withValidation(listPoliciesRequestSchema, async () => {
129
+ const response = await executeApiRequest(`/public/policies`, 'GET');
130
+ return toMcpFormat(response);
131
+ });
132
+ export const handleGetOrgPolicy = withValidation(getPolicyRequestSchema, async (validatedArgs) => {
133
+ const { policyType } = validatedArgs;
134
+ const response = await executeApiRequest(`/public/policies/${policyType}`, 'GET');
135
+ return toMcpFormat(response);
136
+ });
137
+ export const handleUpdateOrgPolicy = withValidation(updatePolicyRequestSchema, async (validatedArgs) => {
138
+ const { policyType, enabled, data } = validatedArgs;
139
+ const body = { enabled, data };
140
+ const response = await executeApiRequest(`/public/policies/${policyType}`, 'PUT', body);
141
+ return toMcpFormat(response);
142
+ });
143
+ // Events handlers
144
+ export const handleGetOrgEvents = withValidation(getEventsRequestSchema, async (validatedArgs) => {
145
+ const { start, end, actingUserId, itemId, collectionId, groupId, policyId, memberId, } = validatedArgs;
146
+ const params = new URLSearchParams({
147
+ start,
148
+ end,
149
+ ...(actingUserId && { actingUserId }),
150
+ ...(itemId && { itemId }),
151
+ ...(collectionId && { collectionId }),
152
+ ...(groupId && { groupId }),
153
+ ...(policyId && { policyId }),
154
+ ...(memberId && { memberId }),
155
+ });
156
+ const response = await executeApiRequest(`/public/events?${params.toString()}`, 'GET');
157
+ return toMcpFormat(response);
158
+ });
159
+ // Organization Billing handlers
160
+ export const handleGetOrgSubscription = withValidation(getOrgSubscriptionRequestSchema, async () => {
161
+ const response = await executeApiRequest(`/public/organization/subscription`, 'GET');
162
+ return toMcpFormat(response);
163
+ });
164
+ export const handleUpdateOrgSubscription = withValidation(updateOrgSubscriptionRequestSchema, async (validatedArgs) => {
165
+ const { passwordManager, secretsManager } = validatedArgs;
166
+ const body = { passwordManager, secretsManager };
167
+ const response = await executeApiRequest(`/public/organization/subscription`, 'PUT', body);
168
+ return toMcpFormat(response);
169
+ });
170
+ export const handleImportOrgUsersAndGroups = withValidation(importOrganizationUsersAndGroupsRequestSchema, async (validatedArgs) => {
171
+ const { groups, members, overwriteExisting, largeImport } = validatedArgs;
172
+ const body = {
173
+ groups: groups || [],
174
+ members: members || [],
175
+ overwriteExisting: overwriteExisting,
176
+ largeImport: largeImport || false,
177
+ };
178
+ const response = await executeApiRequest(`/public/organization/import`, 'POST', body);
179
+ return toMcpFormat(response);
180
+ });
181
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/handlers/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,+BAA+B,EAC/B,kCAAkC,EAClC,6CAA6C,GAC9C,MAAM,mBAAmB,CAAC;AAG3B,SAAS,WAAW,CAAC,QAAqB;IACxC,IAAI,IAAI,GAAG,8BAA8B,CAAC;IAC1C,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC1B,IAAI,GAAG,UAAU,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACz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nC,KAAK,CACN,CAAC;IACF,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,cAAc,CACvD,kCAAkC,EAClC,KAAK,EAAE,aAAa,EAAE,EAAE;IACtB,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC;IAC1D,MAAM,IAAI,GAAG,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;IACjD,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CACtC,mCAAmC,EACnC,KAAK,EACL,IAAI,CACL,CAAC;IACF,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,cAAc,CACzD,6CAA6C,EAC7C,KAAK,EAAE,aAAa,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,aAAa,CAAC;IAC1E,MAAM,IAAI,GAAG;QACX,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,OAAO,EAAE,OAAO,IAAI,EAAE;QACtB,iBAAiB,EAAE,iBAAiB;QACpC,WAAW,EAAE,WAAW,IAAI,KAAK;KAClC,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CACtC,6BAA6B,EAC7B,MAAM,EACN,IAAI,CACL,CAAC;IACF,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CACF,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * CLI command handlers for personal vault operations
3
+ */
4
+ export declare const handleLock: (args: unknown) => Promise<{
5
+ isError: boolean;
6
+ content: {
7
+ type: string;
8
+ text: string;
9
+ }[];
10
+ }>;
11
+ export declare const handleUnlock: (args: unknown) => Promise<{
12
+ isError: boolean;
13
+ content: {
14
+ type: string;
15
+ text: string;
16
+ }[];
17
+ }>;
18
+ export declare const handleSync: (args: unknown) => Promise<{
19
+ isError: boolean;
20
+ content: {
21
+ type: string;
22
+ text: string;
23
+ }[];
24
+ }>;
25
+ export declare const handleStatus: (args: unknown) => Promise<{
26
+ isError: boolean;
27
+ content: {
28
+ type: string;
29
+ text: string;
30
+ }[];
31
+ }>;
32
+ export declare const handleList: (args: unknown) => Promise<{
33
+ isError: boolean;
34
+ content: {
35
+ type: string;
36
+ text: string;
37
+ }[];
38
+ }>;
39
+ export declare const handleGet: (args: unknown) => Promise<{
40
+ isError: boolean;
41
+ content: {
42
+ type: string;
43
+ text: string;
44
+ }[];
45
+ }>;
46
+ export declare const handleGenerate: (args: unknown) => Promise<{
47
+ isError: boolean;
48
+ content: {
49
+ type: string;
50
+ text: string;
51
+ }[];
52
+ }>;
53
+ export declare const handleCreate: (args: unknown) => Promise<{
54
+ isError: boolean;
55
+ content: {
56
+ type: string;
57
+ text: string;
58
+ }[];
59
+ }>;
60
+ export declare const handleEdit: (args: unknown) => Promise<{
61
+ isError: boolean;
62
+ content: {
63
+ type: string;
64
+ text: string;
65
+ }[];
66
+ }>;
67
+ export declare const handleDelete: (args: unknown) => Promise<{
68
+ isError: boolean;
69
+ content: {
70
+ type: string;
71
+ text: string;
72
+ }[];
73
+ }>;
74
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/handlers/cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkCH,eAAO,MAAM,UAAU;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;EAQxB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;EAGvB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;EASrB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;EAKpB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;EAsC1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;EA+CxB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;EAuDrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;EAYxB,CAAC"}