integrate-sdk 0.7.44 → 0.7.46

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.
@@ -1 +1 @@
1
- {"version":3,"file":"vercel-ai.d.ts","sourceRoot":"","sources":["../../../src/ai/vercel-ai.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;CAAI;AAEhE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,YAAY,CAQd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EA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;;;;;;;;;;;GAmDG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,gCAkB/B"}
@@ -4208,7 +4208,10 @@ function convertMCPToolToVercelAI(mcpTool, client, options) {
4208
4208
  description: mcpTool.description || `Execute ${mcpTool.name}`,
4209
4209
  inputSchema: jsonSchemaToZod(mcpTool.inputSchema),
4210
4210
  execute: async (args) => {
4211
- return await executeToolWithToken(client, mcpTool.name, args, options);
4211
+ if (options?.providerTokens) {
4212
+ return await executeToolWithToken(client, mcpTool.name, args, options);
4213
+ }
4214
+ return await client._callToolByName(mcpTool.name, args, options?.context ? { context: options.context } : undefined);
4212
4215
  }
4213
4216
  };
4214
4217
  }
package/dist/index.js CHANGED
@@ -938,10 +938,10 @@ class OAuthManager {
938
938
  this.providerTokens.delete(provider);
939
939
  this.clearProviderToken(provider);
940
940
  }
941
- async getProviderToken(provider) {
941
+ async getProviderToken(provider, context) {
942
942
  if (this.getTokenCallback) {
943
943
  try {
944
- const tokenData = await this.getTokenCallback(provider);
944
+ const tokenData = await this.getTokenCallback(provider, context);
945
945
  if (tokenData) {
946
946
  this.providerTokens.set(provider, tokenData);
947
947
  }
@@ -956,9 +956,9 @@ class OAuthManager {
956
956
  getAllProviderTokens() {
957
957
  return new Map(this.providerTokens);
958
958
  }
959
- async setProviderToken(provider, tokenData) {
959
+ async setProviderToken(provider, tokenData, context) {
960
960
  this.providerTokens.set(provider, tokenData);
961
- await this.saveProviderToken(provider, tokenData);
961
+ await this.saveProviderToken(provider, tokenData, context);
962
962
  }
963
963
  clearProviderToken(provider) {
964
964
  this.providerTokens.delete(provider);
@@ -1001,10 +1001,10 @@ class OAuthManager {
1001
1001
  }
1002
1002
  }
1003
1003
  }
1004
- async saveProviderToken(provider, tokenData) {
1004
+ async saveProviderToken(provider, tokenData, context) {
1005
1005
  if (this.setTokenCallback) {
1006
1006
  try {
1007
- await this.setTokenCallback(provider, tokenData);
1007
+ await this.setTokenCallback(provider, tokenData, context);
1008
1008
  } catch (error) {
1009
1009
  console.error(`Failed to save token for ${provider} via callback:`, error);
1010
1010
  throw error;
@@ -1293,9 +1293,9 @@ class MCPClientBase {
1293
1293
  }
1294
1294
  return new Proxy({}, {
1295
1295
  get: (_target, methodName) => {
1296
- return async (args) => {
1296
+ return async (args, options) => {
1297
1297
  const toolName = methodToToolName(methodName, integrationId);
1298
- return await this.callToolWithRetry(toolName, args, 0);
1298
+ return await this.callToolWithRetry(toolName, args, 0, options);
1299
1299
  };
1300
1300
  }
1301
1301
  });
@@ -1303,17 +1303,17 @@ class MCPClientBase {
1303
1303
  createServerProxy() {
1304
1304
  return new Proxy({}, {
1305
1305
  get: (_target, methodName) => {
1306
- return async (args) => {
1306
+ return async (args, options) => {
1307
1307
  const toolName = methodToToolName(methodName, "");
1308
1308
  const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
1309
- return await this.callServerToolInternal(finalToolName, args);
1309
+ return await this.callServerToolInternal(finalToolName, args, options);
1310
1310
  };
1311
1311
  }
1312
1312
  });
1313
1313
  }
1314
- async callServerToolInternal(name, args) {
1314
+ async callServerToolInternal(name, args, options) {
1315
1315
  try {
1316
- const response = await this.callToolThroughHandler(name, args);
1316
+ const response = await this.callToolThroughHandler(name, args, undefined, options);
1317
1317
  return response;
1318
1318
  } catch (error) {
1319
1319
  const parsedError = parseServerError(error, { toolName: name });
@@ -1362,8 +1362,8 @@ class MCPClientBase {
1362
1362
  const enabledTools = response.tools.filter((tool) => this.enabledToolNames.has(tool.name));
1363
1363
  console.log(`Discovered ${response.tools.length} tools, ${enabledTools.length} enabled by integrations`);
1364
1364
  }
1365
- async _callToolByName(name, args) {
1366
- return await this.callToolWithRetry(name, args, 0);
1365
+ async _callToolByName(name, args, options) {
1366
+ return await this.callToolWithRetry(name, args, 0, options);
1367
1367
  }
1368
1368
  async callServerTool(name, args) {
1369
1369
  try {
@@ -1374,12 +1374,12 @@ class MCPClientBase {
1374
1374
  throw parsedError;
1375
1375
  }
1376
1376
  }
1377
- async callToolThroughHandler(name, args, provider) {
1377
+ async callToolThroughHandler(name, args, provider, options) {
1378
1378
  const transportHeaders = this.transport.headers || {};
1379
1379
  const hasApiKey = !!transportHeaders["X-API-KEY"];
1380
1380
  if (hasApiKey) {
1381
1381
  if (provider) {
1382
- const tokenData = await this.oauthManager.getProviderToken(provider);
1382
+ const tokenData = await this.oauthManager.getProviderToken(provider, options?.context);
1383
1383
  if (tokenData && this.transport.setHeader) {
1384
1384
  const previousAuthHeader = transportHeaders["Authorization"];
1385
1385
  try {
@@ -1409,7 +1409,7 @@ class MCPClientBase {
1409
1409
  "Content-Type": "application/json"
1410
1410
  };
1411
1411
  if (provider) {
1412
- const tokenData = await this.oauthManager.getProviderToken(provider);
1412
+ const tokenData = await this.oauthManager.getProviderToken(provider, options?.context);
1413
1413
  if (tokenData) {
1414
1414
  headers["Authorization"] = `Bearer ${tokenData.accessToken}`;
1415
1415
  }
@@ -1447,13 +1447,13 @@ class MCPClientBase {
1447
1447
  const result = await response.json();
1448
1448
  return result;
1449
1449
  }
1450
- async callToolWithRetry(name, args, retryCount = 0) {
1450
+ async callToolWithRetry(name, args, retryCount = 0, options) {
1451
1451
  if (!this.enabledToolNames.has(name)) {
1452
1452
  throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate integration.`);
1453
1453
  }
1454
1454
  const provider = this.getProviderForTool(name);
1455
1455
  try {
1456
- const response = await this.callToolThroughHandler(name, args, provider);
1456
+ const response = await this.callToolThroughHandler(name, args, provider, options);
1457
1457
  if (provider) {
1458
1458
  this.authState.set(provider, { authenticated: true });
1459
1459
  }
@@ -1635,11 +1635,11 @@ class MCPClientBase {
1635
1635
  throw error;
1636
1636
  }
1637
1637
  }
1638
- async getProviderToken(provider) {
1639
- return await this.oauthManager.getProviderToken(provider);
1638
+ async getProviderToken(provider, context) {
1639
+ return await this.oauthManager.getProviderToken(provider, context);
1640
1640
  }
1641
- async setProviderToken(provider, tokenData) {
1642
- await this.oauthManager.setProviderToken(provider, tokenData);
1641
+ async setProviderToken(provider, tokenData, context) {
1642
+ await this.oauthManager.setProviderToken(provider, tokenData, context);
1643
1643
  this.authState.set(provider, { authenticated: true });
1644
1644
  }
1645
1645
  getAllProviderTokens() {
package/dist/server.js CHANGED
@@ -931,10 +931,10 @@ class OAuthManager {
931
931
  this.providerTokens.delete(provider);
932
932
  this.clearProviderToken(provider);
933
933
  }
934
- async getProviderToken(provider) {
934
+ async getProviderToken(provider, context) {
935
935
  if (this.getTokenCallback) {
936
936
  try {
937
- const tokenData = await this.getTokenCallback(provider);
937
+ const tokenData = await this.getTokenCallback(provider, context);
938
938
  if (tokenData) {
939
939
  this.providerTokens.set(provider, tokenData);
940
940
  }
@@ -949,9 +949,9 @@ class OAuthManager {
949
949
  getAllProviderTokens() {
950
950
  return new Map(this.providerTokens);
951
951
  }
952
- async setProviderToken(provider, tokenData) {
952
+ async setProviderToken(provider, tokenData, context) {
953
953
  this.providerTokens.set(provider, tokenData);
954
- await this.saveProviderToken(provider, tokenData);
954
+ await this.saveProviderToken(provider, tokenData, context);
955
955
  }
956
956
  clearProviderToken(provider) {
957
957
  this.providerTokens.delete(provider);
@@ -994,10 +994,10 @@ class OAuthManager {
994
994
  }
995
995
  }
996
996
  }
997
- async saveProviderToken(provider, tokenData) {
997
+ async saveProviderToken(provider, tokenData, context) {
998
998
  if (this.setTokenCallback) {
999
999
  try {
1000
- await this.setTokenCallback(provider, tokenData);
1000
+ await this.setTokenCallback(provider, tokenData, context);
1001
1001
  } catch (error) {
1002
1002
  console.error(`Failed to save token for ${provider} via callback:`, error);
1003
1003
  throw error;
@@ -1284,9 +1284,9 @@ class MCPClientBase {
1284
1284
  }
1285
1285
  return new Proxy({}, {
1286
1286
  get: (_target, methodName) => {
1287
- return async (args) => {
1287
+ return async (args, options) => {
1288
1288
  const toolName = methodToToolName(methodName, integrationId);
1289
- return await this.callToolWithRetry(toolName, args, 0);
1289
+ return await this.callToolWithRetry(toolName, args, 0, options);
1290
1290
  };
1291
1291
  }
1292
1292
  });
@@ -1294,17 +1294,17 @@ class MCPClientBase {
1294
1294
  createServerProxy() {
1295
1295
  return new Proxy({}, {
1296
1296
  get: (_target, methodName) => {
1297
- return async (args) => {
1297
+ return async (args, options) => {
1298
1298
  const toolName = methodToToolName(methodName, "");
1299
1299
  const finalToolName = toolName.startsWith("_") ? toolName.substring(1) : toolName;
1300
- return await this.callServerToolInternal(finalToolName, args);
1300
+ return await this.callServerToolInternal(finalToolName, args, options);
1301
1301
  };
1302
1302
  }
1303
1303
  });
1304
1304
  }
1305
- async callServerToolInternal(name, args) {
1305
+ async callServerToolInternal(name, args, options) {
1306
1306
  try {
1307
- const response = await this.callToolThroughHandler(name, args);
1307
+ const response = await this.callToolThroughHandler(name, args, undefined, options);
1308
1308
  return response;
1309
1309
  } catch (error) {
1310
1310
  const parsedError = parseServerError(error, { toolName: name });
@@ -1353,8 +1353,8 @@ class MCPClientBase {
1353
1353
  const enabledTools = response.tools.filter((tool) => this.enabledToolNames.has(tool.name));
1354
1354
  console.log(`Discovered ${response.tools.length} tools, ${enabledTools.length} enabled by integrations`);
1355
1355
  }
1356
- async _callToolByName(name, args) {
1357
- return await this.callToolWithRetry(name, args, 0);
1356
+ async _callToolByName(name, args, options) {
1357
+ return await this.callToolWithRetry(name, args, 0, options);
1358
1358
  }
1359
1359
  async callServerTool(name, args) {
1360
1360
  try {
@@ -1365,12 +1365,12 @@ class MCPClientBase {
1365
1365
  throw parsedError;
1366
1366
  }
1367
1367
  }
1368
- async callToolThroughHandler(name, args, provider) {
1368
+ async callToolThroughHandler(name, args, provider, options) {
1369
1369
  const transportHeaders = this.transport.headers || {};
1370
1370
  const hasApiKey = !!transportHeaders["X-API-KEY"];
1371
1371
  if (hasApiKey) {
1372
1372
  if (provider) {
1373
- const tokenData = await this.oauthManager.getProviderToken(provider);
1373
+ const tokenData = await this.oauthManager.getProviderToken(provider, options?.context);
1374
1374
  if (tokenData && this.transport.setHeader) {
1375
1375
  const previousAuthHeader = transportHeaders["Authorization"];
1376
1376
  try {
@@ -1400,7 +1400,7 @@ class MCPClientBase {
1400
1400
  "Content-Type": "application/json"
1401
1401
  };
1402
1402
  if (provider) {
1403
- const tokenData = await this.oauthManager.getProviderToken(provider);
1403
+ const tokenData = await this.oauthManager.getProviderToken(provider, options?.context);
1404
1404
  if (tokenData) {
1405
1405
  headers["Authorization"] = `Bearer ${tokenData.accessToken}`;
1406
1406
  }
@@ -1438,13 +1438,13 @@ class MCPClientBase {
1438
1438
  const result = await response.json();
1439
1439
  return result;
1440
1440
  }
1441
- async callToolWithRetry(name, args, retryCount = 0) {
1441
+ async callToolWithRetry(name, args, retryCount = 0, options) {
1442
1442
  if (!this.enabledToolNames.has(name)) {
1443
1443
  throw new Error(`Tool "${name}" is not enabled. Enable it by adding the appropriate integration.`);
1444
1444
  }
1445
1445
  const provider = this.getProviderForTool(name);
1446
1446
  try {
1447
- const response = await this.callToolThroughHandler(name, args, provider);
1447
+ const response = await this.callToolThroughHandler(name, args, provider, options);
1448
1448
  if (provider) {
1449
1449
  this.authState.set(provider, { authenticated: true });
1450
1450
  }
@@ -1626,11 +1626,11 @@ class MCPClientBase {
1626
1626
  throw error;
1627
1627
  }
1628
1628
  }
1629
- async getProviderToken(provider) {
1630
- return await this.oauthManager.getProviderToken(provider);
1629
+ async getProviderToken(provider, context) {
1630
+ return await this.oauthManager.getProviderToken(provider, context);
1631
1631
  }
1632
- async setProviderToken(provider, tokenData) {
1633
- await this.oauthManager.setProviderToken(provider, tokenData);
1632
+ async setProviderToken(provider, tokenData, context) {
1633
+ await this.oauthManager.setProviderToken(provider, tokenData, context);
1634
1634
  this.authState.set(provider, { authenticated: true });
1635
1635
  }
1636
1636
  getAllProviderTokens() {
@@ -6523,7 +6523,10 @@ function convertMCPToolToVercelAI(mcpTool, client, options) {
6523
6523
  description: mcpTool.description || `Execute ${mcpTool.name}`,
6524
6524
  inputSchema: jsonSchemaToZod(mcpTool.inputSchema),
6525
6525
  execute: async (args) => {
6526
- return await executeToolWithToken(client, mcpTool.name, args, options);
6526
+ if (options?.providerTokens) {
6527
+ return await executeToolWithToken(client, mcpTool.name, args, options);
6528
+ }
6529
+ return await client._callToolByName(mcpTool.name, args, options?.context ? { context: options.context } : undefined);
6527
6530
  }
6528
6531
  };
6529
6532
  }
@@ -6694,19 +6697,22 @@ async function handleAnthropicMessage(client, message, options) {
6694
6697
  ];
6695
6698
  }
6696
6699
  // src/ai/google.ts
6697
- import { Type } from "@google/genai";
6698
- function convertJsonSchemaTypeToGoogleType(type) {
6700
+ async function getGoogleType() {
6701
+ const { Type } = await import("@google/genai");
6702
+ return Type;
6703
+ }
6704
+ function convertJsonSchemaTypeToGoogleType(type, TypeEnum) {
6699
6705
  const typeMap = {
6700
- string: Type.STRING,
6701
- number: Type.NUMBER,
6702
- integer: Type.INTEGER,
6703
- boolean: Type.BOOLEAN,
6704
- array: Type.ARRAY,
6705
- object: Type.OBJECT
6706
+ string: TypeEnum.STRING,
6707
+ number: TypeEnum.NUMBER,
6708
+ integer: TypeEnum.INTEGER,
6709
+ boolean: TypeEnum.BOOLEAN,
6710
+ array: TypeEnum.ARRAY,
6711
+ object: TypeEnum.OBJECT
6706
6712
  };
6707
- return typeMap[type.toLowerCase()] || Type.STRING;
6713
+ return typeMap[type.toLowerCase()] || TypeEnum.STRING;
6708
6714
  }
6709
- function convertPropertiesToSchema(properties) {
6715
+ function convertPropertiesToSchema(properties, TypeEnum) {
6710
6716
  const result = {};
6711
6717
  for (const [key, value] of Object.entries(properties)) {
6712
6718
  if (!value || typeof value !== "object") {
@@ -6718,13 +6724,13 @@ function convertPropertiesToSchema(properties) {
6718
6724
  enum: value.enum
6719
6725
  };
6720
6726
  if (value.type) {
6721
- schema.type = convertJsonSchemaTypeToGoogleType(value.type);
6727
+ schema.type = convertJsonSchemaTypeToGoogleType(value.type, TypeEnum);
6722
6728
  }
6723
6729
  if (value.items) {
6724
- schema.items = convertPropertiesToSchema({ items: value.items }).items;
6730
+ schema.items = convertPropertiesToSchema({ items: value.items }, TypeEnum).items;
6725
6731
  }
6726
6732
  if (value.properties) {
6727
- schema.properties = convertPropertiesToSchema(value.properties);
6733
+ schema.properties = convertPropertiesToSchema(value.properties, TypeEnum);
6728
6734
  }
6729
6735
  for (const [k, v] of Object.entries(value)) {
6730
6736
  if (!["type", "description", "enum", "items", "properties"].includes(k)) {
@@ -6735,11 +6741,12 @@ function convertPropertiesToSchema(properties) {
6735
6741
  }
6736
6742
  return result;
6737
6743
  }
6738
- function convertMCPToolToGoogle(mcpTool, _client, _options) {
6744
+ async function convertMCPToolToGoogle(mcpTool, _client, _options) {
6745
+ const TypeEnum = await getGoogleType();
6739
6746
  const properties = mcpTool.inputSchema?.properties || {};
6740
- const convertedProperties = convertPropertiesToSchema(properties);
6747
+ const convertedProperties = convertPropertiesToSchema(properties, TypeEnum);
6741
6748
  const parameters = {
6742
- type: Type.OBJECT,
6749
+ type: TypeEnum.OBJECT,
6743
6750
  description: mcpTool.description || "",
6744
6751
  properties: convertedProperties
6745
6752
  };
@@ -6752,9 +6759,9 @@ function convertMCPToolToGoogle(mcpTool, _client, _options) {
6752
6759
  parameters
6753
6760
  };
6754
6761
  }
6755
- function convertMCPToolsToGoogle(client, options) {
6762
+ async function convertMCPToolsToGoogle(client, options) {
6756
6763
  const mcpTools = client.getEnabledTools();
6757
- return mcpTools.map((mcpTool) => convertMCPToolToGoogle(mcpTool, client, options));
6764
+ return await Promise.all(mcpTools.map((mcpTool) => convertMCPToolToGoogle(mcpTool, client, options)));
6758
6765
  }
6759
6766
  async function executeGoogleFunctionCall(client, functionCall, options) {
6760
6767
  if (!functionCall?.name) {
@@ -6,8 +6,7 @@
6
6
  import type { MCPClient } from "../client.js";
7
7
  import type { MCPTool } from "../protocol/messages.js";
8
8
  import { type AIToolsOptions } from "./utils.js";
9
- import { Type } from "@google/genai";
10
- import type { Schema, FunctionDeclaration, FunctionCall } from "@google/genai";
9
+ import type { Schema, FunctionDeclaration, FunctionCall, Type } from "@google/genai";
11
10
  export type GoogleTool = FunctionDeclaration;
12
11
  export type GoogleFunctionCall = FunctionCall;
13
12
  export type { Schema, Type };
@@ -26,10 +25,10 @@ export interface GoogleToolsOptions extends AIToolsOptions {
26
25
  *
27
26
  * @example
28
27
  * ```typescript
29
- * const googleTool = convertMCPToolToGoogle(mcpTool, client);
28
+ * const googleTool = await convertMCPToolToGoogle(mcpTool, client);
30
29
  * ```
31
30
  */
32
- export declare function convertMCPToolToGoogle(mcpTool: MCPTool, _client: MCPClient<any>, _options?: GoogleToolsOptions): GoogleTool;
31
+ export declare function convertMCPToolToGoogle(mcpTool: MCPTool, _client: MCPClient<any>, _options?: GoogleToolsOptions): Promise<GoogleTool>;
33
32
  /**
34
33
  * Convert all enabled MCP tools to Google GenAI format
35
34
  *
@@ -40,15 +39,15 @@ export declare function convertMCPToolToGoogle(mcpTool: MCPTool, _client: MCPCli
40
39
  * @example
41
40
  * ```typescript
42
41
  * // Client-side usage
43
- * const tools = convertMCPToolsToGoogle(mcpClient);
42
+ * const tools = await convertMCPToolsToGoogle(mcpClient);
44
43
  *
45
44
  * // Server-side with provider tokens
46
- * const tools = convertMCPToolsToGoogle(serverClient, {
45
+ * const tools = await convertMCPToolsToGoogle(serverClient, {
47
46
  * providerTokens: { github: 'ghp_...', gmail: 'ya29...' }
48
47
  * });
49
48
  * ```
50
49
  */
51
- export declare function convertMCPToolsToGoogle(client: MCPClient<any>, options?: GoogleToolsOptions): GoogleTool[];
50
+ export declare function convertMCPToolsToGoogle(client: MCPClient<any>, options?: GoogleToolsOptions): Promise<GoogleTool[]>;
52
51
  /**
53
52
  * Execute a function call from Google GenAI
54
53
  *
@@ -1 +1 @@
1
- {"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/ai/google.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,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,EACtB,YAAY,EAAE,kBAAkB,EAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,aAAa,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAAG,IAAI,EACtD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAsBnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB"}
@@ -6,6 +6,7 @@
6
6
  import { z } from "zod";
7
7
  import type { MCPClient } from "../client.js";
8
8
  import type { MCPTool } from "../protocol/messages.js";
9
+ import type { MCPContext } from "../config/types.js";
9
10
  import { type AIToolsOptions } from "./utils.js";
10
11
  /**
11
12
  * Tool definition compatible with Vercel AI SDK v5
@@ -20,13 +21,15 @@ export interface VercelAITool {
20
21
  * Options for converting MCP tools to Vercel AI SDK format
21
22
  */
22
23
  export interface VercelAIToolsOptions extends AIToolsOptions {
24
+ /** User context for multi-tenant token storage */
25
+ context?: MCPContext;
23
26
  }
24
27
  /**
25
28
  * Convert a single MCP tool to Vercel AI SDK format
26
29
  *
27
30
  * @param mcpTool - The MCP tool definition
28
31
  * @param client - The MCP client instance (used for executing the tool)
29
- * @param options - Optional configuration including provider tokens
32
+ * @param options - Optional configuration including provider tokens and context
30
33
  * @returns Vercel AI SDK compatible tool definition
31
34
  */
32
35
  export declare function convertMCPToolToVercelAI(mcpTool: MCPTool, client: MCPClient<any>, options?: VercelAIToolsOptions): VercelAITool;
@@ -109,11 +112,12 @@ export declare function convertMCPToolsToVercelAI(client: MCPClient<any>, option
109
112
  *
110
113
  * export async function POST(req: Request) {
111
114
  * const { messages } = await req.json();
115
+ * const userId = await getUserIdFromSession(req);
112
116
  *
113
117
  * const result = streamText({
114
118
  * model: "openai/gpt-4",
115
119
  * messages,
116
- * tools: await getVercelAITools(serverClient), // Tokens auto-extracted
120
+ * tools: await getVercelAITools(serverClient, { context: { userId } }), // Pass user context
117
121
  * });
118
122
  *
119
123
  * return result.toUIMessageStreamResponse();
@@ -1 +1 @@
1
- {"version":3,"file":"vercel-ai.d.ts","sourceRoot":"","sources":["../../../src/ai/vercel-ai.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;CAAI;AAEhE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,YAAY,CAQd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,yBAA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;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,oBAAoB,gCAkB/B"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { MCPTool, MCPToolCallResponse } from "./protocol/messages.js";
6
6
  import type { MCPIntegration, OAuthConfig } from "./integrations/types.js";
7
- import type { MCPClientConfig } from "./config/types.js";
7
+ import type { MCPClientConfig, ToolCallOptions, MCPContext } from "./config/types.js";
8
8
  import { type AuthenticationError } from "./errors.js";
9
9
  import type { GitHubIntegrationClient } from "./integrations/github-client.js";
10
10
  import type { GmailIntegrationClient } from "./integrations/gmail-client.js";
@@ -104,7 +104,7 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
104
104
  * Used by integrations like Vercel AI that need to map from tool names
105
105
  * @internal
106
106
  */
107
- _callToolByName(name: string, args?: Record<string, unknown>): Promise<MCPToolCallResponse>;
107
+ _callToolByName(name: string, args?: Record<string, unknown>, options?: ToolCallOptions): Promise<MCPToolCallResponse>;
108
108
  /**
109
109
  * Call any available tool on the server by name, bypassing integration restrictions
110
110
  * Useful for server-level tools like 'list_tools_by_integration' that don't belong to a specific integration
@@ -353,17 +353,19 @@ export declare class MCPClientBase<TIntegrations extends readonly MCPIntegration
353
353
  * Useful for making direct API calls or storing tokens
354
354
  *
355
355
  * @param provider - Provider name (e.g., 'github', 'gmail')
356
+ * @param context - Optional user context (userId, organizationId, etc.) for multi-tenant apps
356
357
  * @returns Provider token data or undefined if not authorized
357
358
  */
358
- getProviderToken(provider: string): Promise<import('./oauth/types.js').ProviderTokenData | undefined>;
359
+ getProviderToken(provider: string, context?: MCPContext): Promise<import('./oauth/types.js').ProviderTokenData | undefined>;
359
360
  /**
360
361
  * Set provider token manually
361
362
  * Use this if you have an existing provider token
362
363
  *
363
364
  * @param provider - Provider name
364
365
  * @param tokenData - Provider token data
366
+ * @param context - Optional user context (userId, organizationId, etc.) for multi-tenant apps
365
367
  */
366
- setProviderToken(provider: string, tokenData: import('./oauth/types.js').ProviderTokenData): Promise<void>;
368
+ setProviderToken(provider: string, tokenData: import('./oauth/types.js').ProviderTokenData, context?: MCPContext): Promise<void>;
367
369
  /**
368
370
  * Get all provider tokens
369
371
  * Returns a map of provider names to access tokens
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,OAAO,EAEP,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAgE1B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,SAAS,CAAC,EAAE,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