@composio/core 0.1.24 → 0.1.25

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.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  import ComposioClient from '@composio/client';
2
2
  import { z } from 'zod';
3
3
  import { ToolExecuteResponse as ToolExecuteResponse$1, ToolRetrieveEnumResponse, ToolGetInputParams, ToolGetInputResponse, ToolProxyResponse } from '@composio/client/resources/tools';
4
+ import { McpCreateResponse, CustomCreateResponse, GenerateURLResponse, McpListResponse, McpDeleteResponse, McpUpdateResponse, GenerateURLParams } from '@composio/client/resources/mcp';
4
5
  import { TriggersTypeListParams, TriggersTypeListResponse, TriggersTypeRetrieveResponse, TriggersTypeRetrieveEnumResponse } from '@composio/client/resources/index';
5
6
  import { AuthConfigUpdateResponse, AuthConfigDeleteResponse, AuthConfigUpdateStatusResponse } from '@composio/client/resources/auth-configs';
6
7
  import { ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from '@composio/client/resources/connected-accounts';
@@ -9806,12 +9807,731 @@ type ExecuteToolFnOptions = {
9806
9807
  type ExecuteToolFn = (toolSlug: string, input: Record<string, unknown>) => Promise<ToolExecuteResponse>;
9807
9808
  type GlobalExecuteToolFn = (slug: string, body: ToolExecuteParams, modifiers?: ExecuteToolModifiers) => Promise<ToolExecuteResponse>;
9808
9809
 
9810
+ /**
9811
+ * MCP Create Method Input Types
9812
+ */
9813
+ declare const MCPToolkitConfigSchema: z.ZodObject<{
9814
+ toolkit: z.ZodString;
9815
+ authConfigId: z.ZodString;
9816
+ allowedTools: z.ZodArray<z.ZodString, "many">;
9817
+ }, "strip", z.ZodTypeAny, {
9818
+ toolkit: string;
9819
+ authConfigId: string;
9820
+ allowedTools: string[];
9821
+ }, {
9822
+ toolkit: string;
9823
+ authConfigId: string;
9824
+ allowedTools: string[];
9825
+ }>;
9826
+ type MCPToolkitConfig = z.infer<typeof MCPToolkitConfigSchema>;
9827
+ declare const MCPToolkitConfigsArraySchema: z.ZodEffects<z.ZodArray<z.ZodObject<{
9828
+ toolkit: z.ZodString;
9829
+ authConfigId: z.ZodString;
9830
+ allowedTools: z.ZodArray<z.ZodString, "many">;
9831
+ }, "strip", z.ZodTypeAny, {
9832
+ toolkit: string;
9833
+ authConfigId: string;
9834
+ allowedTools: string[];
9835
+ }, {
9836
+ toolkit: string;
9837
+ authConfigId: string;
9838
+ allowedTools: string[];
9839
+ }>, "many">, {
9840
+ toolkit: string;
9841
+ authConfigId: string;
9842
+ allowedTools: string[];
9843
+ }[], {
9844
+ toolkit: string;
9845
+ authConfigId: string;
9846
+ allowedTools: string[];
9847
+ }[]>;
9848
+ declare const MCPAuthOptionsSchema: z.ZodObject<{
9849
+ useComposioManagedAuth: z.ZodOptional<z.ZodBoolean>;
9850
+ }, "strip", z.ZodTypeAny, {
9851
+ useComposioManagedAuth?: boolean | undefined;
9852
+ }, {
9853
+ useComposioManagedAuth?: boolean | undefined;
9854
+ }>;
9855
+ type MCPAuthOptions = z.infer<typeof MCPAuthOptionsSchema>;
9856
+ declare const MCPGetServerParamsSchema: z.ZodEffects<z.ZodObject<{
9857
+ userId: z.ZodOptional<z.ZodString>;
9858
+ connectedAccountIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9859
+ }, "strip", z.ZodTypeAny, {
9860
+ userId?: string | undefined;
9861
+ connectedAccountIds?: Record<string, string> | undefined;
9862
+ }, {
9863
+ userId?: string | undefined;
9864
+ connectedAccountIds?: Record<string, string> | undefined;
9865
+ }>, {
9866
+ userId?: string | undefined;
9867
+ connectedAccountIds?: Record<string, string> | undefined;
9868
+ }, {
9869
+ userId?: string | undefined;
9870
+ connectedAccountIds?: Record<string, string> | undefined;
9871
+ }>;
9872
+ type MCPGetServerParams = z.infer<typeof MCPGetServerParamsSchema>;
9873
+ type MCPInstanceParams = {
9874
+ serverId: string;
9875
+ userIds?: string[];
9876
+ connectedAccountIds?: string[];
9877
+ useComposioManagedAuth?: boolean;
9878
+ };
9879
+ declare const MCPGenerateURLParamsSchema: z.ZodObject<{
9880
+ userIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9881
+ connectedAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9882
+ useComposioManagedAuth: z.ZodOptional<z.ZodBoolean>;
9883
+ }, "strip", z.ZodTypeAny, {
9884
+ userIds?: string[] | undefined;
9885
+ useComposioManagedAuth?: boolean | undefined;
9886
+ connectedAccountIds?: string[] | undefined;
9887
+ }, {
9888
+ userIds?: string[] | undefined;
9889
+ useComposioManagedAuth?: boolean | undefined;
9890
+ connectedAccountIds?: string[] | undefined;
9891
+ }>;
9892
+ type MCPGenerateURLParams = z.infer<typeof MCPGenerateURLParamsSchema>;
9893
+ declare const GenerateURLParamsSnakeCaseSchema: z.ZodObject<{
9894
+ user_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9895
+ connected_account_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9896
+ mcp_server_id: z.ZodString;
9897
+ managed_auth_by_composio: z.ZodOptional<z.ZodBoolean>;
9898
+ }, "strip", z.ZodTypeAny, {
9899
+ mcp_server_id: string;
9900
+ user_ids?: string[] | undefined;
9901
+ connected_account_ids?: string[] | undefined;
9902
+ managed_auth_by_composio?: boolean | undefined;
9903
+ }, {
9904
+ mcp_server_id: string;
9905
+ user_ids?: string[] | undefined;
9906
+ connected_account_ids?: string[] | undefined;
9907
+ managed_auth_by_composio?: boolean | undefined;
9908
+ }>;
9909
+ declare const GenerateURLParamsSchema: z.ZodObject<{
9910
+ userIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9911
+ connectedAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9912
+ mcpServerId: z.ZodString;
9913
+ managedAuthByComposio: z.ZodOptional<z.ZodBoolean>;
9914
+ }, "strip", z.ZodTypeAny, {
9915
+ mcpServerId: string;
9916
+ userIds?: string[] | undefined;
9917
+ connectedAccountIds?: string[] | undefined;
9918
+ managedAuthByComposio?: boolean | undefined;
9919
+ }, {
9920
+ mcpServerId: string;
9921
+ userIds?: string[] | undefined;
9922
+ connectedAccountIds?: string[] | undefined;
9923
+ managedAuthByComposio?: boolean | undefined;
9924
+ }>;
9925
+ type GenerateURLParamsValidated = z.infer<typeof GenerateURLParamsSchema>;
9926
+ declare const GenerateURLResponseCamelCaseSchema: z.ZodObject<{
9927
+ connectedAccountUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9928
+ userIdsUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9929
+ mcpUrl: z.ZodString;
9930
+ }, "strip", z.ZodTypeAny, {
9931
+ mcpUrl: string;
9932
+ connectedAccountUrls?: string[] | undefined;
9933
+ userIdsUrl?: string[] | undefined;
9934
+ }, {
9935
+ mcpUrl: string;
9936
+ connectedAccountUrls?: string[] | undefined;
9937
+ userIdsUrl?: string[] | undefined;
9938
+ }>;
9939
+ declare const GenerateURLResponseSchema: z.ZodObject<{
9940
+ connected_account_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9941
+ user_ids_url: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9942
+ mcp_url: z.ZodString;
9943
+ }, "strip", z.ZodTypeAny, {
9944
+ mcp_url: string;
9945
+ connected_account_urls?: string[] | undefined;
9946
+ user_ids_url?: string[] | undefined;
9947
+ }, {
9948
+ mcp_url: string;
9949
+ connected_account_urls?: string[] | undefined;
9950
+ user_ids_url?: string[] | undefined;
9951
+ }>;
9952
+ type GenerateURLResponseValidated = z.infer<typeof GenerateURLResponseCamelCaseSchema>;
9953
+ /**
9954
+ * MCP Server Type (Single App)
9955
+ */
9956
+ declare const MCPSingleAppServerSchema: z.ZodObject<{
9957
+ name: z.ZodString;
9958
+ tools: z.ZodArray<z.ZodString, "many">;
9959
+ authConfigId: z.ZodOptional<z.ZodString>;
9960
+ }, "strip", z.ZodTypeAny, {
9961
+ name: string;
9962
+ tools: string[];
9963
+ authConfigId?: string | undefined;
9964
+ }, {
9965
+ name: string;
9966
+ tools: string[];
9967
+ authConfigId?: string | undefined;
9968
+ }>;
9969
+ type MCPSingleAppServer = z.infer<typeof MCPSingleAppServerSchema>;
9970
+ /**
9971
+ * MCP Server Type (Multi App)
9972
+ */
9973
+ declare const MCPMultiAppServerSchema: z.ZodObject<{
9974
+ name: z.ZodString;
9975
+ tools: z.ZodArray<z.ZodString, "many">;
9976
+ toolkits: z.ZodArray<z.ZodString, "many">;
9977
+ }, "strip", z.ZodTypeAny, {
9978
+ name: string;
9979
+ tools: string[];
9980
+ toolkits: string[];
9981
+ }, {
9982
+ name: string;
9983
+ tools: string[];
9984
+ toolkits: string[];
9985
+ }>;
9986
+ type MCPMultiAppServer = z.infer<typeof MCPMultiAppServerSchema>;
9987
+ /**
9988
+ * MCP Server Type (Combined)
9989
+ */
9990
+ declare const MCPServerSchema: z.ZodObject<{
9991
+ id: z.ZodString;
9992
+ type: z.ZodEnum<["single", "multi"]>;
9993
+ createdAt: z.ZodString;
9994
+ updatedAt: z.ZodString;
9995
+ status: z.ZodDefault<z.ZodEnum<["active", "inactive", "error"]>>;
9996
+ config: z.ZodUnion<[z.ZodObject<{
9997
+ name: z.ZodString;
9998
+ tools: z.ZodArray<z.ZodString, "many">;
9999
+ authConfigId: z.ZodOptional<z.ZodString>;
10000
+ }, "strip", z.ZodTypeAny, {
10001
+ name: string;
10002
+ tools: string[];
10003
+ authConfigId?: string | undefined;
10004
+ }, {
10005
+ name: string;
10006
+ tools: string[];
10007
+ authConfigId?: string | undefined;
10008
+ }>, z.ZodObject<{
10009
+ name: z.ZodString;
10010
+ tools: z.ZodArray<z.ZodString, "many">;
10011
+ toolkits: z.ZodArray<z.ZodString, "many">;
10012
+ }, "strip", z.ZodTypeAny, {
10013
+ name: string;
10014
+ tools: string[];
10015
+ toolkits: string[];
10016
+ }, {
10017
+ name: string;
10018
+ tools: string[];
10019
+ toolkits: string[];
10020
+ }>]>;
10021
+ }, "strip", z.ZodTypeAny, {
10022
+ type: "single" | "multi";
10023
+ status: "error" | "active" | "inactive";
10024
+ id: string;
10025
+ createdAt: string;
10026
+ config: {
10027
+ name: string;
10028
+ tools: string[];
10029
+ authConfigId?: string | undefined;
10030
+ } | {
10031
+ name: string;
10032
+ tools: string[];
10033
+ toolkits: string[];
10034
+ };
10035
+ updatedAt: string;
10036
+ }, {
10037
+ type: "single" | "multi";
10038
+ id: string;
10039
+ createdAt: string;
10040
+ config: {
10041
+ name: string;
10042
+ tools: string[];
10043
+ authConfigId?: string | undefined;
10044
+ } | {
10045
+ name: string;
10046
+ tools: string[];
10047
+ toolkits: string[];
10048
+ };
10049
+ updatedAt: string;
10050
+ status?: "error" | "active" | "inactive" | undefined;
10051
+ }>;
10052
+ type MCPServer = z.infer<typeof MCPServerSchema>;
10053
+ /**
10054
+ * MCP Server List Response
10055
+ */
10056
+ declare const MCPServerListResponseSchema: z.ZodObject<{
10057
+ items: z.ZodArray<z.ZodObject<{
10058
+ id: z.ZodString;
10059
+ type: z.ZodEnum<["single", "multi"]>;
10060
+ createdAt: z.ZodString;
10061
+ updatedAt: z.ZodString;
10062
+ status: z.ZodDefault<z.ZodEnum<["active", "inactive", "error"]>>;
10063
+ config: z.ZodUnion<[z.ZodObject<{
10064
+ name: z.ZodString;
10065
+ tools: z.ZodArray<z.ZodString, "many">;
10066
+ authConfigId: z.ZodOptional<z.ZodString>;
10067
+ }, "strip", z.ZodTypeAny, {
10068
+ name: string;
10069
+ tools: string[];
10070
+ authConfigId?: string | undefined;
10071
+ }, {
10072
+ name: string;
10073
+ tools: string[];
10074
+ authConfigId?: string | undefined;
10075
+ }>, z.ZodObject<{
10076
+ name: z.ZodString;
10077
+ tools: z.ZodArray<z.ZodString, "many">;
10078
+ toolkits: z.ZodArray<z.ZodString, "many">;
10079
+ }, "strip", z.ZodTypeAny, {
10080
+ name: string;
10081
+ tools: string[];
10082
+ toolkits: string[];
10083
+ }, {
10084
+ name: string;
10085
+ tools: string[];
10086
+ toolkits: string[];
10087
+ }>]>;
10088
+ }, "strip", z.ZodTypeAny, {
10089
+ type: "single" | "multi";
10090
+ status: "error" | "active" | "inactive";
10091
+ id: string;
10092
+ createdAt: string;
10093
+ config: {
10094
+ name: string;
10095
+ tools: string[];
10096
+ authConfigId?: string | undefined;
10097
+ } | {
10098
+ name: string;
10099
+ tools: string[];
10100
+ toolkits: string[];
10101
+ };
10102
+ updatedAt: string;
10103
+ }, {
10104
+ type: "single" | "multi";
10105
+ id: string;
10106
+ createdAt: string;
10107
+ config: {
10108
+ name: string;
10109
+ tools: string[];
10110
+ authConfigId?: string | undefined;
10111
+ } | {
10112
+ name: string;
10113
+ tools: string[];
10114
+ toolkits: string[];
10115
+ };
10116
+ updatedAt: string;
10117
+ status?: "error" | "active" | "inactive" | undefined;
10118
+ }>, "many">;
10119
+ total: z.ZodNumber;
10120
+ page: z.ZodNumber;
10121
+ pageSize: z.ZodNumber;
10122
+ }, "strip", z.ZodTypeAny, {
10123
+ items: {
10124
+ type: "single" | "multi";
10125
+ status: "error" | "active" | "inactive";
10126
+ id: string;
10127
+ createdAt: string;
10128
+ config: {
10129
+ name: string;
10130
+ tools: string[];
10131
+ authConfigId?: string | undefined;
10132
+ } | {
10133
+ name: string;
10134
+ tools: string[];
10135
+ toolkits: string[];
10136
+ };
10137
+ updatedAt: string;
10138
+ }[];
10139
+ total: number;
10140
+ page: number;
10141
+ pageSize: number;
10142
+ }, {
10143
+ items: {
10144
+ type: "single" | "multi";
10145
+ id: string;
10146
+ createdAt: string;
10147
+ config: {
10148
+ name: string;
10149
+ tools: string[];
10150
+ authConfigId?: string | undefined;
10151
+ } | {
10152
+ name: string;
10153
+ tools: string[];
10154
+ toolkits: string[];
10155
+ };
10156
+ updatedAt: string;
10157
+ status?: "error" | "active" | "inactive" | undefined;
10158
+ }[];
10159
+ total: number;
10160
+ page: number;
10161
+ pageSize: number;
10162
+ }>;
10163
+ type MCPServerListResponse = z.infer<typeof MCPServerListResponseSchema>;
10164
+ /**
10165
+ * MCP Server Update Parameters
10166
+ */
10167
+ declare const MCPServerUpdateParamsSchema: z.ZodObject<{
10168
+ name: z.ZodOptional<z.ZodString>;
10169
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10170
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10171
+ }, "strip", z.ZodTypeAny, {
10172
+ name?: string | undefined;
10173
+ toolkits?: string[] | undefined;
10174
+ allowedTools?: string[] | undefined;
10175
+ }, {
10176
+ name?: string | undefined;
10177
+ toolkits?: string[] | undefined;
10178
+ allowedTools?: string[] | undefined;
10179
+ }>;
10180
+ type MCPServerUpdateParams = z.infer<typeof MCPServerUpdateParamsSchema>;
10181
+ /**
10182
+ * MCP Server Create Response
10183
+ */
10184
+ declare const MCPServerCreateResponseSchema: z.ZodObject<{
10185
+ id: z.ZodString;
10186
+ type: z.ZodEnum<["single", "multi"]>;
10187
+ createdAt: z.ZodString;
10188
+ updatedAt: z.ZodString;
10189
+ status: z.ZodDefault<z.ZodEnum<["active", "inactive", "error"]>>;
10190
+ config: z.ZodUnion<[z.ZodObject<{
10191
+ name: z.ZodString;
10192
+ tools: z.ZodArray<z.ZodString, "many">;
10193
+ authConfigId: z.ZodOptional<z.ZodString>;
10194
+ }, "strip", z.ZodTypeAny, {
10195
+ name: string;
10196
+ tools: string[];
10197
+ authConfigId?: string | undefined;
10198
+ }, {
10199
+ name: string;
10200
+ tools: string[];
10201
+ authConfigId?: string | undefined;
10202
+ }>, z.ZodObject<{
10203
+ name: z.ZodString;
10204
+ tools: z.ZodArray<z.ZodString, "many">;
10205
+ toolkits: z.ZodArray<z.ZodString, "many">;
10206
+ }, "strip", z.ZodTypeAny, {
10207
+ name: string;
10208
+ tools: string[];
10209
+ toolkits: string[];
10210
+ }, {
10211
+ name: string;
10212
+ tools: string[];
10213
+ toolkits: string[];
10214
+ }>]>;
10215
+ }, "strip", z.ZodTypeAny, {
10216
+ type: "single" | "multi";
10217
+ status: "error" | "active" | "inactive";
10218
+ id: string;
10219
+ createdAt: string;
10220
+ config: {
10221
+ name: string;
10222
+ tools: string[];
10223
+ authConfigId?: string | undefined;
10224
+ } | {
10225
+ name: string;
10226
+ tools: string[];
10227
+ toolkits: string[];
10228
+ };
10229
+ updatedAt: string;
10230
+ }, {
10231
+ type: "single" | "multi";
10232
+ id: string;
10233
+ createdAt: string;
10234
+ config: {
10235
+ name: string;
10236
+ tools: string[];
10237
+ authConfigId?: string | undefined;
10238
+ } | {
10239
+ name: string;
10240
+ tools: string[];
10241
+ toolkits: string[];
10242
+ };
10243
+ updatedAt: string;
10244
+ status?: "error" | "active" | "inactive" | undefined;
10245
+ }>;
10246
+ type MCPServerCreateResponse = z.infer<typeof MCPServerCreateResponseSchema>;
10247
+ /**
10248
+ * MCP Create Method Response Type
10249
+ * Extends the API response with a getServer method for retrieving server instances
10250
+ */
10251
+ type MCPCreateMethodResponse<T = GenerateURLResponse> = (McpCreateResponse | CustomCreateResponse) & {
10252
+ toolkits: string[];
10253
+ getServer: (params: MCPGetServerParams) => Promise<T>;
10254
+ };
10255
+ /**
10256
+ * MCP Server URL Information
10257
+ */
10258
+ type McpServerUrlInfo = {
10259
+ url: URL;
10260
+ name: string;
10261
+ toolkit?: string;
10262
+ };
10263
+ type McpServerGetResponse = McpServerUrlInfo | McpServerUrlInfo[];
10264
+ type McpUrlResponseCamelCase = {
10265
+ connectedAccountUrls?: string[];
10266
+ userIdsUrl?: string[];
10267
+ mcpUrl: string;
10268
+ };
10269
+ type McpUrlResponse = {
10270
+ connected_account_urls?: string[];
10271
+ user_ids_url?: string[];
10272
+ mcp_url: string;
10273
+ };
10274
+ type McpServerCreateResponse<T> = (McpCreateResponse | CustomCreateResponse) & {
10275
+ toolkits: string[];
10276
+ getServer: (params: MCPGetServerParams) => Promise<T>;
10277
+ };
10278
+ declare const CustomCreateResponseCamelCaseSchema: z.ZodObject<{
10279
+ id: z.ZodString;
10280
+ name: z.ZodString;
10281
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10282
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10283
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10284
+ }, "strip", z.ZodTypeAny, {
10285
+ name: string;
10286
+ id: string;
10287
+ status?: string | null | undefined;
10288
+ createdAt?: string | null | undefined;
10289
+ updatedAt?: string | null | undefined;
10290
+ }, {
10291
+ name: string;
10292
+ id: string;
10293
+ status?: string | null | undefined;
10294
+ createdAt?: string | null | undefined;
10295
+ updatedAt?: string | null | undefined;
10296
+ }>;
10297
+ declare const CustomCreateResponseSchema: z.ZodObject<{
10298
+ id: z.ZodString;
10299
+ name: z.ZodString;
10300
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10301
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10302
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10303
+ }, "strip", z.ZodTypeAny, {
10304
+ name: string;
10305
+ id: string;
10306
+ status?: string | null | undefined;
10307
+ created_at?: string | null | undefined;
10308
+ updated_at?: string | null | undefined;
10309
+ }, {
10310
+ name: string;
10311
+ id: string;
10312
+ status?: string | null | undefined;
10313
+ created_at?: string | null | undefined;
10314
+ updated_at?: string | null | undefined;
10315
+ }>;
10316
+ type CustomCreateResponseValidated = z.infer<typeof CustomCreateResponseCamelCaseSchema>;
10317
+ declare const McpListResponseCamelCaseSchema: z.ZodObject<{
10318
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
10319
+ id: z.ZodString;
10320
+ name: z.ZodString;
10321
+ createdAt: z.ZodOptional<z.ZodString>;
10322
+ updatedAt: z.ZodOptional<z.ZodString>;
10323
+ status: z.ZodOptional<z.ZodString>;
10324
+ }, "strip", z.ZodTypeAny, {
10325
+ name: string;
10326
+ id: string;
10327
+ status?: string | undefined;
10328
+ createdAt?: string | undefined;
10329
+ updatedAt?: string | undefined;
10330
+ }, {
10331
+ name: string;
10332
+ id: string;
10333
+ status?: string | undefined;
10334
+ createdAt?: string | undefined;
10335
+ updatedAt?: string | undefined;
10336
+ }>, "many">>;
10337
+ }, "strip", z.ZodTypeAny, {
10338
+ items?: {
10339
+ name: string;
10340
+ id: string;
10341
+ status?: string | undefined;
10342
+ createdAt?: string | undefined;
10343
+ updatedAt?: string | undefined;
10344
+ }[] | undefined;
10345
+ }, {
10346
+ items?: {
10347
+ name: string;
10348
+ id: string;
10349
+ status?: string | undefined;
10350
+ createdAt?: string | undefined;
10351
+ updatedAt?: string | undefined;
10352
+ }[] | undefined;
10353
+ }>;
10354
+ declare const McpListResponseSchema: z.ZodObject<{
10355
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
10356
+ id: z.ZodString;
10357
+ name: z.ZodString;
10358
+ created_at: z.ZodOptional<z.ZodString>;
10359
+ updated_at: z.ZodOptional<z.ZodString>;
10360
+ status: z.ZodOptional<z.ZodString>;
10361
+ }, "strip", z.ZodTypeAny, {
10362
+ name: string;
10363
+ id: string;
10364
+ status?: string | undefined;
10365
+ created_at?: string | undefined;
10366
+ updated_at?: string | undefined;
10367
+ }, {
10368
+ name: string;
10369
+ id: string;
10370
+ status?: string | undefined;
10371
+ created_at?: string | undefined;
10372
+ updated_at?: string | undefined;
10373
+ }>, "many">>;
10374
+ }, "strip", z.ZodTypeAny, {
10375
+ items?: {
10376
+ name: string;
10377
+ id: string;
10378
+ status?: string | undefined;
10379
+ created_at?: string | undefined;
10380
+ updated_at?: string | undefined;
10381
+ }[] | undefined;
10382
+ }, {
10383
+ items?: {
10384
+ name: string;
10385
+ id: string;
10386
+ status?: string | undefined;
10387
+ created_at?: string | undefined;
10388
+ updated_at?: string | undefined;
10389
+ }[] | undefined;
10390
+ }>;
10391
+ declare const McpRetrieveResponseCamelCaseSchema: z.ZodObject<{
10392
+ id: z.ZodString;
10393
+ name: z.ZodString;
10394
+ createdAt: z.ZodOptional<z.ZodString>;
10395
+ updatedAt: z.ZodOptional<z.ZodString>;
10396
+ status: z.ZodOptional<z.ZodString>;
10397
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10398
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10399
+ managedAuthViaComposio: z.ZodOptional<z.ZodBoolean>;
10400
+ }, "strip", z.ZodTypeAny, {
10401
+ name: string;
10402
+ id: string;
10403
+ status?: string | undefined;
10404
+ tools?: string[] | undefined;
10405
+ toolkits?: string[] | undefined;
10406
+ createdAt?: string | undefined;
10407
+ updatedAt?: string | undefined;
10408
+ managedAuthViaComposio?: boolean | undefined;
10409
+ }, {
10410
+ name: string;
10411
+ id: string;
10412
+ status?: string | undefined;
10413
+ tools?: string[] | undefined;
10414
+ toolkits?: string[] | undefined;
10415
+ createdAt?: string | undefined;
10416
+ updatedAt?: string | undefined;
10417
+ managedAuthViaComposio?: boolean | undefined;
10418
+ }>;
10419
+ declare const McpRetrieveResponseSchema: z.ZodObject<{
10420
+ id: z.ZodString;
10421
+ name: z.ZodString;
10422
+ created_at: z.ZodOptional<z.ZodString>;
10423
+ updated_at: z.ZodOptional<z.ZodString>;
10424
+ status: z.ZodOptional<z.ZodString>;
10425
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10426
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10427
+ managed_auth_via_composio: z.ZodOptional<z.ZodBoolean>;
10428
+ }, "strip", z.ZodTypeAny, {
10429
+ name: string;
10430
+ id: string;
10431
+ status?: string | undefined;
10432
+ tools?: string[] | undefined;
10433
+ toolkits?: string[] | undefined;
10434
+ created_at?: string | undefined;
10435
+ updated_at?: string | undefined;
10436
+ managed_auth_via_composio?: boolean | undefined;
10437
+ }, {
10438
+ name: string;
10439
+ id: string;
10440
+ status?: string | undefined;
10441
+ tools?: string[] | undefined;
10442
+ toolkits?: string[] | undefined;
10443
+ created_at?: string | undefined;
10444
+ updated_at?: string | undefined;
10445
+ managed_auth_via_composio?: boolean | undefined;
10446
+ }>;
10447
+ declare const McpDeleteResponseCamelCaseSchema: z.ZodObject<{
10448
+ id: z.ZodString;
10449
+ deleted: z.ZodOptional<z.ZodBoolean>;
10450
+ message: z.ZodOptional<z.ZodString>;
10451
+ }, "strip", z.ZodTypeAny, {
10452
+ id: string;
10453
+ message?: string | undefined;
10454
+ deleted?: boolean | undefined;
10455
+ }, {
10456
+ id: string;
10457
+ message?: string | undefined;
10458
+ deleted?: boolean | undefined;
10459
+ }>;
10460
+ declare const McpDeleteResponseSchema: z.ZodObject<{
10461
+ id: z.ZodString;
10462
+ deleted: z.ZodOptional<z.ZodBoolean>;
10463
+ message: z.ZodOptional<z.ZodString>;
10464
+ }, "strip", z.ZodTypeAny, {
10465
+ id: string;
10466
+ message?: string | undefined;
10467
+ deleted?: boolean | undefined;
10468
+ }, {
10469
+ id: string;
10470
+ message?: string | undefined;
10471
+ deleted?: boolean | undefined;
10472
+ }>;
10473
+ declare const McpUpdateResponseCamelCaseSchema: z.ZodObject<{
10474
+ id: z.ZodString;
10475
+ name: z.ZodString;
10476
+ createdAt: z.ZodOptional<z.ZodString>;
10477
+ updatedAt: z.ZodOptional<z.ZodString>;
10478
+ status: z.ZodOptional<z.ZodString>;
10479
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10480
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10481
+ }, "strip", z.ZodTypeAny, {
10482
+ name: string;
10483
+ id: string;
10484
+ status?: string | undefined;
10485
+ tools?: string[] | undefined;
10486
+ toolkits?: string[] | undefined;
10487
+ createdAt?: string | undefined;
10488
+ updatedAt?: string | undefined;
10489
+ }, {
10490
+ name: string;
10491
+ id: string;
10492
+ status?: string | undefined;
10493
+ tools?: string[] | undefined;
10494
+ toolkits?: string[] | undefined;
10495
+ createdAt?: string | undefined;
10496
+ updatedAt?: string | undefined;
10497
+ }>;
10498
+ declare const McpUpdateResponseSchema: z.ZodObject<{
10499
+ id: z.ZodString;
10500
+ name: z.ZodString;
10501
+ created_at: z.ZodOptional<z.ZodString>;
10502
+ updated_at: z.ZodOptional<z.ZodString>;
10503
+ status: z.ZodOptional<z.ZodString>;
10504
+ toolkits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10505
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10506
+ }, "strip", z.ZodTypeAny, {
10507
+ name: string;
10508
+ id: string;
10509
+ status?: string | undefined;
10510
+ tools?: string[] | undefined;
10511
+ toolkits?: string[] | undefined;
10512
+ created_at?: string | undefined;
10513
+ updated_at?: string | undefined;
10514
+ }, {
10515
+ name: string;
10516
+ id: string;
10517
+ status?: string | undefined;
10518
+ tools?: string[] | undefined;
10519
+ toolkits?: string[] | undefined;
10520
+ created_at?: string | undefined;
10521
+ updated_at?: string | undefined;
10522
+ }>;
10523
+ type McpListResponseCamelCase = z.infer<typeof McpListResponseCamelCaseSchema>;
10524
+ type McpRetrieveResponseCamelCase = z.infer<typeof McpRetrieveResponseCamelCaseSchema>;
10525
+ type McpDeleteResponseCamelCase = z.infer<typeof McpDeleteResponseCamelCaseSchema>;
10526
+ type McpUpdateResponseCamelCase = z.infer<typeof McpUpdateResponseCamelCaseSchema>;
10527
+ type GenerateURLResponseCamelCase = z.infer<typeof GenerateURLResponseCamelCaseSchema>;
10528
+
9809
10529
  /**
9810
10530
  * @internal
9811
10531
  * Base class for all toolsets.
9812
10532
  * This class is not meant to be used directly, but rather to be extended by different provider implementations.
9813
10533
  */
9814
- declare abstract class BaseProvider {
10534
+ declare abstract class BaseProvider<TMcpResponse = McpServerGetResponse> {
9815
10535
  /**
9816
10536
  * @public
9817
10537
  * The name of the provider.
@@ -9847,13 +10567,27 @@ declare abstract class BaseProvider {
9847
10567
  * @returns {Promise<string>} The result of the tool execution.
9848
10568
  */
9849
10569
  executeTool(toolSlug: string, body: ToolExecuteParams, modifers?: ExecuteToolModifiers): Promise<ToolExecuteResponse>;
10570
+ /**
10571
+ * @public
10572
+ * Optional method to transform MCP URL response into provider-specific format.
10573
+ * Providers can override this method to define custom transformation logic
10574
+ * for MCP server responses.
10575
+ *
10576
+ * @param data - The MCP URL response data
10577
+ * @param serverName - Name of the MCP server
10578
+ * @param connectedAccountIds - Optional array of connected account IDs
10579
+ * @param userIds - Optional array of user IDs
10580
+ * @param toolkits - Optional array of toolkit names
10581
+ * @returns Transformed response in provider-specific format, or undefined to use default transformation
10582
+ */
10583
+ wrapMcpServerResponse?(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): TMcpResponse;
9850
10584
  }
9851
10585
  /**
9852
10586
  * @public
9853
10587
  * Base class for all non-agentic toolsets.
9854
10588
  * This class is not meant to be used directly, but rather to be extended by concrete provider implementations.
9855
10589
  */
9856
- declare abstract class BaseNonAgenticProvider<TToolCollection, TTool> extends BaseProvider {
10590
+ declare abstract class BaseNonAgenticProvider<TToolCollection, TTool, TMcpResponse = McpServerGetResponse> extends BaseProvider<TMcpResponse> {
9857
10591
  readonly _isAgentic = false;
9858
10592
  /**
9859
10593
  * Wrap a tool in the provider specific format.
@@ -9873,17 +10607,19 @@ declare abstract class BaseNonAgenticProvider<TToolCollection, TTool> extends Ba
9873
10607
  * Base class for all agentic toolsets.
9874
10608
  * This class is not meant to be used directly, but rather to be extended by concrete provider implementations.
9875
10609
  */
9876
- declare abstract class BaseAgenticProvider<TToolCollection, TTool> extends BaseProvider {
10610
+ declare abstract class BaseAgenticProvider<TToolCollection, TTool, TMcpResponse = McpServerGetResponse> extends BaseProvider<TMcpResponse> {
9877
10611
  readonly _isAgentic = true;
9878
10612
  /**
9879
10613
  * Wrap a tool in the provider specific format.
9880
10614
  * @param tool - The tool to wrap.
10615
+ * @param executeTool - The function to execute the tool.
9881
10616
  * @returns The wrapped tool.
9882
10617
  */
9883
10618
  abstract wrapTool(tool: Tool, executeTool: ExecuteToolFn): TTool;
9884
10619
  /**
9885
10620
  * Wrap a list of tools in the provider specific format.
9886
10621
  * @param tools - The tools to wrap.
10622
+ * @param executeTool - The function to execute the tool.
9887
10623
  * @returns The wrapped tools.
9888
10624
  */
9889
10625
  abstract wrapTools(tools: Tool[], executeTool: ExecuteToolFn): TToolCollection;
@@ -9893,7 +10629,7 @@ declare abstract class BaseAgenticProvider<TToolCollection, TTool> extends BaseP
9893
10629
  * Base type for all toolsets.
9894
10630
  * This type is used to infer the type of the provider from the provider implementation.
9895
10631
  */
9896
- type BaseComposioProvider<TToolCollection, TTool> = BaseNonAgenticProvider<TToolCollection, TTool> | BaseAgenticProvider<TToolCollection, TTool>;
10632
+ type BaseComposioProvider<TToolCollection, TTool, TMcpResponse = McpServerGetResponse> = BaseNonAgenticProvider<TToolCollection, TTool, TMcpResponse> | BaseAgenticProvider<TToolCollection, TTool, TMcpResponse>;
9897
10633
 
9898
10634
  /**
9899
10635
  * Modifier for altering the tool execute parameters before execution.
@@ -10184,13 +10920,13 @@ type AgenticToolOptions = ToolOptions & ExecuteToolModifiers;
10184
10920
  * });
10185
10921
  * ```
10186
10922
  */
10187
- type ProviderOptions<TProvider> = TProvider extends BaseComposioProvider<infer TToolCollection, infer TTool> ? TProvider extends BaseAgenticProvider<TToolCollection, TTool> ? AgenticToolOptions : ToolOptions : never;
10923
+ type ProviderOptions<TProvider> = TProvider extends BaseComposioProvider<infer TToolCollection, infer TTool, infer TMcpResponse> ? TProvider extends BaseAgenticProvider<TToolCollection, TTool, TMcpResponse> ? AgenticToolOptions : ToolOptions : never;
10188
10924
 
10189
10925
  /**
10190
10926
  * This class is used to manage tools in the Composio SDK.
10191
10927
  * It provides methods to list, get, and execute tools.
10192
10928
  */
10193
- declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool>> {
10929
+ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
10194
10930
  private client;
10195
10931
  private readonly customTools;
10196
10932
  private provider;
@@ -10239,7 +10975,6 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
10239
10975
  * This method fetches tools from the Composio API in raw format and combines them with
10240
10976
  * any registered custom tools. The response can be filtered and modified as needed.
10241
10977
  *
10242
- * @param {string} userId - The user ID for whom to fetch the tools
10243
10978
  * @param {ToolListParams} [query={}] - Optional query parameters to filter the tools
10244
10979
  * @param {TransformToolSchemaModifier} [modifier] - Optional function to transform tool schemas
10245
10980
  * @returns {Promise<ToolList>} List of tools matching the query criteria
@@ -10247,16 +10982,16 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
10247
10982
  * @example
10248
10983
  * ```typescript
10249
10984
  * // Get all tools
10250
- * const tools = await composio.tools.getRawComposioTools('default');
10985
+ * const tools = await composio.tools.getRawComposioTools();
10251
10986
  *
10252
10987
  * // Get tools with filters
10253
- * const githubTools = await composio.tools.getRawComposioTools('default', {
10988
+ * const githubTools = await composio.tools.getRawComposioTools({
10254
10989
  * toolkits: ['github'],
10255
10990
  * important: true
10256
10991
  * });
10257
10992
  *
10258
10993
  * // Get tools with schema transformation
10259
- * const tools = await composio.tools.getRawComposioTools('default', {},
10994
+ * const tools = await composio.tools.getRawComposioTools({},
10260
10995
  * (toolSlug, toolkitSlug, tool) => {
10261
10996
  * // Add custom properties to tool schema
10262
10997
  * return {...tool, customProperty: 'value'};
@@ -10264,7 +10999,7 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
10264
10999
  * );
10265
11000
  * ```
10266
11001
  */
10267
- getRawComposioTools(userId: string, query: ToolListParams, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
11002
+ getRawComposioTools(query: ToolListParams, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
10268
11003
  /**
10269
11004
  * Retrieves a tool by its Slug.
10270
11005
  * This method is used to get the raw tools from the composio API.
@@ -10273,10 +11008,10 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
10273
11008
  *
10274
11009
  * @example
10275
11010
  * ```ts
10276
- * const tool = await composio.tools.getRawComposioToolBySlug('default', 'github');
11011
+ * const tool = await composio.tools.getRawComposioToolBySlug('github');
10277
11012
  * ```
10278
11013
  */
10279
- getRawComposioToolBySlug(userId: string, slug: string, modifier?: TransformToolSchemaModifier): Promise<Tool>;
11014
+ getRawComposioToolBySlug(slug: string, modifier?: TransformToolSchemaModifier): Promise<Tool>;
10280
11015
  /**
10281
11016
  * Get a list of tools from Composio based on filters.
10282
11017
  * This method fetches the tools from the Composio API and wraps them using the provider.
@@ -40369,16 +41104,16 @@ declare const TriggerSubscribeParamSchema: z.ZodObject<{
40369
41104
  toolkits?: string[] | undefined;
40370
41105
  connectedAccountId?: string | undefined;
40371
41106
  userId?: string | undefined;
40372
- triggerId?: string | undefined;
40373
41107
  authConfigId?: string | undefined;
41108
+ triggerId?: string | undefined;
40374
41109
  triggerSlug?: string[] | undefined;
40375
41110
  triggerData?: string | undefined;
40376
41111
  }, {
40377
41112
  toolkits?: string[] | undefined;
40378
41113
  connectedAccountId?: string | undefined;
40379
41114
  userId?: string | undefined;
40380
- triggerId?: string | undefined;
40381
41115
  authConfigId?: string | undefined;
41116
+ triggerId?: string | undefined;
40382
41117
  triggerSlug?: string[] | undefined;
40383
41118
  triggerData?: string | undefined;
40384
41119
  }>;
@@ -41262,6 +41997,248 @@ declare class ConnectedAccounts {
41262
41997
  disable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
41263
41998
  }
41264
41999
 
42000
+ /**
42001
+ * Transform MCP list response from snake_case to camelCase
42002
+ */
42003
+ declare function transformMcpListResponse(response: McpListResponse): {
42004
+ items?: {
42005
+ name: string;
42006
+ id: string;
42007
+ status?: string | undefined;
42008
+ createdAt?: string | undefined;
42009
+ updatedAt?: string | undefined;
42010
+ }[] | undefined;
42011
+ };
42012
+ /**
42013
+ * Transform MCP retrieve response from snake_case to camelCase
42014
+ */
42015
+ declare function transformMcpRetrieveResponse(response: McpCreateResponse): {
42016
+ name: string;
42017
+ id: string;
42018
+ status?: string | undefined;
42019
+ tools?: string[] | undefined;
42020
+ toolkits?: string[] | undefined;
42021
+ createdAt?: string | undefined;
42022
+ updatedAt?: string | undefined;
42023
+ managedAuthViaComposio?: boolean | undefined;
42024
+ };
42025
+ /**
42026
+ * Transform MCP delete response from snake_case to camelCase
42027
+ */
42028
+ declare function transformMcpDeleteResponse(response: McpDeleteResponse): {
42029
+ id: string;
42030
+ message?: string | undefined;
42031
+ deleted?: boolean | undefined;
42032
+ };
42033
+ /**
42034
+ * Transform MCP update response from snake_case to camelCase
42035
+ */
42036
+ declare function transformMcpUpdateResponse(response: McpUpdateResponse): {
42037
+ name: string;
42038
+ id: string;
42039
+ status?: string | undefined;
42040
+ tools?: string[] | undefined;
42041
+ toolkits?: string[] | undefined;
42042
+ createdAt?: string | undefined;
42043
+ updatedAt?: string | undefined;
42044
+ };
42045
+ /**
42046
+ * Transform MCP generate URL response from snake_case to camelCase
42047
+ */
42048
+ declare function transformMcpGenerateUrlResponse(response: GenerateURLResponse): {
42049
+ mcpUrl: string;
42050
+ connectedAccountUrls?: string[] | undefined;
42051
+ userIdsUrl?: string[] | undefined;
42052
+ };
42053
+
42054
+ /**
42055
+ * @fileoverview MCP class for Composio SDK, used to manage MCP servers.
42056
+ *
42057
+ * @author Apoorv Taneja <apoorv@composio.dev>
42058
+ * @date 2025-06-12
42059
+ * @module MCP
42060
+ */
42061
+
42062
+ /**
42063
+ * MCP (Model Control Protocol) class
42064
+ * Handles MCP server operations
42065
+ */
42066
+ declare class MCP<T = McpServerGetResponse> {
42067
+ private client;
42068
+ private provider?;
42069
+ constructor(client: ComposioClient, provider?: BaseComposioProvider<unknown, unknown, unknown>);
42070
+ /**
42071
+ * Validates toolkit configurations using Zod schema
42072
+ * @private
42073
+ * @param {MCPToolkitConfig[]} toolkitConfigs - Array of toolkit configurations to validate
42074
+ * @param {MCPAuthOptions} [authOptions] - Authentication options to validate
42075
+ * @throws {ValidationError} If validation fails
42076
+ */
42077
+ private validateInputs;
42078
+ /**
42079
+ * Create a new MCP server
42080
+ * @param {string} name - Unique name for the MCP server
42081
+ * @param {MCPToolkitConfig[]} toolkitConfigs - Array of toolkit configurations
42082
+ * @param {MCPAuthOptions} [authOptions] - Authentication configuration options
42083
+ * @returns {Promise<McpServerCreateResponse<T>>} Created server details with instance getter
42084
+ *
42085
+ * @example
42086
+ * ```typescript
42087
+ * const server = await composio.mcp.create(
42088
+ * "personal-mcp-server",
42089
+ * [
42090
+ * {
42091
+ * toolkit: "GMAIL",
42092
+ * authConfigId: "ac_sdhkjfhjksdk",
42093
+ * allowedTools: ["GMAIL_FETCH_EMAILS"],
42094
+ * },
42095
+ * ],
42096
+ * { useComposioManagedAuth: true },
42097
+ * );
42098
+ *
42099
+ * // Option 1: Use convenience method on response
42100
+ * const urls = await server.getServer({
42101
+ * connectedAccountIds: { gmail: "account_id" }
42102
+ * });
42103
+ *
42104
+ * // Option 2: Use standalone method later
42105
+ * const urlsLater = await composio.mcp.getServer(server.id, {
42106
+ * connectedAccountIds: { gmail: "account_id" }
42107
+ * });
42108
+ * ```
42109
+ */
42110
+ create(name: string, toolkitConfigs: MCPToolkitConfig[], authOptions?: MCPAuthOptions): Promise<McpServerCreateResponse<T>>;
42111
+ /**
42112
+ * Get server URLs for an existing MCP server
42113
+ * @param {string} id - Server UUID
42114
+ * @param {MCPGetServerParams} params - Parameters for getting server URLs
42115
+ * @param {MCPAuthOptions} [authOptions] - Authentication options (optional, will use server's default if not provided)
42116
+ * @returns {Promise<T>} Transformed server URLs in provider-specific format
42117
+ *
42118
+ * @example
42119
+ * ```typescript
42120
+ * // Get URLs for an existing server
42121
+ * const urls = await composio.mcp.getServer("server-id", {
42122
+ * connectedAccountIds: {
42123
+ * gmail: "connected_account_id"
42124
+ * }
42125
+ * });
42126
+ * ```
42127
+ */
42128
+ getServer(id: string, params: MCPGetServerParams, authOptions?: MCPAuthOptions): Promise<T>;
42129
+ /**
42130
+ * List MCP server configurations with filtering options
42131
+ * @param {Object} options - Filtering and pagination options
42132
+ * @param {number} [options.page] - Page number for pagination
42133
+ * @param {number} [options.limit] - Number of items per page
42134
+ * @param {string[]} [options.toolkits] - Filter servers by toolkit names
42135
+ * @param {string[]} [options.authConfigs] - Filter servers by auth config IDs
42136
+ * @param {string} [options.name] - Filter servers by name
42137
+ * @param {string} [options.user] - Filter servers by user ID
42138
+ * @returns {Promise<McpListResponse>} List of MCP servers matching the filters
42139
+ *
42140
+ * @example
42141
+ * ```typescript
42142
+ * // List all servers with pagination
42143
+ * const servers = await composio.mcp.list({
42144
+ * page: 1,
42145
+ * limit: 10
42146
+ * });
42147
+ *
42148
+ * // List Gmail and Supabase servers
42149
+ * const filteredServers = await composio.mcp.list({
42150
+ * toolkits: ['GMAIL', 'SUPABASE'],
42151
+ * authConfigIds: ['auth_123', 'auth_456']
42152
+ * });
42153
+ * ```
42154
+ */
42155
+ list(options: {
42156
+ page?: number;
42157
+ limit?: number;
42158
+ toolkits?: string[];
42159
+ authConfigs?: string[];
42160
+ name?: string;
42161
+ }): Promise<ReturnType<typeof transformMcpListResponse>>;
42162
+ /**
42163
+ * Get details of a specific MCP server
42164
+ * @param {string} id - Server UUID
42165
+ * @returns {Promise<ReturnType<typeof transformMcpRetrieveResponse>>} Server details
42166
+ *
42167
+ * @example
42168
+ * ```typescript
42169
+ * const serverDetails = await composio.mcp.get('server-uuid');
42170
+ * ```
42171
+ */
42172
+ get(id: string): Promise<ReturnType<typeof transformMcpRetrieveResponse>>;
42173
+ /**
42174
+ * Delete an MCP server
42175
+ * @param {string} id - Server UUID
42176
+ * @returns {Promise<ReturnType<typeof transformMcpDeleteResponse>>} Deletion response
42177
+ *
42178
+ * @example
42179
+ * ```typescript
42180
+ * const result = await composio.mcp.delete('server-uuid');
42181
+ * ```
42182
+ */
42183
+ delete(id: string): Promise<ReturnType<typeof transformMcpDeleteResponse>>;
42184
+ /**
42185
+ * Update an MCP server configuration
42186
+ * @param {string} id - Server UUID
42187
+ * @param {string} name - New unique name for the server
42188
+ * @param {MCPToolkitConfig[]} toolkitConfigs - Array of toolkit configurations
42189
+ * @param {MCPAuthOptions} [authOptions] - Updated authentication options
42190
+ * @returns {Promise<ReturnType<typeof transformMcpUpdateResponse>>} Updated server details
42191
+ *
42192
+ * @example
42193
+ * ```typescript
42194
+ * const updatedServer = await composio.mcp.update(
42195
+ * "server-uuid",
42196
+ * "my-updated-server",
42197
+ * [
42198
+ * {
42199
+ * toolkit: "GMAIL",
42200
+ * authConfigId: "ac_sdhkjfhjksdk",
42201
+ * allowedTools: ["GMAIL_FETCH_EMAILS"],
42202
+ * },
42203
+ * ],
42204
+ * {
42205
+ * useComposioManagedAuth: true,
42206
+ * }
42207
+ * );
42208
+ * ```
42209
+ */
42210
+ update(id: string, name: string, toolkitConfigs: MCPToolkitConfig[], authOptions?: MCPAuthOptions): Promise<ReturnType<typeof transformMcpUpdateResponse>>;
42211
+ /**
42212
+ * Generate URL for an MCP server
42213
+ * @param {GenerateURLParams} params - Parameters for URL generation
42214
+ * @returns {Promise<ReturnType<typeof transformMcpGenerateUrlResponse>>} Generated URL response
42215
+ *
42216
+ * @example
42217
+ * ```typescript
42218
+ * const urlResponse = await composio.mcp.generateUrl({
42219
+ * user_ids: ['user123'],
42220
+ * connected_account_ids: ['account456'],
42221
+ * mcp_server_id: 'server-uuid',
42222
+ * managed_auth_by_composio: true
42223
+ * });
42224
+ * ```
42225
+ */
42226
+ generateUrl(params: GenerateURLParams): Promise<ReturnType<typeof transformMcpGenerateUrlResponse>>;
42227
+ /**
42228
+ * Transform MCP URL response into the appropriate format.
42229
+ * If the provider has a custom transform method, use it.
42230
+ * Otherwise, use the default transformation.
42231
+ *
42232
+ * @param data - The MCP URL response data (in camelCase)
42233
+ * @param serverName - Name of the MCP server
42234
+ * @param connectedAccountIds - Optional array of connected account IDs
42235
+ * @param userIds - Optional array of user IDs
42236
+ * @param toolkits - Optional array of toolkit names
42237
+ * @returns Transformed response in appropriate format
42238
+ */
42239
+ private wrapMcpServerResponse;
42240
+ }
42241
+
41265
42242
  /**
41266
42243
  * OpenAI ToolSet
41267
42244
  *
@@ -41297,6 +42274,18 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
41297
42274
  * ```
41298
42275
  */
41299
42276
  constructor();
42277
+ /**
42278
+ * Transform MCP URL response into OpenAI-specific format.
42279
+ * OpenAI uses the standard format by default.
42280
+ *
42281
+ * @param data - The MCP URL response data
42282
+ * @param serverName - Name of the MCP server
42283
+ * @param connectedAccountIds - Optional array of connected account IDs
42284
+ * @param userIds - Optional array of user IDs
42285
+ * @param toolkits - Optional array of toolkit names
42286
+ * @returns Standard MCP server response format
42287
+ */
42288
+ wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
41300
42289
  /**
41301
42290
  * Wraps a Composio tool in the OpenAI function calling format.
41302
42291
  *
@@ -41578,7 +42567,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
41578
42567
 
41579
42568
  type ComposioRequestHeaders = Record<string, string>;
41580
42569
 
41581
- type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown> = OpenAIProvider> = {
42570
+ type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown, unknown> = OpenAIProvider> = {
41582
42571
  /**
41583
42572
  * The API key for the Composio API.
41584
42573
  * @example 'sk-1234567890'
@@ -41626,11 +42615,15 @@ type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown> = O
41626
42615
  */
41627
42616
  defaultHeaders?: ComposioRequestHeaders;
41628
42617
  };
42618
+ /**
42619
+ * Extract the MCP response type from a provider
42620
+ */
42621
+ type ExtractMcpResponseType<T> = T extends BaseComposioProvider<unknown, unknown, infer TMcp> ? TMcp : McpServerGetResponse;
41629
42622
  /**
41630
42623
  * This is the core class for Composio.
41631
42624
  * It is used to initialize the Composio SDK and provide a global configuration.
41632
42625
  */
41633
- declare class Composio<TProvider extends BaseComposioProvider<unknown, unknown> = OpenAIProvider> {
42626
+ declare class Composio<TProvider extends BaseComposioProvider<unknown, unknown, unknown> = OpenAIProvider> {
41634
42627
  /**
41635
42628
  * The Composio API client.
41636
42629
  * @type {ComposioClient}
@@ -41650,6 +42643,7 @@ declare class Composio<TProvider extends BaseComposioProvider<unknown, unknown>
41650
42643
  provider: TProvider;
41651
42644
  authConfigs: AuthConfigs;
41652
42645
  connectedAccounts: ConnectedAccounts;
42646
+ mcp: MCP<ExtractMcpResponseType<TProvider>>;
41653
42647
  /**
41654
42648
  * Creates a new instance of the Composio SDK.
41655
42649
  *
@@ -41737,6 +42731,7 @@ interface CustomTool {
41737
42731
  }
41738
42732
  declare class ComposioProvider extends BaseNonAgenticProvider<Array<CustomTool>, CustomTool> {
41739
42733
  readonly name = "ComposioProvider";
42734
+ constructor();
41740
42735
  wrapTool: (tool: Tool) => CustomTool;
41741
42736
  wrapTools(tools: Tool[]): CustomTool[];
41742
42737
  }
@@ -41910,6 +42905,23 @@ declare class AuthScheme {
41910
42905
  }): ConnectionData;
41911
42906
  }
41912
42907
 
42908
+ declare const COMPOSIO_DIR = ".composio";
42909
+ declare const USER_DATA_FILE_NAME = "user_data.json";
42910
+ declare const TEMP_FILES_DIRECTORY_NAME = "files";
42911
+ declare const DEFAULT_BASE_URL = "https://backend.composio.dev";
42912
+ declare const TELEMETRY_URL = "https://app.composio.dev";
42913
+ declare const IS_DEVELOPMENT_OR_CI: string | boolean;
42914
+
42915
+ declare const constants_COMPOSIO_DIR: typeof COMPOSIO_DIR;
42916
+ declare const constants_DEFAULT_BASE_URL: typeof DEFAULT_BASE_URL;
42917
+ declare const constants_IS_DEVELOPMENT_OR_CI: typeof IS_DEVELOPMENT_OR_CI;
42918
+ declare const constants_TELEMETRY_URL: typeof TELEMETRY_URL;
42919
+ declare const constants_TEMP_FILES_DIRECTORY_NAME: typeof TEMP_FILES_DIRECTORY_NAME;
42920
+ declare const constants_USER_DATA_FILE_NAME: typeof USER_DATA_FILE_NAME;
42921
+ declare namespace constants {
42922
+ export { constants_COMPOSIO_DIR as COMPOSIO_DIR, constants_DEFAULT_BASE_URL as DEFAULT_BASE_URL, constants_IS_DEVELOPMENT_OR_CI as IS_DEVELOPMENT_OR_CI, constants_TELEMETRY_URL as TELEMETRY_URL, constants_TEMP_FILES_DIRECTORY_NAME as TEMP_FILES_DIRECTORY_NAME, constants_USER_DATA_FILE_NAME as USER_DATA_FILE_NAME };
42923
+ }
42924
+
41913
42925
  declare const LOG_LEVELS: {
41914
42926
  readonly silent: -1;
41915
42927
  readonly error: 0;
@@ -42139,4 +43151,4 @@ declare class ComposioNoAPIKeyError extends ComposioError {
42139
43151
  constructor(message?: string, options?: Omit<ComposioErrorOptions, 'code' | 'statusCode'>);
42140
43152
  }
42141
43153
 
42142
- export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BasicWithJwtConnectionDataSchema, BillcomAuthConnectionDataSchema, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioLinkConnectionDataSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, type ConnectionData, ConnectionDataSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, JsonSchemaToZodError, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListFilterBySearch, ToolListFilterBySearchSchema, type ToolListFilterByToolkits, ToolListFilterByToolkitsSchema, type ToolListFilterByTools, ToolListFilterByToolsSchema, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, ToolkitErrorCodes, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };
43154
+ export { type AgenticToolOptions, AuthConfigErrorCodes, type AuthConfigListParams, AuthConfigListParamsSchema, type AuthConfigListResponse, AuthConfigListResponseSchema, type AuthConfigRetrieveResponse, AuthConfigRetrieveResponseSchema, type AuthConfigType, AuthConfigTypes, type AuthConfigUpdateParams, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, type AuthSchemeType, AuthSchemeTypes, BaseAgenticProvider, type BaseComposioProvider, type BaseConnectionFields, BaseNonAgenticProvider, BasicWithJwtConnectionDataSchema, BillcomAuthConnectionDataSchema, Composio, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomToolsNotInitializedError, ComposioError, type ComposioErrorOptions, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioLinkConnectionDataSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ConnectedAccountErrorCodes, type ConnectionData, ConnectionDataSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, type ConnectionStatusEnum, ConnectionStatuses, type CreateAuthConfigParams, CreateAuthConfigParamsSchema, type CreateAuthConfigResponse, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateCustomAuthConfigParamsSchema, type CustomAuthParams, CustomAuthParamsSchema, CustomCreateResponseCamelCaseSchema, CustomCreateResponseSchema, type CustomCreateResponseValidated, type CustomToolInputParameter, type CustomToolOptions, type CustomToolRegistry, type CustomToolRegistryItem, type ErrorHandleOptions, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, GenerateURLParamsSchema, GenerateURLParamsSnakeCaseSchema, type GenerateURLParamsValidated, type GenerateURLResponseCamelCase, GenerateURLResponseCamelCaseSchema, GenerateURLResponseSchema, type GenerateURLResponseValidated, type GlobalExecuteToolFn, type IncomingTriggerPayload, IncomingTriggerPayloadSchema, type InputParamsSchema, JsonSchemaToZodError, MCP, type MCPAuthOptions, MCPAuthOptionsSchema, type MCPCreateMethodResponse, type MCPGenerateURLParams, MCPGenerateURLParamsSchema, type MCPGetServerParams, MCPGetServerParamsSchema, type MCPInstanceParams, type MCPMultiAppServer, MCPMultiAppServerSchema, type MCPServer, type MCPServerCreateResponse, MCPServerCreateResponseSchema, type MCPServerListResponse, MCPServerListResponseSchema, MCPServerSchema, type MCPServerUpdateParams, MCPServerUpdateParamsSchema, type MCPSingleAppServer, MCPSingleAppServerSchema, type MCPToolkitConfig, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, type McpDeleteResponseCamelCase, McpDeleteResponseCamelCaseSchema, McpDeleteResponseSchema, type McpListResponseCamelCase, McpListResponseCamelCaseSchema, McpListResponseSchema, type McpRetrieveResponseCamelCase, McpRetrieveResponseCamelCaseSchema, McpRetrieveResponseSchema, type McpServerCreateResponse, type McpServerGetResponse, type McpServerUrlInfo, type McpUpdateResponseCamelCase, McpUpdateResponseCamelCaseSchema, McpUpdateResponseSchema, type McpUrlResponse, type McpUrlResponseCamelCase, type Oauth1ActiveConnectionData, Oauth1ActiveConnectionDataSchema, type Oauth1ConnectionData, Oauth1ConnectionDataSchema, type Oauth1ExpiredConnectionData, Oauth1ExpiredConnectionDataSchema, type Oauth1FailedConnectionData, Oauth1FailedConnectionDataSchema, type Oauth1InitiatedConnectionData, Oauth1InitiatedConnectionDataSchema, type Oauth1InitiatingConnectionData, Oauth1InitiatingConnectionDataSchema, type Oauth2ActiveConnectionData, Oauth2ActiveConnectionDataSchema, type Oauth2ConnectionData, Oauth2ConnectionDataSchema, type Oauth2ExpiredConnectionData, Oauth2ExpiredConnectionDataSchema, type Oauth2FailedConnectionData, Oauth2FailedConnectionDataSchema, type Oauth2InitiatedConnectionData, Oauth2InitiatedConnectionDataSchema, type Oauth2InitiatingConnectionData, Oauth2InitiatingConnectionDataSchema, OpenAIProvider, type Provider, type ProviderOptions, RedirectableAuthSchemeSchema, SDKErrorCodes, type Tool, ToolErrorCodes, type ToolExecuteParams, ToolExecuteParamsSchema, type ToolExecuteResponse, ToolExecuteResponseSchema, type ToolKitItem, ToolKitItemSchema, type ToolKitListResponse, ToolKitListResponseSchema, type ToolKitMeta, ToolKitMetaSchema, type ToolList, type ToolListFilterBySearch, ToolListFilterBySearchSchema, type ToolListFilterByToolkits, ToolListFilterByToolkitsSchema, type ToolListFilterByTools, ToolListFilterByToolsSchema, type ToolListParams, ToolListParamsSchema, type ToolListResponse, ToolListResponseSchema, type ToolOptions, type ToolProxyParams, ToolProxyParamsSchema, ToolSchema, type Toolkit, type ToolkitAuthConfigDetails, ToolkitAuthConfigDetailsSchema, type ToolkitAuthField, ToolkitAuthFieldSchema, type ToolkitAuthFieldsResponse, ToolkitAuthFieldsResponseSchema, type ToolkitCategory, ToolkitCategorySchema, ToolkitErrorCodes, type ToolkitListParams, type ToolkitMangedByEnum, ToolkitMangedByEnumSchema, type ToolkitRetrieveCategoriesResponse, ToolkitRetrieveCategoriesResponseSchema, type ToolkitRetrieveResponse, ToolkitRetrieveResponseSchema, ToolkitSchema, type ToolkitSortByEnum, ToolkitSortByEnumSchema, ToolkitsListParamsSchema, type TransformToolSchemaModifier, type TriggerData, type TriggerInstanceListActiveParams, TriggerInstanceListActiveParamsSchema, type TriggerInstanceListActiveResponse, type TriggerInstanceListActiveResponseItem, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, type TriggerInstanceManageDeleteResponse, TriggerInstanceManageDeleteResponseSchema, type TriggerInstanceManageUpdateParams, TriggerInstanceManageUpdateParamsSchema, type TriggerInstanceManageUpdateResponse, TriggerInstanceManageUpdateResponseSchema, type TriggerInstanceUpsertParams, TriggerInstanceUpsertParamsSchema, type TriggerInstanceUpsertResponse, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, type TriggerStatusType, TriggerStatuses, TriggerSubscribeParamSchema, type TriggerSubscribeParams, ValidationError, ValidationErrorCodes, type afterExecuteModifier, type beforeExecuteModifier, constants, jsonSchemaToZodSchema, logger, removeNonRequiredProperties };