@corsair-dev/mcp 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (which shall not include Communications that are clearly marked or
39
+ otherwise designated in writing by the copyright owner as "Not a Work").
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution".
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright (c) 2026 Corsair
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
@@ -0,0 +1,8 @@
1
+ import type { SdkMcpToolDefinition } from '@anthropic-ai/claude-agent-sdk';
2
+ import { z } from 'zod';
3
+ import type { BaseMcpOptions } from '../core/adapters.js';
4
+ export declare class ClaudeProvider {
5
+ readonly name = "claude";
6
+ build(options: BaseMcpOptions): Promise<SdkMcpToolDefinition<z.ZodRawShape>[]>;
7
+ }
8
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,qBAAa,cAAc;IAC1B,QAAQ,CAAC,IAAI,YAAY;IAEnB,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;CAMpF"}
@@ -0,0 +1,8 @@
1
+ import type { BaseMcpOptions } from '../core/adapters.js';
2
+ export declare class MastraProvider {
3
+ readonly name = "mastra";
4
+ build(options: BaseMcpOptions): Promise<import("@mastra/core/tools").Tool<{
5
+ [x: string]: any;
6
+ }, any, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, string, unknown>[]>;
7
+ }
8
+ //# sourceMappingURL=mastra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mastra.d.ts","sourceRoot":"","sources":["../../src/adapters/mastra.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,qBAAa,cAAc;IAC1B,QAAQ,CAAC,IAAI,YAAY;IAEnB,KAAK,CAAC,OAAO,EAAE,cAAc;;;CAuBnC"}
@@ -0,0 +1,7 @@
1
+ export type OpenAIMcpConfig = {
2
+ serverLabel: 'corsair';
3
+ serverUrl: string;
4
+ headers?: Record<string, string>;
5
+ };
6
+ export declare function getOpenAIMcpConfig(baseUrl: string, headers?: Record<string, string>): OpenAIMcpConfig;
7
+ //# sourceMappingURL=openai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../src/adapters/openai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,SAAS,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,eAAe,CAMjB"}
@@ -0,0 +1,6 @@
1
+ export type VercelAiMcpClientOptions = {
2
+ url: string;
3
+ headers?: Record<string, string>;
4
+ };
5
+ export declare function createVercelAiMcpClient(options: VercelAiMcpClientOptions): Promise<import("@ai-sdk/mcp").MCPClient>;
6
+ //# sourceMappingURL=vercel-ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel-ai.d.ts","sourceRoot":"","sources":["../../src/adapters/vercel-ai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,wBAAwB,4CAYjC"}
@@ -0,0 +1,77 @@
1
+ export type WorkflowStoreInput = {
2
+ type: 'workflow';
3
+ workflowId: string;
4
+ code: string;
5
+ description?: string;
6
+ cronSchedule?: string;
7
+ webhookTrigger?: {
8
+ plugin: string;
9
+ action: string;
10
+ };
11
+ notifyJid?: string;
12
+ };
13
+ export type WorkflowListItem = {
14
+ id: string;
15
+ name: string;
16
+ description: string | null;
17
+ triggerType: 'manual' | 'cron' | 'webhook';
18
+ triggerConfig: Record<string, unknown>;
19
+ status: string;
20
+ nextRunAt: Date | null;
21
+ lastRunAt: Date | null;
22
+ createdAt: Date;
23
+ };
24
+ export type WorkflowStored = {
25
+ id: string;
26
+ name: string;
27
+ triggerType: 'manual' | 'cron' | 'webhook';
28
+ status: string;
29
+ code?: string;
30
+ triggerConfig?: Record<string, unknown>;
31
+ };
32
+ export type WorkflowUpdateFields = {
33
+ code?: string;
34
+ description?: string;
35
+ cronSchedule?: string;
36
+ webhookTrigger?: {
37
+ plugin: string;
38
+ action: string;
39
+ };
40
+ status?: 'active' | 'paused' | 'archived';
41
+ };
42
+ export type WorkflowAdapter = {
43
+ listWorkflows(triggerType?: 'cron' | 'webhook' | 'manual' | 'all'): Promise<WorkflowListItem[]>;
44
+ storeWorkflow(input: WorkflowStoreInput): Promise<WorkflowStored | null>;
45
+ updateWorkflowRecord(nameOrId: string, updates: WorkflowUpdateFields): Promise<WorkflowStored | null>;
46
+ archiveWorkflow(nameOrId: string): Promise<WorkflowStored | null>;
47
+ };
48
+ export type CronAdapter = {
49
+ registerCronWorkflow(dbId: string, name: string, code: string, schedule: string, notifyJid?: string): boolean;
50
+ unregisterCronWorkflow(dbId: string): void;
51
+ };
52
+ export type PermissionAdapter = {
53
+ createPermissionRequest(params: {
54
+ endpoint: string;
55
+ args: Record<string, unknown>;
56
+ description: string;
57
+ jid?: string;
58
+ }): Promise<{
59
+ permissionId: string;
60
+ approvalUrl: string;
61
+ }>;
62
+ };
63
+ export type BaseMcpOptions = {
64
+ corsair: {
65
+ list_operations: (opts?: {
66
+ plugin?: string;
67
+ type?: 'api' | 'webhooks' | 'db';
68
+ }) => unknown;
69
+ get_schema: (path: string) => unknown;
70
+ [key: string]: unknown;
71
+ };
72
+ workflows: WorkflowAdapter;
73
+ cron: CronAdapter;
74
+ permissions?: PermissionAdapter;
75
+ basePermissionUrl?: string;
76
+ };
77
+ //# sourceMappingURL=adapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../src/adapters.ts"],"names":[],"mappings":"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"}
package/dist/base.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { BaseMcpOptions } from './adapters.js';
3
+ export declare function createBaseMcpServer(options: BaseMcpOptions): McpServer;
4
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CA6TtE"}
@@ -0,0 +1,10 @@
1
+ import type { SdkMcpToolDefinition } from '@anthropic-ai/claude-agent-sdk';
2
+ import type { BaseMcpOptions } from './adapters.js';
3
+ export type ClaudeExtensionContext = {
4
+ jid?: string;
5
+ };
6
+ export type CreateClaudeToolsOptions = BaseMcpOptions & {
7
+ context?: ClaudeExtensionContext;
8
+ };
9
+ export declare function createClaudeTools(options: CreateClaudeToolsOptions): Promise<SdkMcpToolDefinition<any>[]>;
10
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../src/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG;IACtD,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC,CAmRtC"}
@@ -0,0 +1,23 @@
1
+ export type PermissionAdapter = {
2
+ createPermissionRequest(params: {
3
+ endpoint: string;
4
+ args: Record<string, unknown>;
5
+ description: string;
6
+ }): Promise<{
7
+ permissionId: string;
8
+ approvalUrl: string;
9
+ }>;
10
+ };
11
+ export type BaseMcpOptions = {
12
+ corsair: {
13
+ list_operations: (opts?: {
14
+ plugin?: string;
15
+ type?: 'api' | 'webhooks' | 'db';
16
+ }) => unknown;
17
+ get_schema: (path: string) => unknown;
18
+ [key: string]: unknown;
19
+ };
20
+ permissions?: PermissionAdapter;
21
+ basePermissionUrl?: string;
22
+ };
23
+ //# sourceMappingURL=adapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../src/core/adapters.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC/B,uBAAuB,CAAC,MAAM,EAAE;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,WAAW,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE;QACR,eAAe,EAAE,CAAC,IAAI,CAAC,EAAE;YACxB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,IAAI,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,IAAI,CAAC;SACjC,KAAK,OAAO,CAAC;QACd,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QACtC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { BaseMcpOptions } from './adapters.js';
3
+ export declare function createBaseMcpServer(options: BaseMcpOptions): McpServer;
4
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/core/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAiBtE"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Router } from 'express';
3
+ export declare function createMcpRouter(createServer: () => McpServer): Router;
4
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/core/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAmBzD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,SAAS,GAAG,MAAM,CAoDrE"}
@@ -0,0 +1,8 @@
1
+ import { type CorsairToolDef } from './tools.js';
2
+ import type { BaseMcpOptions } from './adapters.js';
3
+ export declare abstract class BaseProvider<TOutput> {
4
+ abstract readonly name: string;
5
+ abstract wrapTool(def: CorsairToolDef): TOutput;
6
+ build(options: BaseMcpOptions): TOutput[];
7
+ }
8
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/core/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,8BAAsB,YAAY,CAAC,OAAO;IACzC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO;IAE/C,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,EAAE;CAGzC"}
@@ -0,0 +1,11 @@
1
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { z } from 'zod';
3
+ import type { BaseMcpOptions } from './adapters.js';
4
+ export type CorsairToolDef = {
5
+ name: string;
6
+ description: string;
7
+ shape: z.ZodRawShape;
8
+ handler: (args: Record<string, unknown>) => Promise<CallToolResult>;
9
+ };
10
+ export declare function buildCorsairToolDefs(options: BaseMcpOptions): CorsairToolDef[];
11
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/core/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACpE,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,EAAE,CAyK9E"}
package/dist/http.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { Router } from 'express';
3
+ export declare function createMcpRouter(createServer: () => McpServer): Router;
4
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAmBzD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,SAAS,GAAG,MAAM,CAoDrE"}
@@ -0,0 +1,12 @@
1
+ export { createBaseMcpServer } from './core/base.js';
2
+ export { createMcpRouter } from './core/http.js';
3
+ export type { OpenAIMcpConfig } from './adapters/openai.js';
4
+ export { getOpenAIMcpConfig } from './adapters/openai.js';
5
+ export type { VercelAiMcpClientOptions } from './adapters/vercel-ai.js';
6
+ export { createVercelAiMcpClient } from './adapters/vercel-ai.js';
7
+ export { BaseProvider } from './core/provider.js';
8
+ export { ClaudeProvider } from './adapters/claude.js';
9
+ export { MastraProvider } from './adapters/mastra.js';
10
+ export type { CorsairToolDef } from './core/tools.js';
11
+ export type { BaseMcpOptions, PermissionAdapter } from './core/adapters.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,297 @@
1
+ // src/core/base.ts
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { z as z2 } from "zod";
4
+
5
+ // src/core/tools.ts
6
+ import { z } from "zod";
7
+ function buildCorsairToolDefs(options) {
8
+ const { corsair, permissions, basePermissionUrl } = options;
9
+ const defs = [
10
+ {
11
+ name: "list_operations",
12
+ description: "List available Corsair operations. Without options returns all API endpoints across every plugin. Filter by plugin (e.g. 'slack') and/or type ('api' | 'webhooks' | 'db').",
13
+ shape: {
14
+ plugin: z.string().optional().describe("Plugin ID to filter by, e.g. 'slack' or 'github'"),
15
+ type: z.enum(["api", "webhooks", "db"]).optional().describe("Operation type: 'api' (default), 'webhooks', or 'db'")
16
+ },
17
+ handler: async ({ plugin, type }) => {
18
+ const result = corsair.list_operations({
19
+ plugin,
20
+ type
21
+ });
22
+ return {
23
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
24
+ };
25
+ }
26
+ },
27
+ {
28
+ name: "get_schema",
29
+ description: "Get the schema and metadata for a Corsair operation path. Accepts API paths ('slack.api.channels.list'), webhook paths ('slack.webhooks.messages.message'), or DB paths ('slack.db.messages.search').",
30
+ shape: {
31
+ path: z.string().describe(
32
+ "Full dot-path from list_operations, e.g. 'slack.api.channels.list'"
33
+ )
34
+ },
35
+ handler: async ({ path }) => {
36
+ const result = corsair.get_schema(path);
37
+ return {
38
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
39
+ };
40
+ }
41
+ },
42
+ {
43
+ name: "corsair_run",
44
+ description: "Execute any Corsair API endpoint by its dot-path. Use list_operations to discover paths and get_schema to understand required args. Example path: 'slack.api.channels.list'.",
45
+ shape: {
46
+ path: z.string().describe("Full API dot-path, e.g. 'slack.api.messages.post'"),
47
+ args: z.record(z.unknown()).default({}).describe("Arguments object for the operation")
48
+ },
49
+ handler: async ({ path, args }) => {
50
+ const parts = path.split(".");
51
+ if (parts.length < 3) {
52
+ return {
53
+ isError: true,
54
+ content: [
55
+ {
56
+ type: "text",
57
+ text: `Invalid path "${path}". Expected format: "plugin.api.group.method". Use list_operations to see valid paths.`
58
+ }
59
+ ]
60
+ };
61
+ }
62
+ let fn = corsair;
63
+ for (const part of parts) {
64
+ if (typeof fn !== "object" || fn === null) {
65
+ fn = void 0;
66
+ break;
67
+ }
68
+ fn = fn[part];
69
+ }
70
+ if (typeof fn !== "function") {
71
+ return {
72
+ isError: true,
73
+ content: [
74
+ {
75
+ type: "text",
76
+ text: `Path "${path}" is not a callable operation. Use list_operations to see valid paths.`
77
+ }
78
+ ]
79
+ };
80
+ }
81
+ try {
82
+ const result = await fn(args);
83
+ return {
84
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
85
+ };
86
+ } catch (err) {
87
+ const message = err instanceof Error ? err.message : String(err);
88
+ const extra = err instanceof Error && err.cause ? `
89
+ Cause: ${String(err.cause)}` : "";
90
+ const full = JSON.stringify(err, Object.getOwnPropertyNames(err));
91
+ return {
92
+ isError: true,
93
+ content: [
94
+ {
95
+ type: "text",
96
+ text: `Error running "${path}": ${message}${extra}
97
+ ${full}`
98
+ }
99
+ ]
100
+ };
101
+ }
102
+ }
103
+ }
104
+ ];
105
+ if (permissions && basePermissionUrl) {
106
+ defs.push({
107
+ name: "request_permission",
108
+ description: "Request permission from the user to execute a protected endpoint. Call this when a script returns a [PERMISSION_REQUIRED] message. Returns an approval URL. After calling this, call ask_human with the approval URL so the user can review and approve.",
109
+ shape: {
110
+ endpoint: z.string().describe(
111
+ 'Full endpoint path from the PERMISSION_REQUIRED message, e.g. "slack.messages.post"'
112
+ ),
113
+ args: z.record(z.unknown()).describe(
114
+ "The arguments object from the PERMISSION_REQUIRED message"
115
+ ),
116
+ description: z.string().describe(
117
+ 'Short human-readable summary of what this action will do, e.g. "Post a message to #general in Slack"'
118
+ ),
119
+ jid: z.string().optional().describe(
120
+ "Optional chat/conversation ID for resuming after approval"
121
+ )
122
+ },
123
+ handler: async ({ endpoint, args, description }) => {
124
+ const { permissionId, approvalUrl } = await permissions.createPermissionRequest({
125
+ endpoint,
126
+ args,
127
+ description
128
+ });
129
+ const result = {
130
+ permissionId,
131
+ approvalUrl,
132
+ message: `Permission request created. Ask the user to approve at: ${approvalUrl}`
133
+ };
134
+ return {
135
+ content: [{ type: "text", text: JSON.stringify(result) }]
136
+ };
137
+ }
138
+ });
139
+ }
140
+ return defs;
141
+ }
142
+
143
+ // src/core/base.ts
144
+ function createBaseMcpServer(options) {
145
+ const server = new McpServer({
146
+ name: "corsair",
147
+ version: "1.0.0",
148
+ description: "Use this to interact with the Corsair API. Corsair helps you integrate with dozens of tools and services. You can setup cron jobs and webhooks triggered jobs."
149
+ });
150
+ for (const def of buildCorsairToolDefs(options)) {
151
+ server.registerTool(
152
+ def.name,
153
+ { description: def.description, inputSchema: z2.object(def.shape) },
154
+ def.handler
155
+ );
156
+ }
157
+ return server;
158
+ }
159
+
160
+ // src/core/http.ts
161
+ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
162
+ import { randomUUID } from "crypto";
163
+ import { Router as createRouter } from "express";
164
+ var sessions = /* @__PURE__ */ new Map();
165
+ function cleanup(sessionId) {
166
+ const session = sessions.get(sessionId);
167
+ if (session) {
168
+ session.transport.close();
169
+ session.server.close();
170
+ sessions.delete(sessionId);
171
+ }
172
+ }
173
+ function createMcpRouter(createServer) {
174
+ const router = createRouter();
175
+ router.post("/", async (req, res) => {
176
+ const sessionId = req.headers["mcp-session-id"];
177
+ if (sessionId) {
178
+ const session = sessions.get(sessionId);
179
+ if (!session) {
180
+ res.status(404).json({ error: "Session not found" });
181
+ return;
182
+ }
183
+ await session.transport.handleRequest(req, res, req.body);
184
+ return;
185
+ }
186
+ const server = createServer();
187
+ const transport = new StreamableHTTPServerTransport({
188
+ sessionIdGenerator: () => randomUUID(),
189
+ onsessioninitialized: (id) => {
190
+ sessions.set(id, { server, transport });
191
+ }
192
+ });
193
+ res.on("close", () => {
194
+ const id = transport.sessionId;
195
+ if (id) {
196
+ setTimeout(() => cleanup(id), 6e4);
197
+ }
198
+ });
199
+ await server.connect(transport);
200
+ await transport.handleRequest(req, res, req.body);
201
+ });
202
+ router.get("/", async (req, res) => {
203
+ const sessionId = req.headers["mcp-session-id"];
204
+ if (!sessionId || !sessions.has(sessionId)) {
205
+ res.status(400).json({ error: "Missing or invalid mcp-session-id" });
206
+ return;
207
+ }
208
+ const session = sessions.get(sessionId);
209
+ await session.transport.handleRequest(req, res);
210
+ });
211
+ router.delete("/", async (req, res) => {
212
+ const sessionId = req.headers["mcp-session-id"];
213
+ if (sessionId) cleanup(sessionId);
214
+ res.status(200).end();
215
+ });
216
+ return router;
217
+ }
218
+
219
+ // src/adapters/openai.ts
220
+ function getOpenAIMcpConfig(baseUrl, headers) {
221
+ return {
222
+ serverLabel: "corsair",
223
+ serverUrl: baseUrl,
224
+ headers
225
+ };
226
+ }
227
+
228
+ // src/adapters/vercel-ai.ts
229
+ async function createVercelAiMcpClient(options) {
230
+ const { createMCPClient } = await import("@ai-sdk/mcp");
231
+ const { url, headers } = options;
232
+ const client = await createMCPClient({
233
+ transport: {
234
+ type: "http",
235
+ url,
236
+ headers
237
+ }
238
+ });
239
+ return client;
240
+ }
241
+
242
+ // src/core/provider.ts
243
+ var BaseProvider = class {
244
+ build(options) {
245
+ return buildCorsairToolDefs(options).map((def) => this.wrapTool(def));
246
+ }
247
+ };
248
+
249
+ // src/adapters/claude.ts
250
+ import "zod";
251
+ var ClaudeProvider = class {
252
+ name = "claude";
253
+ async build(options) {
254
+ const { tool } = await import("@anthropic-ai/claude-agent-sdk");
255
+ return buildCorsairToolDefs(options).map(
256
+ (def) => tool(def.name, def.description, def.shape, def.handler)
257
+ );
258
+ }
259
+ };
260
+
261
+ // src/adapters/mastra.ts
262
+ import { z as z4 } from "zod";
263
+ var MastraProvider = class {
264
+ name = "mastra";
265
+ async build(options) {
266
+ const { createTool } = await import("@mastra/core/tools");
267
+ return buildCorsairToolDefs(options).map(
268
+ (def) => createTool({
269
+ id: def.name,
270
+ description: def.description,
271
+ inputSchema: z4.object(def.shape),
272
+ execute: async (inputData) => {
273
+ const result = await def.handler(inputData);
274
+ const textItems = result.content.filter((c) => c.type === "text");
275
+ if (result.isError) {
276
+ throw new Error(textItems.map((c) => c.text).join("\n"));
277
+ }
278
+ const text = textItems[0]?.text ?? "";
279
+ try {
280
+ return JSON.parse(text);
281
+ } catch {
282
+ return text;
283
+ }
284
+ }
285
+ })
286
+ );
287
+ }
288
+ };
289
+ export {
290
+ BaseProvider,
291
+ ClaudeProvider,
292
+ MastraProvider,
293
+ createBaseMcpServer,
294
+ createMcpRouter,
295
+ createVercelAiMcpClient,
296
+ getOpenAIMcpConfig
297
+ };
@@ -0,0 +1,7 @@
1
+ export type OpenAIMcpConfig = {
2
+ serverLabel: string;
3
+ serverUrl: string;
4
+ headers?: Record<string, string>;
5
+ };
6
+ export declare function getOpenAIMcpConfig(baseUrl: string, headers?: Record<string, string>): OpenAIMcpConfig;
7
+ //# sourceMappingURL=openai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../src/openai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,eAAe,CAMrG"}
@@ -0,0 +1,6 @@
1
+ export type VercelAiMcpClientOptions = {
2
+ url: string;
3
+ headers?: Record<string, string>;
4
+ };
5
+ export declare function createVercelAiMcpClient(options: VercelAiMcpClientOptions): Promise<import("@ai-sdk/mcp").MCPClient>;
6
+ //# sourceMappingURL=vercel-ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel-ai.d.ts","sourceRoot":"","sources":["../src/vercel-ai.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,4CAW9E"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@corsair-dev/mcp",
3
+ "version": "0.1.1",
4
+ "description": "Base MCP server and SDK extensions for Corsair (workflows, cron, permissions)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "dev-source": "./src/index.ts",
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "@modelcontextprotocol/sdk": "^1.27.1",
21
+ "express": "^4.21.0",
22
+ "zod": "^3.25.0",
23
+ "corsair": "0.1.28"
24
+ },
25
+ "peerDependencies": {
26
+ "@ai-sdk/mcp": ">=0.0.1",
27
+ "@anthropic-ai/claude-agent-sdk": ">=0.2.0",
28
+ "@mastra/core": ">=1.0.0",
29
+ "@openai/agents": ">=0.5.0"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "@ai-sdk/mcp": {
33
+ "optional": true
34
+ },
35
+ "@anthropic-ai/claude-agent-sdk": {
36
+ "optional": true
37
+ },
38
+ "@mastra/core": {
39
+ "optional": true
40
+ },
41
+ "@openai/agents": {
42
+ "optional": true
43
+ }
44
+ },
45
+ "devDependencies": {
46
+ "@types/express": "^4.17.21",
47
+ "@types/node": "^22.0.0",
48
+ "tsup": "^8.0.1",
49
+ "typescript": "^5.8.0"
50
+ },
51
+ "files": [
52
+ "dist"
53
+ ],
54
+ "scripts": {
55
+ "build": "tsup && tsc -p tsconfig.build.json",
56
+ "typecheck": "tsc --noEmit"
57
+ }
58
+ }