xmcp 0.0.9 → 0.0.10
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/README.md +8 -0
- package/dist/auth/api-key.d.ts +7 -0
- package/dist/auth/api-key.d.ts.map +1 -0
- package/dist/auth/jwt.d.ts +7 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/cli.js +22 -1
- package/dist/cli.js.LICENSE.txt +2 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.LICENSE.txt +2 -0
- package/dist/platforms/build-vercel-output.d.ts.map +1 -1
- package/dist/runtime/base-streamable-http.d.ts +26 -0
- package/dist/runtime/base-streamable-http.d.ts.map +1 -0
- package/dist/runtime/sse.js +1 -1
- package/dist/runtime/stateless-streamable-http.d.ts +32 -0
- package/dist/runtime/stateless-streamable-http.d.ts.map +1 -0
- package/dist/runtime/streamable-http.d.ts +2 -0
- package/dist/runtime/streamable-http.d.ts.map +1 -0
- package/dist/runtime/streamable-http.js +2 -0
- package/dist/runtime/streamable-http.js.LICENSE.txt +250 -0
- package/dist/templates/home.d.ts +3 -0
- package/dist/templates/home.d.ts.map +1 -0
- package/dist/types/middleware.d.ts +3 -0
- package/dist/types/middleware.d.ts.map +1 -0
- package/dist/utils/generate-import-code.d.ts +1 -1
- package/dist/utils/generate-import-code.d.ts.map +1 -1
- package/dist/utils/get-webpack-config.d.ts.map +1 -1
- package/dist/utils/parse-config.d.ts +145 -0
- package/dist/utils/parse-config.d.ts.map +1 -1
- package/dist/utils/spawn-process.d.ts +10 -0
- package/dist/utils/spawn-process.d.ts.map +1 -0
- package/package.json +33 -3
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* accepts
|
|
3
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*!
|
|
9
|
+
* body-parser
|
|
10
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
11
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
12
|
+
* MIT Licensed
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/*!
|
|
16
|
+
* body-parser
|
|
17
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
18
|
+
* MIT Licensed
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/*!
|
|
22
|
+
* bytes
|
|
23
|
+
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
24
|
+
* Copyright(c) 2015 Jed Watson
|
|
25
|
+
* MIT Licensed
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/*!
|
|
29
|
+
* content-disposition
|
|
30
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
31
|
+
* MIT Licensed
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/*!
|
|
35
|
+
* content-type
|
|
36
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
37
|
+
* MIT Licensed
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/*!
|
|
41
|
+
* cookie
|
|
42
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
43
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
44
|
+
* MIT Licensed
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/*!
|
|
48
|
+
* depd
|
|
49
|
+
* Copyright(c) 2014-2018 Douglas Christopher Wilson
|
|
50
|
+
* MIT Licensed
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/*!
|
|
54
|
+
* destroy
|
|
55
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
56
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
57
|
+
* MIT Licensed
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/*!
|
|
61
|
+
* ee-first
|
|
62
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
63
|
+
* MIT Licensed
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/*!
|
|
67
|
+
* encodeurl
|
|
68
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
69
|
+
* MIT Licensed
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/*!
|
|
73
|
+
* escape-html
|
|
74
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
75
|
+
* Copyright(c) 2015 Andreas Lubbe
|
|
76
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
77
|
+
* MIT Licensed
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/*!
|
|
81
|
+
* etag
|
|
82
|
+
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
83
|
+
* MIT Licensed
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/*!
|
|
87
|
+
* express
|
|
88
|
+
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|
89
|
+
* Copyright(c) 2013 Roman Shtylman
|
|
90
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
91
|
+
* MIT Licensed
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/*!
|
|
95
|
+
* express
|
|
96
|
+
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|
97
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
98
|
+
* MIT Licensed
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/*!
|
|
102
|
+
* finalhandler
|
|
103
|
+
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
104
|
+
* MIT Licensed
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
/*!
|
|
108
|
+
* forwarded
|
|
109
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
110
|
+
* MIT Licensed
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/*!
|
|
114
|
+
* fresh
|
|
115
|
+
* Copyright(c) 2012 TJ Holowaychuk
|
|
116
|
+
* Copyright(c) 2016-2017 Douglas Christopher Wilson
|
|
117
|
+
* MIT Licensed
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/*!
|
|
121
|
+
* http-errors
|
|
122
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
123
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
124
|
+
* MIT Licensed
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/*!
|
|
128
|
+
* media-typer
|
|
129
|
+
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
130
|
+
* MIT Licensed
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/*!
|
|
134
|
+
* merge-descriptors
|
|
135
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
136
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
137
|
+
* MIT Licensed
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/*!
|
|
141
|
+
* methods
|
|
142
|
+
* Copyright(c) 2013-2014 TJ Holowaychuk
|
|
143
|
+
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
|
144
|
+
* MIT Licensed
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/*!
|
|
148
|
+
* mime-db
|
|
149
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
150
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
151
|
+
* MIT Licensed
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/*!
|
|
155
|
+
* mime-types
|
|
156
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
157
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
158
|
+
* MIT Licensed
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/*!
|
|
162
|
+
* negotiator
|
|
163
|
+
* Copyright(c) 2012 Federico Romero
|
|
164
|
+
* Copyright(c) 2012-2014 Isaac Z. Schlueter
|
|
165
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
166
|
+
* MIT Licensed
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/*!
|
|
170
|
+
* on-finished
|
|
171
|
+
* Copyright(c) 2013 Jonathan Ong
|
|
172
|
+
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
173
|
+
* MIT Licensed
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/*!
|
|
177
|
+
* parseurl
|
|
178
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
179
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
180
|
+
* MIT Licensed
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
/*!
|
|
184
|
+
* proxy-addr
|
|
185
|
+
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
186
|
+
* MIT Licensed
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
/*!
|
|
190
|
+
* range-parser
|
|
191
|
+
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
192
|
+
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
|
193
|
+
* MIT Licensed
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
/*!
|
|
197
|
+
* raw-body
|
|
198
|
+
* Copyright(c) 2013-2014 Jonathan Ong
|
|
199
|
+
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
200
|
+
* MIT Licensed
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
/*!
|
|
204
|
+
* send
|
|
205
|
+
* Copyright(c) 2012 TJ Holowaychuk
|
|
206
|
+
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
|
207
|
+
* MIT Licensed
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/*!
|
|
211
|
+
* serve-static
|
|
212
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
213
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
214
|
+
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
215
|
+
* MIT Licensed
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
/*!
|
|
219
|
+
* statuses
|
|
220
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
221
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
222
|
+
* MIT Licensed
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/*!
|
|
226
|
+
* toidentifier
|
|
227
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
228
|
+
* MIT Licensed
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
/*!
|
|
232
|
+
* type-is
|
|
233
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
234
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
235
|
+
* MIT Licensed
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
/*!
|
|
239
|
+
* unpipe
|
|
240
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
241
|
+
* MIT Licensed
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/*!
|
|
245
|
+
* vary
|
|
246
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
247
|
+
* MIT Licensed
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/templates/home.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,GAAI,UAAU,MAAM,WA8CrC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/types/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function generateImportCode(pathlist: string[]): string;
|
|
1
|
+
export declare function generateImportCode(pathlist: string[], hasMiddleware: boolean): string;
|
|
2
2
|
//# sourceMappingURL=generate-import-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-import-code.d.ts","sourceRoot":"","sources":["../../src/utils/generate-import-code.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"generate-import-code.d.ts","sourceRoot":"","sources":["../../src/utils/generate-import-code.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAAE,EAClB,aAAa,EAAE,OAAO,GACrB,MAAM,CAmBR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-webpack-config.d.ts","sourceRoot":"","sources":["../../src/utils/get-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAA+B,MAAM,SAAS,CAAC;AAK/E,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"get-webpack-config.d.ts","sourceRoot":"","sources":["../../src/utils/get-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAA+B,MAAM,SAAS,CAAC;AAK/E,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAOL,UAAU,EACX,MAAM,gBAAgB,CAAC;AAYxB,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,UAAU,GACrB,aAAa,CAoJf"}
|
|
@@ -1,32 +1,177 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DEFAULT_SSE_PORT = 3001;
|
|
3
3
|
export declare const DEFAULT_SSE_BODY_SIZE_LIMIT: number;
|
|
4
|
+
export declare const DEFAULT_STREAMABLE_HTTP_PORT = 3002;
|
|
5
|
+
export declare const DEFAULT_STREAMABLE_HTTP_BODY_SIZE_LIMIT: number;
|
|
6
|
+
export declare const DEFAULT_STREAMABLE_HTTP_ENDPOINT = "/mcp";
|
|
7
|
+
export declare const DEFAULT_STREAMABLE_HTTP_STATELESS = true;
|
|
4
8
|
declare const configSchema: z.ZodObject<{
|
|
5
9
|
sse: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
6
10
|
port: z.ZodDefault<z.ZodNumber>;
|
|
7
11
|
bodySizeLimit: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
cors: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
|
|
14
|
+
methods: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
15
|
+
allowedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
16
|
+
exposedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
17
|
+
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
origin?: string | boolean | string[] | undefined;
|
|
21
|
+
methods?: string | string[] | undefined;
|
|
22
|
+
allowedHeaders?: string | string[] | undefined;
|
|
23
|
+
exposedHeaders?: string | string[] | undefined;
|
|
24
|
+
credentials?: boolean | undefined;
|
|
25
|
+
maxAge?: number | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
origin?: string | boolean | string[] | undefined;
|
|
28
|
+
methods?: string | string[] | undefined;
|
|
29
|
+
allowedHeaders?: string | string[] | undefined;
|
|
30
|
+
exposedHeaders?: string | string[] | undefined;
|
|
31
|
+
credentials?: boolean | undefined;
|
|
32
|
+
maxAge?: number | undefined;
|
|
33
|
+
}>>;
|
|
8
34
|
}, "strip", z.ZodTypeAny, {
|
|
9
35
|
port: number;
|
|
10
36
|
bodySizeLimit: number;
|
|
37
|
+
cors?: {
|
|
38
|
+
origin?: string | boolean | string[] | undefined;
|
|
39
|
+
methods?: string | string[] | undefined;
|
|
40
|
+
allowedHeaders?: string | string[] | undefined;
|
|
41
|
+
exposedHeaders?: string | string[] | undefined;
|
|
42
|
+
credentials?: boolean | undefined;
|
|
43
|
+
maxAge?: number | undefined;
|
|
44
|
+
} | undefined;
|
|
11
45
|
}, {
|
|
12
46
|
port?: number | undefined;
|
|
13
47
|
bodySizeLimit?: number | undefined;
|
|
48
|
+
cors?: {
|
|
49
|
+
origin?: string | boolean | string[] | undefined;
|
|
50
|
+
methods?: string | string[] | undefined;
|
|
51
|
+
allowedHeaders?: string | string[] | undefined;
|
|
52
|
+
exposedHeaders?: string | string[] | undefined;
|
|
53
|
+
credentials?: boolean | undefined;
|
|
54
|
+
maxAge?: number | undefined;
|
|
55
|
+
} | undefined;
|
|
14
56
|
}>]>>;
|
|
15
57
|
stdio: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
"streamable-http": z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
59
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
60
|
+
bodySizeLimit: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
debug: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
+
endpoint: z.ZodDefault<z.ZodString>;
|
|
63
|
+
stateless: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
cors: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
|
|
66
|
+
methods: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
67
|
+
allowedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
68
|
+
exposedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
69
|
+
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
origin?: string | boolean | string[] | undefined;
|
|
73
|
+
methods?: string | string[] | undefined;
|
|
74
|
+
allowedHeaders?: string | string[] | undefined;
|
|
75
|
+
exposedHeaders?: string | string[] | undefined;
|
|
76
|
+
credentials?: boolean | undefined;
|
|
77
|
+
maxAge?: number | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
origin?: string | boolean | string[] | undefined;
|
|
80
|
+
methods?: string | string[] | undefined;
|
|
81
|
+
allowedHeaders?: string | string[] | undefined;
|
|
82
|
+
exposedHeaders?: string | string[] | undefined;
|
|
83
|
+
credentials?: boolean | undefined;
|
|
84
|
+
maxAge?: number | undefined;
|
|
85
|
+
}>>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
port: number;
|
|
88
|
+
bodySizeLimit: number;
|
|
89
|
+
debug: boolean;
|
|
90
|
+
endpoint: string;
|
|
91
|
+
stateless: boolean;
|
|
92
|
+
cors?: {
|
|
93
|
+
origin?: string | boolean | string[] | undefined;
|
|
94
|
+
methods?: string | string[] | undefined;
|
|
95
|
+
allowedHeaders?: string | string[] | undefined;
|
|
96
|
+
exposedHeaders?: string | string[] | undefined;
|
|
97
|
+
credentials?: boolean | undefined;
|
|
98
|
+
maxAge?: number | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
port?: number | undefined;
|
|
102
|
+
bodySizeLimit?: number | undefined;
|
|
103
|
+
cors?: {
|
|
104
|
+
origin?: string | boolean | string[] | undefined;
|
|
105
|
+
methods?: string | string[] | undefined;
|
|
106
|
+
allowedHeaders?: string | string[] | undefined;
|
|
107
|
+
exposedHeaders?: string | string[] | undefined;
|
|
108
|
+
credentials?: boolean | undefined;
|
|
109
|
+
maxAge?: number | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
debug?: boolean | undefined;
|
|
112
|
+
endpoint?: string | undefined;
|
|
113
|
+
stateless?: boolean | undefined;
|
|
114
|
+
}>]>>;
|
|
16
115
|
webpack: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodAny>>;
|
|
17
116
|
}, "strip", z.ZodTypeAny, {
|
|
18
117
|
sse?: boolean | {
|
|
19
118
|
port: number;
|
|
20
119
|
bodySizeLimit: number;
|
|
120
|
+
cors?: {
|
|
121
|
+
origin?: string | boolean | string[] | undefined;
|
|
122
|
+
methods?: string | string[] | undefined;
|
|
123
|
+
allowedHeaders?: string | string[] | undefined;
|
|
124
|
+
exposedHeaders?: string | string[] | undefined;
|
|
125
|
+
credentials?: boolean | undefined;
|
|
126
|
+
maxAge?: number | undefined;
|
|
127
|
+
} | undefined;
|
|
21
128
|
} | undefined;
|
|
22
129
|
stdio?: boolean | undefined;
|
|
130
|
+
"streamable-http"?: boolean | {
|
|
131
|
+
port: number;
|
|
132
|
+
bodySizeLimit: number;
|
|
133
|
+
debug: boolean;
|
|
134
|
+
endpoint: string;
|
|
135
|
+
stateless: boolean;
|
|
136
|
+
cors?: {
|
|
137
|
+
origin?: string | boolean | string[] | undefined;
|
|
138
|
+
methods?: string | string[] | undefined;
|
|
139
|
+
allowedHeaders?: string | string[] | undefined;
|
|
140
|
+
exposedHeaders?: string | string[] | undefined;
|
|
141
|
+
credentials?: boolean | undefined;
|
|
142
|
+
maxAge?: number | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
} | undefined;
|
|
23
145
|
webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
|
|
24
146
|
}, {
|
|
25
147
|
sse?: boolean | {
|
|
26
148
|
port?: number | undefined;
|
|
27
149
|
bodySizeLimit?: number | undefined;
|
|
150
|
+
cors?: {
|
|
151
|
+
origin?: string | boolean | string[] | undefined;
|
|
152
|
+
methods?: string | string[] | undefined;
|
|
153
|
+
allowedHeaders?: string | string[] | undefined;
|
|
154
|
+
exposedHeaders?: string | string[] | undefined;
|
|
155
|
+
credentials?: boolean | undefined;
|
|
156
|
+
maxAge?: number | undefined;
|
|
157
|
+
} | undefined;
|
|
28
158
|
} | undefined;
|
|
29
159
|
stdio?: boolean | undefined;
|
|
160
|
+
"streamable-http"?: boolean | {
|
|
161
|
+
port?: number | undefined;
|
|
162
|
+
bodySizeLimit?: number | undefined;
|
|
163
|
+
cors?: {
|
|
164
|
+
origin?: string | boolean | string[] | undefined;
|
|
165
|
+
methods?: string | string[] | undefined;
|
|
166
|
+
allowedHeaders?: string | string[] | undefined;
|
|
167
|
+
exposedHeaders?: string | string[] | undefined;
|
|
168
|
+
credentials?: boolean | undefined;
|
|
169
|
+
maxAge?: number | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
debug?: boolean | undefined;
|
|
172
|
+
endpoint?: string | undefined;
|
|
173
|
+
stateless?: boolean | undefined;
|
|
174
|
+
} | undefined;
|
|
30
175
|
webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
|
|
31
176
|
}>;
|
|
32
177
|
export type XmcpConfig = z.infer<typeof configSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../src/utils/parse-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../src/utils/parse-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D,eAAO,MAAM,4BAA4B,OAAO,CAAC;AACjD,eAAO,MAAM,uCAAuC,QAAmB,CAAC;AACxE,eAAO,MAAM,gCAAgC,SAAS,CAAC;AACvD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAYtD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BhB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAgBtD,wBAAgB,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,UAAU,CAW5D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChildProcess } from "child_process";
|
|
2
|
+
/**
|
|
3
|
+
* Pass in a ChildProcess, and this will spawn a watchdog process that
|
|
4
|
+
* will make sure it exits if the parent does, thus preventing any
|
|
5
|
+
* dangling detached zombie processes.
|
|
6
|
+
*
|
|
7
|
+
* If the child ends before the parent, then the watchdog will terminate.
|
|
8
|
+
*/
|
|
9
|
+
export declare const watchdog: (child: ChildProcess) => ChildProcess;
|
|
10
|
+
//# sourceMappingURL=spawn-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-process.d.ts","sourceRoot":"","sources":["../../src/utils/spawn-process.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AAyBpD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,YAAY,iBAU3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmcp",
|
|
3
3
|
"description": "The MCP framework",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Basement Studio",
|
|
7
|
+
"email": "hello@basement.studio",
|
|
8
|
+
"url": "https://basement.studio"
|
|
9
|
+
},
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Valentina Bearzotti",
|
|
13
|
+
"email": "valebearzotti1@gmail.com",
|
|
14
|
+
"url": "https://github.com/valebearzotti"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "Matias Gonzalez Fernandez",
|
|
18
|
+
"email": "matiasngf@hotmail.com",
|
|
19
|
+
"url": "https://github.com/matiasngf"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/basementstudio/xmcp"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://xmcp.run",
|
|
5
28
|
"type": "commonjs",
|
|
6
29
|
"main": "./dist/index.js",
|
|
7
30
|
"types": "./dist/index.d.ts",
|
|
@@ -12,11 +35,11 @@
|
|
|
12
35
|
"dist"
|
|
13
36
|
],
|
|
14
37
|
"scripts": {
|
|
15
|
-
"dev": "cross-env NODE_ENV=development tsx --watch --tsconfig ./compiler.tsconfig.json ./compiler/index.ts
|
|
38
|
+
"dev": "cross-env NODE_ENV=development tsx --watch --tsconfig ./compiler.tsconfig.json ./compiler/index.ts",
|
|
16
39
|
"build": "cross-env NODE_ENV=production tsx --tsconfig ./compiler.tsconfig.json ./compiler/index.ts && tsc --emitDeclarationOnly"
|
|
17
40
|
},
|
|
18
41
|
"dependencies": {
|
|
19
|
-
"@modelcontextprotocol/inspector": "
|
|
42
|
+
"@modelcontextprotocol/inspector": "0.14.3",
|
|
20
43
|
"@modelcontextprotocol/sdk": "^1.11.4",
|
|
21
44
|
"@swc/core": "^1.11.24",
|
|
22
45
|
"@types/express": "^5.0.1",
|
|
@@ -25,20 +48,27 @@
|
|
|
25
48
|
"chokidar": "^3.6.0",
|
|
26
49
|
"clean-webpack-plugin": "^4.0.0",
|
|
27
50
|
"commander": "^10.0.0",
|
|
51
|
+
"content-type": "^1.0.5",
|
|
28
52
|
"cross-env": "^7.0.3",
|
|
29
53
|
"del": "^7.0.0",
|
|
54
|
+
"dotenv": "^16.5.0",
|
|
55
|
+
"execa": "^9.6.0",
|
|
30
56
|
"express": "^4.19.1",
|
|
31
57
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
32
58
|
"fs-extra": "^11.3.0",
|
|
33
59
|
"glob": "^11.0.2",
|
|
34
60
|
"handlebars": "^4.7.7",
|
|
61
|
+
"jsonwebtoken": "^9.0.2",
|
|
62
|
+
"raw-body": "^3.0.0",
|
|
35
63
|
"tsx": "^4.19.4",
|
|
36
64
|
"webpack": "^5.99.7",
|
|
37
65
|
"webpack-node-externals": "^3.0.0",
|
|
38
66
|
"webpack-virtual-modules": "^0.5.0"
|
|
39
67
|
},
|
|
40
68
|
"devDependencies": {
|
|
69
|
+
"@types/content-type": "^1.1.9",
|
|
41
70
|
"@types/fs-extra": "^11.0.4",
|
|
71
|
+
"@types/jsonwebtoken": "^9.0.9",
|
|
42
72
|
"@types/node": "^22",
|
|
43
73
|
"copy-webpack-plugin": "^12.0.2",
|
|
44
74
|
"node-loader": "^1.0.1",
|