@toolsdk.ai/registry 1.0.132 → 1.0.134

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 (40) hide show
  1. package/dist/api/index.js +4 -0
  2. package/dist/domains/executor/executor-types.d.ts +3 -1
  3. package/dist/domains/executor/local-executor.d.ts +1 -1
  4. package/dist/domains/executor/local-executor.js +3 -3
  5. package/dist/domains/executor/sandbox-executor.d.ts +1 -1
  6. package/dist/domains/executor/sandbox-executor.js +3 -3
  7. package/dist/domains/oauth/__tests__/oauth-handler.test.d.ts +1 -0
  8. package/dist/domains/oauth/__tests__/oauth-handler.test.js +598 -0
  9. package/dist/domains/oauth/__tests__/oauth-session.test.d.ts +1 -0
  10. package/dist/domains/oauth/__tests__/oauth-session.test.js +272 -0
  11. package/dist/domains/oauth/__tests__/oauth-utils.test.d.ts +1 -0
  12. package/dist/domains/oauth/__tests__/oauth-utils.test.js +284 -0
  13. package/dist/domains/oauth/index.d.ts +9 -0
  14. package/dist/domains/oauth/index.js +9 -0
  15. package/dist/domains/oauth/oauth-handler.d.ts +65 -0
  16. package/dist/domains/oauth/oauth-handler.js +355 -0
  17. package/dist/domains/oauth/oauth-route.d.ts +11 -0
  18. package/dist/domains/oauth/oauth-route.js +138 -0
  19. package/dist/domains/oauth/oauth-schema.d.ts +257 -0
  20. package/dist/domains/oauth/oauth-schema.js +119 -0
  21. package/dist/domains/oauth/oauth-session.d.ts +54 -0
  22. package/dist/domains/oauth/oauth-session.js +116 -0
  23. package/dist/domains/oauth/oauth-types.d.ts +148 -0
  24. package/dist/domains/oauth/oauth-types.js +9 -0
  25. package/dist/domains/oauth/oauth-utils.d.ts +99 -0
  26. package/dist/domains/oauth/oauth-utils.js +267 -0
  27. package/dist/domains/package/package-handler.d.ts +2 -2
  28. package/dist/domains/package/package-handler.js +4 -4
  29. package/dist/domains/package/package-route.js +5 -5
  30. package/dist/domains/package/package-schema.d.ts +51 -0
  31. package/dist/domains/package/package-schema.js +17 -0
  32. package/dist/domains/package/package-so.d.ts +6 -2
  33. package/dist/domains/package/package-so.js +4 -3
  34. package/dist/shared/schemas/common-schema.d.ts +52 -0
  35. package/dist/shared/schemas/common-schema.js +7 -0
  36. package/dist/shared/scripts-helpers/index.d.ts +4 -0
  37. package/dist/shared/utils/mcp-client-util.d.ts +1 -1
  38. package/dist/shared/utils/mcp-client-util.js +13 -4
  39. package/package.json +1 -1
  40. package/packages/developer-tools/github-mcp.json +4 -1
@@ -86,12 +86,30 @@ export declare const MCPServerPackageConfigSchema: z.ZodObject<{
86
86
  remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
87
87
  type: z.ZodLiteral<"streamable-http">;
88
88
  url: z.ZodString;
89
+ auth: z.ZodOptional<z.ZodObject<{
90
+ type: z.ZodEnum<["oauth2"]>;
91
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ type: "oauth2";
94
+ scopes?: string[] | undefined;
95
+ }, {
96
+ type: "oauth2";
97
+ scopes?: string[] | undefined;
98
+ }>>;
89
99
  }, "strip", z.ZodTypeAny, {
90
100
  type: "streamable-http";
91
101
  url: string;
102
+ auth?: {
103
+ type: "oauth2";
104
+ scopes?: string[] | undefined;
105
+ } | undefined;
92
106
  }, {
93
107
  type: "streamable-http";
94
108
  url: string;
109
+ auth?: {
110
+ type: "oauth2";
111
+ scopes?: string[] | undefined;
112
+ } | undefined;
95
113
  }>, "many">>;
96
114
  key: z.ZodOptional<z.ZodString>;
97
115
  name: z.ZodOptional<z.ZodString>;
@@ -125,6 +143,10 @@ export declare const MCPServerPackageConfigSchema: z.ZodObject<{
125
143
  remotes?: {
126
144
  type: "streamable-http";
127
145
  url: string;
146
+ auth?: {
147
+ type: "oauth2";
148
+ scopes?: string[] | undefined;
149
+ } | undefined;
128
150
  }[] | undefined;
129
151
  readme?: string | undefined;
130
152
  license?: string | undefined;
@@ -148,6 +170,10 @@ export declare const MCPServerPackageConfigSchema: z.ZodObject<{
148
170
  remotes?: {
149
171
  type: "streamable-http";
150
172
  url: string;
173
+ auth?: {
174
+ type: "oauth2";
175
+ scopes?: string[] | undefined;
176
+ } | undefined;
151
177
  }[] | undefined;
152
178
  readme?: string | undefined;
153
179
  license?: string | undefined;
@@ -168,12 +194,30 @@ export declare const PackageConfigSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
168
194
  remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
169
195
  type: z.ZodLiteral<"streamable-http">;
170
196
  url: z.ZodString;
197
+ auth: z.ZodOptional<z.ZodObject<{
198
+ type: z.ZodEnum<["oauth2"]>;
199
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type: "oauth2";
202
+ scopes?: string[] | undefined;
203
+ }, {
204
+ type: "oauth2";
205
+ scopes?: string[] | undefined;
206
+ }>>;
171
207
  }, "strip", z.ZodTypeAny, {
172
208
  type: "streamable-http";
173
209
  url: string;
210
+ auth?: {
211
+ type: "oauth2";
212
+ scopes?: string[] | undefined;
213
+ } | undefined;
174
214
  }, {
175
215
  type: "streamable-http";
176
216
  url: string;
217
+ auth?: {
218
+ type: "oauth2";
219
+ scopes?: string[] | undefined;
220
+ } | undefined;
177
221
  }>, "many">>;
178
222
  key: z.ZodOptional<z.ZodString>;
179
223
  name: z.ZodOptional<z.ZodString>;
@@ -207,6 +251,10 @@ export declare const PackageConfigSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
207
251
  remotes?: {
208
252
  type: "streamable-http";
209
253
  url: string;
254
+ auth?: {
255
+ type: "oauth2";
256
+ scopes?: string[] | undefined;
257
+ } | undefined;
210
258
  }[] | undefined;
211
259
  readme?: string | undefined;
212
260
  license?: string | undefined;
@@ -230,6 +278,10 @@ export declare const PackageConfigSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
230
278
  remotes?: {
231
279
  type: "streamable-http";
232
280
  url: string;
281
+ auth?: {
282
+ type: "oauth2";
283
+ scopes?: string[] | undefined;
284
+ } | undefined;
233
285
  }[] | undefined;
234
286
  readme?: string | undefined;
235
287
  license?: string | undefined;
@@ -47,6 +47,13 @@ export const MCPServerPackageConfigSchema = z
47
47
  .array(z.object({
48
48
  type: z.literal("streamable-http"),
49
49
  url: z.string().url(),
50
+ auth: z
51
+ .object({
52
+ type: z.enum(["oauth2"]),
53
+ scopes: z.array(z.string()).optional(),
54
+ })
55
+ .optional()
56
+ .describe("OAuth 2.1 authentication configuration for MCP Server"),
50
57
  }))
51
58
  .optional(),
52
59
  // if no custom key then would use name
@@ -36,6 +36,10 @@ export declare function getPackageConfigByKey(key: string): {
36
36
  remotes?: {
37
37
  type: "streamable-http";
38
38
  url: string;
39
+ auth?: {
40
+ type: "oauth2";
41
+ scopes?: string[] | undefined;
42
+ } | undefined;
39
43
  }[] | undefined;
40
44
  readme?: string | undefined;
41
45
  license?: string | undefined;
@@ -2,7 +2,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
2
  import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
3
3
  import type { MCPServerPackageConfig } from "../../domains/package/package-types";
4
4
  export declare function getPackageJSON(packageName: string): any;
5
- export declare function getMcpClient(mcpServerConfig: MCPServerPackageConfig, env?: Record<string, string>): Promise<{
5
+ export declare function getMcpClient(mcpServerConfig: MCPServerPackageConfig, env?: Record<string, string>, accessToken?: string): Promise<{
6
6
  client: Client<{
7
7
  method: string;
8
8
  params?: {
@@ -78,16 +78,25 @@ async function getPyMcpClient(mcpServerConfig, env) {
78
78
  });
79
79
  return createMcpClient(mcpServerConfig, transport);
80
80
  }
81
- async function getRemoteMcpClient(url, mcpServerConfig) {
82
- const transport = new StreamableHTTPClientTransport(new URL(url));
81
+ async function getRemoteMcpClient(url, mcpServerConfig, accessToken) {
82
+ const opts = {};
83
+ // Add OAuth access token to Authorization header if provided
84
+ if (accessToken) {
85
+ opts.requestInit = {
86
+ headers: {
87
+ Authorization: `Bearer ${accessToken}`,
88
+ },
89
+ };
90
+ }
91
+ const transport = new StreamableHTTPClientTransport(new URL(url), opts);
83
92
  return createMcpClient(mcpServerConfig, transport);
84
93
  }
85
- export async function getMcpClient(mcpServerConfig, env) {
94
+ export async function getMcpClient(mcpServerConfig, env, accessToken) {
86
95
  // Check for remotes first
87
96
  if (mcpServerConfig.remotes && mcpServerConfig.remotes.length > 0) {
88
97
  const remote = mcpServerConfig.remotes.find((r) => r.type === "streamable-http");
89
98
  if (remote) {
90
- return getRemoteMcpClient(remote.url, mcpServerConfig);
99
+ return getRemoteMcpClient(remote.url, mcpServerConfig, accessToken);
91
100
  }
92
101
  }
93
102
  const { runtime } = mcpServerConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolsdk.ai/registry",
3
- "version": "1.0.132",
3
+ "version": "1.0.134",
4
4
  "description": "An Open, Structured, and Standard Registry for MCP Servers and Packages.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -9,7 +9,10 @@
9
9
  "remotes": [
10
10
  {
11
11
  "type": "streamable-http",
12
- "url": "http://localhost:3001/mcp"
12
+ "url": "http://localhost:3001/mcp",
13
+ "auth": {
14
+ "type": "oauth2"
15
+ }
13
16
  }
14
17
  ],
15
18
  "name": "Local Remote GitHub MCP Server"