@tenuo/mcp 0.3.0-beta.0 → 0.3.2-beta.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 (3) hide show
  1. package/LICENSE +76 -61
  2. package/README.md +4 -0
  3. package/package.json +11 -5
package/LICENSE CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  Apache License
2
3
  Version 2.0, January 2004
3
4
  http://www.apache.org/licenses/
@@ -32,9 +33,10 @@
32
33
  not limited to compiled object code, generated documentation,
33
34
  and conversions to other media types.
34
35
 
35
- "Work" shall mean the work of authorship made available under
36
- the License, as indicated by a copyright notice that is included in
37
- or attached to the work (an example is provided in the Appendix below).
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
38
40
 
39
41
  "Derivative Works" shall mean any work, whether in Source or Object
40
42
  form, that is based on (or derived from) the Work and for which the
@@ -44,24 +46,23 @@
44
46
  separable from, or merely link (or bind by name) to the interfaces of,
45
47
  the Work and Derivative Works thereof.
46
48
 
47
- "Contribution" shall mean, as defined by the copyright owner, any
48
- work of authorship, including the original version of the Work and
49
- any modifications or additions to that Work or Derivative Works of
50
- the Work, submitted to the Licensor for inclusion in the Work by the
51
- copyright owner or by an individual or Legal Entity authorized to
52
- submit on behalf of the copyright owner. For the purposes of this
53
- definition, "submitted" means any form of electronic, verbal, or
54
- written communication sent to the Licensor or its representatives,
55
- including but not limited to communication on electronic mailing lists,
56
- source code control systems, and issue tracking systems that are managed
57
- by, or on behalf of, the Licensor for the purpose of discussing and
58
- improving the Work, but excluding communication that is conspicuously
59
- marked or designated in writing by the copyright owner as "Not a
60
- Contribution."
61
-
62
- "Contributor" shall mean Licensor and any Legal Entity on behalf of
63
- whom a Contribution has been received by the Licensor and included
64
- within the Work.
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
65
66
 
66
67
  2. Grant of Copyright License. Subject to the terms and conditions of
67
68
  this License, each Contributor hereby grants to You a perpetual,
@@ -77,22 +78,22 @@
77
78
  use, offer to sell, sell, import, and otherwise transfer the Work,
78
79
  where such license applies only to those patent claims licensable
79
80
  by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by the combined work of their Contribution(s)
81
+ Contribution(s) alone or by combination of their Contribution(s)
81
82
  with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a cross-claim
83
- or counterclaim in a lawsuit) alleging that the Work or any
84
- Contribution embodied within the Work constitutes direct or contributory
85
- patent infringement, then any patent licenses granted to You under
86
- this License for that Work shall terminate as of the date such
87
- litigation is filed.
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
88
89
 
89
90
  4. Redistribution. You may reproduce and distribute copies of the
90
91
  Work or Derivative Works thereof in any medium, with or without
91
92
  modifications, and in Source or Object form, provided that You
92
93
  meet the following conditions:
93
94
 
94
- (a) You must give any other recipients of the Work or Derivative
95
- Works a copy of this License; and
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
96
97
 
97
98
  (b) You must cause any modified files to carry prominent notices
98
99
  stating that You changed the files; and
@@ -104,25 +105,28 @@
104
105
  the Derivative Works; and
105
106
 
106
107
  (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, You must include a readable copy of the
108
- attribution notices contained within such NOTICE file, in
109
- at least one of the following places: within a NOTICE text
110
- file distributed as part of the Derivative Works; within
111
- the Source form or documentation, if provided along with the
112
- Derivative Works; or, within a display generated by the
113
- Derivative Works, if and wherever such third-party notices
114
- normally appear. The contents of the NOTICE file are for
115
- informational purposes only and do not modify the License.
116
- You may add Your own attribution notices within Derivative
117
- Works that You distribute, alongside or as an addendum to
118
- the NOTICE text from the Work, provided that such additional
119
- attribution notices cannot be construed as modifying the License.
120
-
121
- You may add Your own license statement for Your modifications and
122
- may provide additional grant of rights to use, copy, modify, merge,
123
- publish, distribute, sublicense, and/or sell copies of the
124
- Derivative Works, and to permit persons to whom the Derivative Works
125
- are furnished to do so, subject to Your terms.
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
126
130
 
127
131
  5. Submission of Contributions. Unless You explicitly state otherwise,
128
132
  any Contribution intentionally submitted for inclusion in the Work
@@ -144,7 +148,7 @@
144
148
  implied, including, without limitation, any warranties or conditions
145
149
  of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
146
150
  PARTICULAR PURPOSE. You are solely responsible for determining the
147
- appropriateness of using or reproducing the Work and assume any
151
+ appropriateness of using or redistributing the Work and assume any
148
152
  risks associated with Your exercise of permissions under this License.
149
153
 
150
154
  8. Limitation of Liability. In no event and under no legal theory,
@@ -152,27 +156,38 @@
152
156
  unless required by applicable law (such as deliberate and grossly
153
157
  negligent acts) or agreed to in writing, shall any Contributor be
154
158
  liable to You for damages, including any direct, indirect, special,
155
- incidental, or exemplary damages of any character arising as a
159
+ incidental, or consequential damages of any character arising as a
156
160
  result of this License or out of the use or inability to use the
157
161
  Work (including but not limited to damages for loss of goodwill,
158
- work stoppage, computer failure or malfunction, or all other
159
- commercial damages or losses), even if such Contributor has been
160
- advised of the possibility of such damages.
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
161
165
 
162
166
  9. Accepting Warranty or Additional Liability. While redistributing
163
- the Work or Derivative Works thereof, You may offer, and charge a
164
- fee for, acceptance of support, warranty, indemnity, or other
165
- liability obligations and/or rights consistent with this License.
166
- However, in accepting such obligations, You may offer such obligations
167
- only on Your own behalf and on Your sole responsibility, not on
168
- behalf of any other Contributor, and only if You agree to indemnify,
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
169
173
  defend, and hold each Contributor harmless for any liability
170
174
  incurred by, or claims asserted against, such Contributor by reason
171
175
  of your accepting any such warranty or additional liability.
172
176
 
173
177
  END OF TERMS AND CONDITIONS
174
178
 
175
- Copyright 2025-2026 Tenuo Contributors
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
176
191
 
177
192
  Licensed under the Apache License, Version 2.0 (the "License");
178
193
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -63,6 +63,10 @@ failure returns the constant "Replay store unavailable"; pass
63
63
  `onNonceStoreError` for the original cause. Unknown option keys, including
64
64
  mixed typos like `{ allow, nonceStroe }`, throw at register time.
65
65
 
66
+ A minimal runnable version of the above, with an in-memory v2 client and
67
+ server, one allowed call, and one denied call, lives in
68
+ [`examples/v2`](examples/v2/README.md). From `tenuo-ts`: `pnpm example:mcp:v2`.
69
+
66
70
  There is no FastMCP adapter and no v1 adapter package. For
67
71
  `@modelcontextprotocol/sdk` v1, copy the recipe in
68
72
  `packages/core/examples/mcp/host.ts`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tenuo/mcp",
3
- "version": "0.3.0-beta.0",
4
- "description": "Optional adapter: guard @modelcontextprotocol/server v2 tools with @tenuo/core.",
3
+ "version": "0.3.2-beta.0",
4
+ "description": "Per-call, argument-level authorization for Model Context Protocol (MCP) servers: guard @modelcontextprotocol/server v2 tools with Tenuo warrants (beta).",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Tenuo Contributors",
7
7
  "homepage": "https://github.com/tenuo-ai/tenuo/tree/main/tenuo-ts/packages/mcp",
@@ -16,8 +16,14 @@
16
16
  "keywords": [
17
17
  "tenuo",
18
18
  "mcp",
19
- "modelcontextprotocol",
20
- "authorization"
19
+ "model-context-protocol",
20
+ "mcp-server",
21
+ "authorization",
22
+ "ai-agents",
23
+ "agent-security",
24
+ "access-control",
25
+ "warrants",
26
+ "prompt-injection"
21
27
  ],
22
28
  "publishConfig": {
23
29
  "access": "public"
@@ -51,7 +57,7 @@
51
57
  },
52
58
  "peerDependencies": {
53
59
  "@modelcontextprotocol/server": "^2.0.0",
54
- "@tenuo/core": ">=0.3.0-beta.0 <0.3.1"
60
+ "@tenuo/core": ">=0.3.2-beta.0 <0.3.3"
55
61
  },
56
62
  "devDependencies": {
57
63
  "@modelcontextprotocol/client": "2.0.0",