@sendsafely/mcp-server-local 0.0.0-stage → 1.0.5

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 (134) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +22 -0
  3. package/README.md +390 -2
  4. package/dist/context.d.ts +2 -0
  5. package/dist/context.js +21 -0
  6. package/dist/credentials.d.ts +7 -0
  7. package/dist/credentials.js +59 -0
  8. package/dist/server.d.ts +2 -0
  9. package/dist/server.js +47 -0
  10. package/dist/setupCredentials.d.ts +2 -0
  11. package/dist/setupCredentials.js +151 -0
  12. package/dist/trustedDeviceKeyStore.d.ts +3 -0
  13. package/dist/trustedDeviceKeyStore.js +34 -0
  14. package/node_modules/@sendsafely/mcp-tools-core/LICENSE +201 -0
  15. package/node_modules/@sendsafely/mcp-tools-core/dist/approval.d.ts +51 -0
  16. package/node_modules/@sendsafely/mcp-tools-core/dist/approval.js +148 -0
  17. package/node_modules/@sendsafely/mcp-tools-core/dist/constants.d.ts +5 -0
  18. package/node_modules/@sendsafely/mcp-tools-core/dist/constants.js +8 -0
  19. package/node_modules/@sendsafely/mcp-tools-core/dist/context.d.ts +25 -0
  20. package/node_modules/@sendsafely/mcp-tools-core/dist/context.js +16 -0
  21. package/node_modules/@sendsafely/mcp-tools-core/dist/index.d.ts +18 -0
  22. package/node_modules/@sendsafely/mcp-tools-core/dist/index.js +17 -0
  23. package/node_modules/@sendsafely/mcp-tools-core/dist/instructions.d.ts +1 -0
  24. package/node_modules/@sendsafely/mcp-tools-core/dist/instructions.js +17 -0
  25. package/node_modules/@sendsafely/mcp-tools-core/dist/jsonResult.d.ts +3 -0
  26. package/node_modules/@sendsafely/mcp-tools-core/dist/jsonResult.js +15 -0
  27. package/node_modules/@sendsafely/mcp-tools-core/dist/recipientAddContext.d.ts +42 -0
  28. package/node_modules/@sendsafely/mcp-tools-core/dist/recipientAddContext.js +182 -0
  29. package/node_modules/@sendsafely/mcp-tools-core/dist/runTool.d.ts +2 -0
  30. package/node_modules/@sendsafely/mcp-tools-core/dist/runTool.js +22 -0
  31. package/node_modules/@sendsafely/mcp-tools-core/dist/safeHandler.d.ts +17 -0
  32. package/node_modules/@sendsafely/mcp-tools-core/dist/safeHandler.js +32 -0
  33. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/clientFactory.d.ts +17 -0
  34. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/clientFactory.js +29 -0
  35. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/oauthError.d.ts +9 -0
  36. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/oauthError.js +34 -0
  37. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/sdkPromise.d.ts +53 -0
  38. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/sdkPromise.js +462 -0
  39. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/signedFetch.d.ts +6 -0
  40. package/node_modules/@sendsafely/mcp-tools-core/dist/sdk/signedFetch.js +28 -0
  41. package/node_modules/@sendsafely/mcp-tools-core/dist/store/keyStore.d.ts +6 -0
  42. package/node_modules/@sendsafely/mcp-tools-core/dist/store/keyStore.js +1 -0
  43. package/node_modules/@sendsafely/mcp-tools-core/dist/store/packageSecretCache.d.ts +18 -0
  44. package/node_modules/@sendsafely/mcp-tools-core/dist/store/packageSecretCache.js +39 -0
  45. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/createDirectory.d.ts +9 -0
  46. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/createDirectory.js +53 -0
  47. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/deleteDirectory.d.ts +10 -0
  48. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/deleteDirectory.js +46 -0
  49. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/deleteFile.d.ts +11 -0
  50. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/deleteFile.js +53 -0
  51. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getActivityLog.d.ts +8 -0
  52. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getActivityLog.js +44 -0
  53. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getDirectory.d.ts +12 -0
  54. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getDirectory.js +51 -0
  55. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getEnterpriseInfo.d.ts +5 -0
  56. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getEnterpriseInfo.js +27 -0
  57. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getFileInformation.d.ts +9 -0
  58. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getFileInformation.js +34 -0
  59. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getPackageInformation.d.ts +7 -0
  60. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getPackageInformation.js +41 -0
  61. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getReceivedPackages.d.ts +5 -0
  62. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getReceivedPackages.js +54 -0
  63. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getRecipient.d.ts +8 -0
  64. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getRecipient.js +30 -0
  65. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getSentPackages.d.ts +7 -0
  66. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getSentPackages.js +84 -0
  67. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getWorkspaces.d.ts +5 -0
  68. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/getWorkspaces.js +114 -0
  69. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/index.d.ts +46 -0
  70. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/index.js +92 -0
  71. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/moveDirectory.d.ts +9 -0
  72. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/moveDirectory.js +39 -0
  73. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/removeRecipient.d.ts +8 -0
  74. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/removeRecipient.js +34 -0
  75. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/renameDirectory.d.ts +9 -0
  76. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/renameDirectory.js +34 -0
  77. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/setRecipientPhoneNumber.d.ts +10 -0
  78. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/setRecipientPhoneNumber.js +40 -0
  79. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addPackageMessage.d.ts +9 -0
  80. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addPackageMessage.js +37 -0
  81. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipient.d.ts +9 -0
  82. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipient.js +109 -0
  83. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipientWithSms.d.ts +11 -0
  84. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipientWithSms.js +115 -0
  85. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipientsBulk.d.ts +9 -0
  86. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/addRecipientsBulk.js +110 -0
  87. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/createPackage.d.ts +6 -0
  88. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/createPackage.js +65 -0
  89. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/createWorkspace.d.ts +10 -0
  90. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/createWorkspace.js +107 -0
  91. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/deletePackage.d.ts +10 -0
  92. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/deletePackage.js +39 -0
  93. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/downloadFileFromDirectory.d.ts +12 -0
  94. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/downloadFileFromDirectory.js +91 -0
  95. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/downloadPackageFiles.d.ts +12 -0
  96. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/downloadPackageFiles.js +205 -0
  97. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/finalizePackage.d.ts +9 -0
  98. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/finalizePackage.js +111 -0
  99. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/finalizeUndisclosedPackage.d.ts +9 -0
  100. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/finalizeUndisclosedPackage.js +57 -0
  101. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/generateTrustedDeviceKeypair.d.ts +10 -0
  102. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/generateTrustedDeviceKeypair.js +75 -0
  103. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageInformationFromLink.d.ts +8 -0
  104. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageInformationFromLink.js +50 -0
  105. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageKeycode.d.ts +11 -0
  106. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageKeycode.js +120 -0
  107. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageMessage.d.ts +9 -0
  108. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/getPackageMessage.js +59 -0
  109. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/listDownloadedFiles.d.ts +5 -0
  110. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/listDownloadedFiles.js +71 -0
  111. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/readDownloadedFile.d.ts +8 -0
  112. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/readDownloadedFile.js +176 -0
  113. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/uploadFile.d.ts +12 -0
  114. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/stdio/uploadFile.js +69 -0
  115. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updateFile.d.ts +9 -0
  116. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updateFile.js +38 -0
  117. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updatePackage.d.ts +14 -0
  118. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updatePackage.js +122 -0
  119. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updateRecipientRole.d.ts +9 -0
  120. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/updateRecipientRole.js +45 -0
  121. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/verifyCredentials.d.ts +5 -0
  122. package/node_modules/@sendsafely/mcp-tools-core/dist/tools/verifyCredentials.js +27 -0
  123. package/node_modules/@sendsafely/mcp-tools-core/dist/types/sendsafely.d.ts +432 -0
  124. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageChecksum.d.ts +1 -0
  125. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageChecksum.js +7 -0
  126. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageDir.d.ts +8 -0
  127. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageDir.js +50 -0
  128. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageLink.d.ts +2 -0
  129. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/packageLink.js +4 -0
  130. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/sanitizeFilename.d.ts +4 -0
  131. package/node_modules/@sendsafely/mcp-tools-core/dist/utils/sanitizeFilename.js +8 -0
  132. package/node_modules/@sendsafely/mcp-tools-core/package.json +40 -0
  133. package/npm-shrinkwrap.json +1632 -0
  134. package/package.json +58 -4
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 SendSafely
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,22 @@
1
+ SendSafely MCP Server
2
+ Copyright 2026 SendSafely
3
+
4
+ This product is licensed under the Apache License, Version 2.0. See the
5
+ LICENSE file.
6
+
7
+ This package depends on third-party packages that npm installs from the
8
+ public registry at install time. They are not modified and are not bundled
9
+ inside this package. At the time of this release every dependency in the
10
+ install tree is under a permissive license (MIT, ISC, BSD-2-Clause,
11
+ BSD-3-Clause or Apache-2.0) with one exception, listed below because its
12
+ license carries notice requirements.
13
+
14
+ OpenPGP.js (npm package "openpgp")
15
+ https://openpgpjs.org/
16
+ https://github.com/openpgpjs/openpgpjs
17
+ Licensed under the GNU Lesser General Public License, version 3.0 or any
18
+ later version (LGPL-3.0-or-later). It is required by @sendsafely/sendsafely,
19
+ the SendSafely JavaScript SDK (Apache-2.0), and is used as an unmodified npm
20
+ dependency. The full license text is installed with the package at
21
+ node_modules/openpgp/LICENSE and is available at
22
+ https://www.gnu.org/licenses/lgpl-3.0.html.
package/README.md CHANGED
@@ -1,3 +1,391 @@
1
- # Temporary Holding Version
1
+ # SendSafely MCP Server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The SendSafely MCP (Model Context Protocol) server lets AI assistants interact directly with the SendSafely encrypted file transfer platform: sending packages, managing recipients, uploading/downloading files, administering workspaces, and querying activity logs, all through natural language.
4
+
5
+ This server works with **any MCP-compatible AI client** (Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, OpenAI Codex, and others). Install and credential steps below are identical regardless of which client you use. Only the final "connect to your client" step differs, since each client stores its MCP configuration in a different place.
6
+
7
+
8
+ ---
9
+
10
+ ## Prerequisites
11
+
12
+ | Requirement | Details |
13
+ |---|---|
14
+ | **Node.js 24.16.0+** | The server is written for Node 24; older versions are not supported. npm warns at install time and the server is not expected to run. |
15
+ | **npm 11.11.0+** | Ships with Node 24+. |
16
+ | **A SendSafely account** | Including an API key & secret. [How to obtain one.](https://support.sendsafely.com/hc/en-us/articles/204583665-Obtaining-an-API-Key-and-API-Secret) |
17
+ | **Network access to npmjs.com** | The server is published as [`@sendsafely/mcp-server-local`](https://www.npmjs.com/package/@sendsafely/mcp-server-local) on the public npm registry, and the install pulls its dependencies from there too. |
18
+ | **An MCP-compatible AI client** | Claude Desktop, Claude Code, Cursor, Windsurf, VS Code (with MCP/Copilot support), OpenAI Codex (CLI or desktop app), or any other client that supports stdio MCP servers. |
19
+
20
+ ---
21
+
22
+ ## Step 1 — Check your Node version
23
+
24
+ ```bash
25
+ node --version
26
+ ```
27
+
28
+ You need `v24.16.0` or newer. If you see a lower version or `command not found`:
29
+
30
+ - **Recommended (macOS/Linux):** install [nvm](https://github.com/nvm-sh/nvm), then:
31
+ ```bash
32
+ nvm install 24
33
+ nvm use 24
34
+ ```
35
+ - **Alternative:** download the latest LTS release (24.x) from [nodejs.org](https://nodejs.org/).
36
+ - **Windows:** use [nvm-windows](https://github.com/coreybutler/nvm-windows) or the nodejs.org installer.
37
+
38
+ Then re-check:
39
+
40
+ ```bash
41
+ node --version # should print v24.16.0 or higher
42
+ npm --version # should print 11.11.0 or higher
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Step 2 — Install the server from npm
48
+
49
+ Create a dedicated directory and install the package into it:
50
+
51
+ **macOS / Linux**
52
+ ```bash
53
+ mkdir -p ~/sendsafely-mcp
54
+ cd ~/sendsafely-mcp
55
+ npm install @sendsafely/mcp-server-local
56
+ ```
57
+
58
+ **Windows (PowerShell)**
59
+ ```powershell
60
+ mkdir $HOME\sendsafely-mcp
61
+ cd $HOME\sendsafely-mcp
62
+ npm install @sendsafely/mcp-server-local
63
+ ```
64
+
65
+ The install pulls its dependencies from the public npm registry. To install a specific release instead of the latest, add its version number from the [npm page](https://www.npmjs.com/package/@sendsafely/mcp-server-local?activeTab=versions): `npm install @sendsafely/mcp-server-local@<version>`. To upgrade later, re-run the same `npm install` command from the same directory.
66
+
67
+ The package installs two commands under `node_modules/.bin`: `sendsafely-mcp-server` (the MCP server, the same program as `dist/server.js`) and `sendsafely-setup-credentials` (the same as `dist/setupCredentials.js`). This guide uses the explicit `node` plus `dist/...js` form throughout because MCP clients launch the server with a minimal `PATH` and need absolute paths.
68
+
69
+ If you would rather not keep a local install, `npx` can fetch and run the package on demand. The package ships two commands, so name the one you want with `-p`; a bare `npx @sendsafely/mcp-server-local` fails with `could not determine executable to run`:
70
+
71
+ ```bash
72
+ npx -y -p @sendsafely/mcp-server-local sendsafely-setup-credentials
73
+ npx -y -p @sendsafely/mcp-server-local sendsafely-mcp-server
74
+ ```
75
+
76
+ The rest of this guide assumes the local install above.
77
+
78
+ **Note these two absolute paths.** You'll need both in Step 4:
79
+
80
+ 1. **Path to `node`** — run `which node` (macOS/Linux) or `where.exe node` (Windows).
81
+ Typical output: `/Users/you/.nvm/versions/node/v24.16.0/bin/node`
82
+ 2. **Path to the installed server**, which should be exactly:
83
+ - macOS/Linux: `~/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js`
84
+ - Windows: `C:/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js`
85
+
86
+ Verify the server file exists:
87
+
88
+ ```bash
89
+ # macOS / Linux
90
+ ls ~/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js
91
+
92
+ # Windows (PowerShell)
93
+ Test-Path $HOME\sendsafely-mcp\node_modules\@sendsafely\mcp-server-local\dist\server.js
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Step 3 — Configure credentials in your OS keychain
99
+
100
+ Credentials are stored encrypted, never in plaintext, in:
101
+
102
+ - macOS Keychain
103
+ - Windows Credential Manager
104
+ - Secret Service on Linux (requires gnome-keyring or similar)
105
+
106
+ This step is identical no matter which AI client you're connecting.
107
+
108
+ ```bash
109
+ # macOS / Linux
110
+ node ~/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/setupCredentials.js
111
+
112
+ # Windows (PowerShell)
113
+ node $HOME\sendsafely-mcp\node_modules\@sendsafely\mcp-server-local\dist\setupCredentials.js
114
+ ```
115
+
116
+ When prompted, enter:
117
+
118
+ 1. **SendSafely URL**. Your portal URL, **including the `https://` prefix** (e.g. `https://yourcompany.sendsafely.com`). Do not enter a bare hostname: setup stops with `SENDSAFELY_URL must use https://` and saves nothing.
119
+ 2. **API Key**. From your SendSafely account settings
120
+ 3. **API Secret**. From your SendSafely account settings
121
+
122
+ Check what's configured, or remove credentials later:
123
+
124
+ ```bash
125
+ node <path-to-server-dist>/setupCredentials.js --status
126
+ node <path-to-server-dist>/setupCredentials.js --clear
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Step 4 — Connect the server to your AI client
132
+
133
+ Every client below uses a stdio MCP server pointed at the same two paths from Step 2; only the config file location (and occasionally the JSON key name) changes.
134
+
135
+ ### Claude Desktop
136
+
137
+ Edit (or create):
138
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
139
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
140
+
141
+ (Claude Desktop → Settings → Developer → Edit Config also opens this file.)
142
+
143
+ **macOS / Linux**
144
+ ```json
145
+ {
146
+ "mcpServers": {
147
+ "sendsafely": {
148
+ "command": "/Users/you/.nvm/versions/node/v24.16.0/bin/node",
149
+ "args": [
150
+ "/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js"
151
+ ]
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ **Windows** — use forward slashes in both paths (backslashes are invalid JSON escapes; Node accepts forward slashes on Windows):
158
+ ```json
159
+ {
160
+ "mcpServers": {
161
+ "sendsafely": {
162
+ "command": "C:/Users/you/AppData/Roaming/nvm/v24.16.0/node.exe",
163
+ "args": [
164
+ "C:/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js"
165
+ ]
166
+ }
167
+ }
168
+ }
169
+ ```
170
+
171
+ If other servers are already configured, merge `sendsafely` into the existing `mcpServers` object rather than replacing it.
172
+
173
+ ### Claude Code
174
+
175
+ Register from the terminal (adjust paths to match yours):
176
+
177
+ ```bash
178
+ claude mcp add sendsafely -- /Users/you/.nvm/versions/node/v24.16.0/bin/node /Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js
179
+ ```
180
+
181
+ Or add the same JSON block as Claude Desktop above under `mcpServers` in `.mcp.json` (project scope) or your user-level Claude Code config.
182
+
183
+ ### Cursor
184
+
185
+ Edit `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-scoped). Same schema as Claude Desktop:
186
+
187
+ ```json
188
+ {
189
+ "mcpServers": {
190
+ "sendsafely": {
191
+ "command": "/Users/you/.nvm/versions/node/v24.16.0/bin/node",
192
+ "args": [
193
+ "/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js"
194
+ ]
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ ### Windsurf
201
+
202
+ Edit `~/.codeium/windsurf/mcp_config.json` — same `mcpServers` schema as above.
203
+
204
+ ### VS Code (MCP / Copilot, Cline, and similar extensions)
205
+
206
+ VS Code's native MCP support uses `servers` (not `mcpServers`) in `.vscode/mcp.json`, and typically expects a `type` field:
207
+
208
+ ```json
209
+ {
210
+ "servers": {
211
+ "sendsafely": {
212
+ "type": "stdio",
213
+ "command": "/Users/you/.nvm/versions/node/v24.16.0/bin/node",
214
+ "args": [
215
+ "/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js"
216
+ ]
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ Extensions like Cline typically use the same `mcpServers` schema as Claude Desktop instead. Check your extension's MCP settings panel.
223
+
224
+ ### OpenAI Codex (CLI and desktop app)
225
+
226
+ Codex's CLI and desktop app (the desktop experience runs inside the ChatGPT app) share a single config file; you only need to edit it once for both surfaces.
227
+
228
+ Edit (or create) `~/.codex/config.toml` and add:
229
+
230
+ ```toml
231
+ [mcp_servers.sendsafely]
232
+ command = "/Users/you/.nvm/versions/node/v24.16.0/bin/node"
233
+ args = ["/Users/you/sendsafely-mcp/node_modules/@sendsafely/mcp-server-local/dist/server.js"]
234
+ startup_timeout_sec = 60
235
+ ```
236
+
237
+ Use the same `node` and `server.js` paths from Step 2 — Codex needs the full absolute path to `node` because the desktop app launches with a minimal `PATH` and won't find a bare `node`.
238
+
239
+ **Load it:**
240
+ - **Terminal (CLI):** just run `codex` — it reads `config.toml` on launch.
241
+ - **Desktop app:** if it was already open, fully quit and relaunch so it re-reads the config (or run `codex app` from the terminal).
242
+
243
+ **Verify:** prompt `Verify my SendSafely credentials are working.` — Codex should call `verify_credentials` and report success.
244
+
245
+ ### Other MCP-compatible clients
246
+
247
+ Any client that supports **stdio MCP servers** can run this server. You need two things from Step 2: the path to `node`, and the path to `server.js`. Consult your client's MCP documentation for where it stores server config and which JSON key it expects (`mcpServers` vs `servers` are the two common conventions).
248
+
249
+ > **Important (all clients):** the SendSafely URL you entered in Step 3 must include the `https://` prefix — this is client-independent.
250
+
251
+ ---
252
+
253
+ ## Step 5 — Restart and verify
254
+
255
+ 1. **Fully quit and relaunch** your AI client (for Claude Desktop: ⌘Q on macOS, or Quit from the tray icon on Windows; closing the window is not enough. Other clients: reload the window / restart the extension).
256
+ 2. Check your client's MCP/server status panel for `sendsafely` showing as connected.
257
+ 3. In a new chat, try: `Verify my SendSafely credentials.`
258
+
259
+ If the connection fails, check your client's MCP logs/panel for the error, and re-confirm the `node` and `server.js` paths from Step 2.
260
+
261
+ ---
262
+
263
+ ## Tools
264
+
265
+ The server exposes 38 tools. Tools marked **approval** pause and ask for your confirmation before they run; see [Security model](#security-model) for how that prompt reaches you.
266
+
267
+ **Account and listings**
268
+
269
+ | Tool | What it does |
270
+ |---|---|
271
+ | `verify_credentials` | Checks that the stored API key and secret work against your SendSafely portal |
272
+ | `get_enterprise_info` | Returns organization-level settings (host, system name, branding, enabled features) |
273
+ | `get_received_packages` | Lists packages sent to you |
274
+ | `get_sent_packages` | Lists packages you sent, active and/or archived |
275
+ | `get_workspaces` | Lists your workspaces; the response carries a `truncated` flag when the listing is incomplete |
276
+
277
+ **Inspecting a package**
278
+
279
+ | Tool | What it does |
280
+ |---|---|
281
+ | `get_package_information` | Metadata for a package by ID: subject, recipients, files, state, type |
282
+ | `get_package_information_from_link` | Resolves a SendSafely secure link to the same metadata and remembers the link's key for later tool calls |
283
+ | `get_package_message` | Decrypts and returns the secure message attached to a package. **approval** |
284
+ | `get_activity_log` | Audit log (downloads, views, access events) for a workspace |
285
+ | `get_file_information` | Metadata for one file in a package |
286
+ | `get_recipient` | Details for one recipient on a package |
287
+ | `get_directory` | Lists the files and subdirectories of a workspace directory |
288
+
289
+ **Downloading and reading files**
290
+
291
+ | Tool | What it does |
292
+ |---|---|
293
+ | `download_package_files` | Downloads and decrypts the files of a package to local disk. **approval** |
294
+ | `download_file_from_directory` | Downloads and decrypts one file from a workspace directory. **approval** |
295
+ | `list_downloaded_files` | Lists files previously downloaded by this server |
296
+ | `read_downloaded_file` | Returns the contents of a downloaded file to the assistant. **approval** |
297
+
298
+ **Sending**
299
+
300
+ | Tool | What it does |
301
+ |---|---|
302
+ | `create_package` | Creates a new, empty package. On clients that can show a prompt, asks whether to show you the package's keyed link; the package is created either way |
303
+ | `create_workspace` | Creates a new, empty workspace package |
304
+ | `upload_file` | Encrypts and uploads a local file into an unfinalized package. **approval** |
305
+ | `add_package_message` | Encrypts and attaches a secure text message to an unfinalized package |
306
+ | `add_recipient` | Adds a recipient by email to a package or workspace. On a workspace, clients that can show a prompt ask which role to give the new collaborator (Viewer, Contributor or Manager); they are added as Viewer and stay Viewer unless you pick another role |
307
+ | `add_recipients_bulk` | Adds several recipients in one call. On a workspace, asks for the role once, as `add_recipient` does, and applies it to everyone added |
308
+ | `add_recipient_with_sms` | Adds a recipient who must verify by SMS code before access. On a workspace, asks for the role as `add_recipient` does |
309
+ | `set_recipient_phone_number` | Sets or updates the SMS number of an existing recipient |
310
+ | `finalize_package` | Finalizes the package so recipients can access it. SendSafely emails them the secure link only if you ask for that; otherwise you share the link yourself |
311
+ | `finalize_undisclosed_package` | Finalizes a package protected by a link and password instead of a named recipient list |
312
+
313
+ **Managing packages and workspaces**
314
+
315
+ | Tool | What it does |
316
+ |---|---|
317
+ | `update_package` | Changes package settings: name, expiration, watermarking, save/print restrictions |
318
+ | `update_recipient_role` | Changes a recipient's role on a workspace |
319
+ | `remove_recipient` | Removes a recipient from a package |
320
+ | `update_file` | Renames a file in a workspace or Dropzone package |
321
+ | `delete_file` | Permanently deletes a file from a package. **approval** |
322
+ | `delete_package` | Permanently deletes a package. **approval** |
323
+ | `create_directory` | Creates a directory in a workspace, at the root or nested |
324
+ | `rename_directory` | Renames a workspace directory |
325
+ | `move_directory` | Moves a directory to a new parent in the same workspace |
326
+ | `delete_directory` | Permanently deletes a directory and its contents. **approval** |
327
+
328
+ **Trusted Device**
329
+
330
+ | Tool | What it does |
331
+ |---|---|
332
+ | `generate_trusted_device_keypair` | Generates a Trusted Device key pair, registers the public key with SendSafely and stores the private key in your OS keychain. **approval** |
333
+ | `get_package_keycode` | Unlocks a package you received using the Trusted Device private key, so the receive-flow tools work by package ID without a link. **approval** |
334
+
335
+ ---
336
+
337
+ ## Security model
338
+
339
+ The server runs on your machine and talks to SendSafely with your API key, so anything it does, it does as you. The operations that matter most ask for your confirmation first:
340
+
341
+ - Downloading a package or workspace file (`download_package_files`, `download_file_from_directory`) decrypts it to local disk.
342
+ - Reading a downloaded file (`read_downloaded_file`) or a secure message (`get_package_message`) hands the decrypted contents to the AI assistant.
343
+ - Uploading a file (`upload_file`) reads a file from your machine and encrypts it into a package.
344
+ - Deleting a package, file, or directory is irreversible.
345
+ - Unlocking a package Keycode (`get_package_keycode`) and registering a Trusted Device (`generate_trusted_device_keypair`) touch your account's key material.
346
+
347
+ How that confirmation works depends on your client:
348
+
349
+ **Tier 1, MCP elicitation** (Claude Code 2.1.76 and later from the command line, and other clients that advertise the capability): the server pauses the tool call and the client shows you a real approve/decline prompt before the operation runs. The prompt is rendered by the client, outside the assistant's control, so the assistant cannot answer it for you.
350
+
351
+ **Tier 2, chat-mediated consent** (Claude Desktop at the time of writing, and any other client without elicitation): the server has no way to prompt you directly. The first call to a gated tool is refused, and the assistant is instructed to ask you in the chat and, only if you agree, call the tool again with a `proceed_without_prompt` flag. The server cannot verify that the assistant actually asked, so on these clients the safeguard rests on the assistant following its instructions. If you want a hard guarantee that nothing is decrypted or deleted without a prompt you can see, use a Tier 1 client.
352
+
353
+ **Known client issue (October 2026):** the Claude Code desktop app renders neither the elicitation prompt nor the Tier 2 yes/no fallback, so approval-gated tools do not complete there. The Claude Code command line and the Cowork desktop app both work; use one of those with this server until the desktop app is fixed.
354
+
355
+ Two things follow from this. Treat a chat that says "I've downloaded and read the file" without you ever being asked as a reason to check your client's tool-call log. And once a Trusted Device is registered from this machine, new packages sent to you can be unlocked here without pasting a link, so that registration deserves the same care as installing a browser extension with access to your account.
356
+
357
+ Decrypted files land under `SENDSAFELY_DOWNLOAD_DIR` (default: a `sendsafely_downloads` folder in your OS temp directory) in a per-package folder. If you set `SENDSAFELY_DOWNLOAD_DIR`, point it at a dedicated directory you own. The server refuses to write when the per-package path already exists as a symlink or a file. On macOS and Linux the per-package folder is readable only by your user, and the server refuses a download root owned by another user (other than root) or one that other users can write to without the sticky bit (the protection `/tmp` has). On Windows these ownership checks do not run, and the folder takes its permissions from its parent directory.
358
+
359
+ Your API secret and Trusted Device private keys live in the OS keychain and never appear in tool output. The one exception is the environment-variable fallback described under [Troubleshooting](#troubleshooting), where the API secret is read from `SENDSAFELY_API_SECRET` instead. `SENDSAFELY_URL` must be an `https://` address; the server refuses plain `http://` except for localhost.
360
+
361
+ ---
362
+
363
+ ## Troubleshooting
364
+
365
+ > **Approval prompts are expected.** Downloading or uploading files, reading decrypted file contents or secure messages, deleting packages, files, or directories, unlocking a package Keycode, generating a Trusted Device key pair, and disclosing a new package's keyed link all pause and ask for your confirmation before proceeding. Adding a recipient to a workspace asks which role to give them once they are added. Approving is safe and intended; this is not an error. If your client cannot show prompts, see [Security model](#security-model) above.
366
+
367
+ | Symptom | Fix |
368
+ |---|---|
369
+ | Client doesn't show `sendsafely` / SendSafely tools | Double-check the config file path and JSON key for your client, and fully restart the client |
370
+ | `No usable keychain backend found` (Linux) | Install `gnome-keyring` or an equivalent Secret Service provider |
371
+ | Authentication / connection errors | Re-run `setupCredentials.js` and confirm the URL includes `https://`; confirm the API key hasn't been revoked |
372
+ | `node` not found by the client | Confirm the `command` path matches the output of `which node` / `where.exe node` exactly |
373
+ | `SENDSAFELY_URL must use https://` | Re-run `setupCredentials.js` with the full `https://` portal URL; plain `http://` is only accepted for localhost |
374
+ | `Refusing to use '<dir>': path exists and is not a real directory`, or an `EEXIST` or `ENOENT` error from `mkdir '<dir>'` | A symlink or a file sits where the server wants the per-package download folder. Remove it, or set `SENDSAFELY_DOWNLOAD_DIR` to a dedicated directory |
375
+ | `SendSafely credentials not available` even after setup | Credential resolution is keychain-first with an environment-variable fallback: re-run `setupCredentials.js`, or set `SENDSAFELY_URL` / `SENDSAFELY_API_KEY` / `SENDSAFELY_API_SECRET` as environment variables if your keychain is unavailable (e.g. headless/CI environments) |
376
+ | Module-not-found on start | Confirm dependencies were installed inside the same directory as Step 2 (a global `npm install` won't put the package where the config points) |
377
+
378
+ ---
379
+
380
+ ## Support
381
+
382
+ - **Bugs in this package:** open an issue at [https://github.com/SendSafely/SendSafelyMCP/issues](https://github.com/SendSafely/SendSafelyMCP/issues). Include the package version, your Node.js version, your MCP client and its version, and the error text from the client's MCP log. Please redact SendSafely URLs, package IDs and file names.
383
+ - **Security issues:** report them through the [SendSafely Bug Reporting Form](https://explore.sendsafely.com/security/bug-report/) as described in [SECURITY.md](https://github.com/SendSafely/SendSafelyMCP/blob/main/SECURITY.md). Please do not file them as public issues.
384
+ - **Your SendSafely account, API key or the platform itself:** contact support@sendsafely.com.
385
+ - **Pull requests:** the GitHub repository is a publish-only mirror of each released version. Pull request creation is restricted to SendSafely collaborators, so outside contributors cannot open one. See [CONTRIBUTING.md](https://github.com/SendSafely/SendSafelyMCP/blob/main/CONTRIBUTING.md).
386
+
387
+ ---
388
+
389
+ ## License
390
+
391
+ Apache License 2.0, see [LICENSE](https://github.com/SendSafely/SendSafelyMCP/blob/main/LICENSE). Third-party notices, including the LGPL-3.0 licensed OpenPGP.js dependency that the SendSafely SDK requires, are in [NOTICE](https://github.com/SendSafely/SendSafelyMCP/blob/main/NOTICE).
@@ -0,0 +1,2 @@
1
+ import { type ApprovalServer, type ToolContext } from "@sendsafely/mcp-tools-core";
2
+ export declare function createStdioContext(server: ApprovalServer): ToolContext;
@@ -0,0 +1,21 @@
1
+ import { createSendSafelyClient, MissingCredentialsError, requireUserApproval, requireUserChoice, SENDSAFELY_DOWNLOAD_DIR, } from "@sendsafely/mcp-tools-core";
2
+ import { getCredential } from "./credentials.js";
3
+ export function createStdioContext(server) {
4
+ return {
5
+ getClient: async (_extra) => {
6
+ const url = getCredential("url");
7
+ const apiKey = getCredential("api_key");
8
+ const apiSecret = getCredential("api_secret");
9
+ if (!url || !apiKey || !apiSecret) {
10
+ throw new MissingCredentialsError("Missing required credentials. " +
11
+ "Run 'sendsafely-setup-credentials' to store them in your OS keychain, " +
12
+ "or set SENDSAFELY_URL, SENDSAFELY_API_KEY, and SENDSAFELY_API_SECRET " +
13
+ "environment variables.");
14
+ }
15
+ return createSendSafelyClient({ url, apiKey, apiSecret });
16
+ },
17
+ getDownloadDir: (_extra) => SENDSAFELY_DOWNLOAD_DIR,
18
+ requireUserApproval: async (message) => requireUserApproval(server, message),
19
+ requireUserChoice: async (message, choices) => requireUserChoice(server, message, choices),
20
+ };
21
+ }
@@ -0,0 +1,7 @@
1
+ export declare const SERVICE_NAME = "SendSafelyMCP";
2
+ export type CredentialName = "url" | "api_key" | "api_secret";
3
+ export declare function keyringAvailable(): boolean;
4
+ export declare function getCredential(name: CredentialName): string;
5
+ export declare function storeCredential(name: CredentialName, value: string): void;
6
+ export declare function deleteCredential(name: CredentialName): void;
7
+ export declare function credentialSource(name: CredentialName): "keychain" | "environment" | "not found";