@j0hanz/fetch-url-mcp 1.12.1 → 1.12.2
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/http/auth.d.ts.map +1 -1
- package/dist/http/auth.js +3 -3
- package/dist/http/native.d.ts.map +1 -1
- package/dist/http/native.js +43 -31
- package/package.json +1 -1
package/dist/http/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/http/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EACL,iBAAiB,EAElB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAY/E,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,cAAc,CAAC;AAMtB,cAAM,UAAU;IAId,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO;CAuBrC;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC;AAS3C,cAAM,sBAAuB,SAAQ,iBAAiB;IAElD,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE;gBAAjC,cAAc,EAAE,SAAS,MAAM,EAAE,EAC1C,OAAO,SAAuB;CAKjC;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,sBAAsB,CAEjC;AAwCD,cAAM,gBAAgB;IACpB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO;IA6BtC,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,MAAM;CAoBf;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC;AAMvD,wBAAgB,2BAA2B,IAAI,IAAI,CA2BlD;AA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,GACrD,IAAI,CAYN;AAED,wBAAgB,sCAAsC,CAAC,GAAG,EAAE,eAAe,GAAG;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAeA;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKzE;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
package/dist/http/auth.js
CHANGED
|
@@ -202,12 +202,12 @@ export function ensureMcpProtocolVersion(req, res, options) {
|
|
|
202
202
|
return true;
|
|
203
203
|
}
|
|
204
204
|
logWarn('MCP protocol version rejected', { reason: 'missing_header', path }, 'http');
|
|
205
|
-
sendError(res, -32600, '
|
|
205
|
+
sendError(res, -32600, 'Please include the MCP-Protocol-Version header in your request.');
|
|
206
206
|
return false;
|
|
207
207
|
}
|
|
208
208
|
if (!SUPPORTED_MCP_PROTOCOL_VERSIONS.has(version)) {
|
|
209
209
|
logWarn('MCP protocol version rejected', { reason: 'unsupported_version', version, path }, 'http');
|
|
210
|
-
sendError(res, -32600, `
|
|
210
|
+
sendError(res, -32600, `The protocol version '${version}' isn't supported right now. Please check and try again.`);
|
|
211
211
|
return false;
|
|
212
212
|
}
|
|
213
213
|
const expectedVersion = options?.expectedVersion;
|
|
@@ -218,7 +218,7 @@ export function ensureMcpProtocolVersion(req, res, options) {
|
|
|
218
218
|
expectedVersion,
|
|
219
219
|
path,
|
|
220
220
|
}, 'http');
|
|
221
|
-
sendError(res, -32600, `
|
|
221
|
+
sendError(res, -32600, `There's a protocol version mismatch. We expected '${expectedVersion}', but received '${version}'.`);
|
|
222
222
|
return false;
|
|
223
223
|
}
|
|
224
224
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"AAm+CA,wBAAsB,eAAe,IAAI,OAAO,CAAC;IAC/C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CA2DD"}
|
package/dist/http/native.js
CHANGED
|
@@ -160,7 +160,7 @@ class McpSessionGateway {
|
|
|
160
160
|
sessionId,
|
|
161
161
|
});
|
|
162
162
|
sendJson(ctx.res, 406, {
|
|
163
|
-
error: '
|
|
163
|
+
error: 'We need you to use "text/event-stream" for this connection.',
|
|
164
164
|
});
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
@@ -190,7 +190,7 @@ class McpSessionGateway {
|
|
|
190
190
|
status: 406,
|
|
191
191
|
});
|
|
192
192
|
sendJson(ctx.res, 406, {
|
|
193
|
-
error: '
|
|
193
|
+
error: 'We need the request to accept both "application/json" and "text/event-stream".',
|
|
194
194
|
});
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
@@ -204,7 +204,7 @@ class McpSessionGateway {
|
|
|
204
204
|
status: 400,
|
|
205
205
|
mcpCode: -32600,
|
|
206
206
|
});
|
|
207
|
-
sendError(ctx.res, -32600, '
|
|
207
|
+
sendError(ctx.res, -32600, "We don't support batch requests yet. Please send one request at a time.");
|
|
208
208
|
return null;
|
|
209
209
|
}
|
|
210
210
|
if (!isMcpMessageBody(body)) {
|
|
@@ -216,7 +216,7 @@ class McpSessionGateway {
|
|
|
216
216
|
status: 400,
|
|
217
217
|
mcpCode: -32600,
|
|
218
218
|
});
|
|
219
|
-
sendError(ctx.res, -32600,
|
|
219
|
+
sendError(ctx.res, -32600, "The request body isn't quite right. Please check the format and try again.");
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
222
|
return body;
|
|
@@ -236,7 +236,7 @@ class McpSessionGateway {
|
|
|
236
236
|
mcpCode: -32600,
|
|
237
237
|
rpcId: requestId,
|
|
238
238
|
});
|
|
239
|
-
sendError(ctx.res, -32600, 'notifications/initialized must be sent as a notification
|
|
239
|
+
sendError(ctx.res, -32600, "The 'notifications/initialized' message must be sent as a notification, without an ID.", 400, requestId);
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
242
242
|
const sessionState = this.getOptionalAuthenticatedSession(ctx, requestId);
|
|
@@ -276,7 +276,7 @@ class McpSessionGateway {
|
|
|
276
276
|
mcpCode: -32600,
|
|
277
277
|
rpcId: requestId,
|
|
278
278
|
});
|
|
279
|
-
sendError(ctx.res, -32600, '
|
|
279
|
+
sendError(ctx.res, -32600, "We couldn't find a session ID for your request. Please ensure you have an active session.", 400, requestId);
|
|
280
280
|
return false;
|
|
281
281
|
}
|
|
282
282
|
return true;
|
|
@@ -299,7 +299,7 @@ class McpSessionGateway {
|
|
|
299
299
|
sessionId,
|
|
300
300
|
rpcId: requestId,
|
|
301
301
|
});
|
|
302
|
-
sendError(ctx.res, -32600, '
|
|
302
|
+
sendError(ctx.res, -32600, "Your session hasn't been initialized yet. Please wait a moment and try again.", 400, requestId);
|
|
303
303
|
return false;
|
|
304
304
|
}
|
|
305
305
|
async getOrCreateTransport(ctx, requestId) {
|
|
@@ -324,7 +324,7 @@ class McpSessionGateway {
|
|
|
324
324
|
mcpCode: -32600,
|
|
325
325
|
rpcId: requestId,
|
|
326
326
|
});
|
|
327
|
-
sendError(ctx.res, -32600, '
|
|
327
|
+
sendError(ctx.res, -32600, "We couldn't find a session ID for your request. Please ensure you have an active session.", 400, requestId);
|
|
328
328
|
return null;
|
|
329
329
|
}
|
|
330
330
|
if (!isInitializeRequest(ctx.body)) {
|
|
@@ -340,7 +340,9 @@ class McpSessionGateway {
|
|
|
340
340
|
mcpCode: invalidInitialize ? -32602 : -32600,
|
|
341
341
|
rpcId: requestId,
|
|
342
342
|
});
|
|
343
|
-
sendError(ctx.res, invalidInitialize ? -32602 : -32600, invalidInitialize
|
|
343
|
+
sendError(ctx.res, invalidInitialize ? -32602 : -32600, invalidInitialize
|
|
344
|
+
? 'The initialize request format is invalid. Please double-check your parameters.'
|
|
345
|
+
: "We couldn't find a session ID for your request. Please ensure you have an active session.", 400, requestId);
|
|
344
346
|
return null;
|
|
345
347
|
}
|
|
346
348
|
const negotiatedProtocolVersion = resolveRequestedProtocolVersion(ctx.body);
|
|
@@ -360,7 +362,7 @@ class McpSessionGateway {
|
|
|
360
362
|
negotiatedProtocolVersion,
|
|
361
363
|
},
|
|
362
364
|
});
|
|
363
|
-
sendError(ctx.res, -32600, `
|
|
365
|
+
sendError(ctx.res, -32600, `There's a mismatch in the protocol version. The header says '${headerProtocolVersion}' but the body says '${negotiatedProtocolVersion}'.`, 400, requestId);
|
|
364
366
|
return null;
|
|
365
367
|
}
|
|
366
368
|
return negotiatedProtocolVersion;
|
|
@@ -388,13 +390,13 @@ class McpSessionGateway {
|
|
|
388
390
|
return null;
|
|
389
391
|
const { sessionId, session } = state;
|
|
390
392
|
if (!sessionId || !session) {
|
|
391
|
-
sendError(ctx.res, -32600, '
|
|
393
|
+
sendError(ctx.res, -32600, "We couldn't find a session ID for your request. Please ensure you have an active session.", 400, requestId);
|
|
392
394
|
return null;
|
|
393
395
|
}
|
|
394
396
|
if (!this.ensureSessionProtocolVersion(ctx, session))
|
|
395
397
|
return null;
|
|
396
398
|
if (options?.requireInitialized && !session.protocolInitialized) {
|
|
397
|
-
sendError(ctx.res, -32600, '
|
|
399
|
+
sendError(ctx.res, -32600, "Your session hasn't been initialized yet. Please wait a moment and try again.", 400, requestId);
|
|
398
400
|
return null;
|
|
399
401
|
}
|
|
400
402
|
return { sessionId, session };
|
|
@@ -411,7 +413,7 @@ class McpSessionGateway {
|
|
|
411
413
|
sessionId,
|
|
412
414
|
rpcId: requestId,
|
|
413
415
|
});
|
|
414
|
-
sendError(res, -32600, '
|
|
416
|
+
sendError(res, -32600, "We couldn't find your session. It might have expired or been closed.", 404, requestId);
|
|
415
417
|
return null;
|
|
416
418
|
}
|
|
417
419
|
if (!authFingerprint || session.authFingerprint !== authFingerprint) {
|
|
@@ -424,7 +426,7 @@ class McpSessionGateway {
|
|
|
424
426
|
sessionId,
|
|
425
427
|
rpcId: requestId,
|
|
426
428
|
});
|
|
427
|
-
sendError(res, -32600, '
|
|
429
|
+
sendError(res, -32600, "We couldn't find your session. It might have expired or been closed.", 404, requestId);
|
|
428
430
|
return null;
|
|
429
431
|
}
|
|
430
432
|
return session;
|
|
@@ -493,7 +495,7 @@ class McpSessionGateway {
|
|
|
493
495
|
path: ctx.url.pathname,
|
|
494
496
|
method: ctx.method,
|
|
495
497
|
}, 'session');
|
|
496
|
-
sendError(ctx.res, -32603, '
|
|
498
|
+
sendError(ctx.res, -32603, "We're missing some authorization details to process this request.", 500, requestId);
|
|
497
499
|
return null;
|
|
498
500
|
}
|
|
499
501
|
const ownerKey = buildAuthenticatedOwnerKey(ctx.auth);
|
|
@@ -502,7 +504,7 @@ class McpSessionGateway {
|
|
|
502
504
|
path: ctx.url.pathname,
|
|
503
505
|
method: ctx.method,
|
|
504
506
|
}, 'session');
|
|
505
|
-
sendError(ctx.res, -32603, '
|
|
507
|
+
sendError(ctx.res, -32603, "We're missing the owner information needed to authorize this request.", 500, requestId);
|
|
506
508
|
return null;
|
|
507
509
|
}
|
|
508
510
|
if (!this.reserveCapacity(ctx.res, requestId))
|
|
@@ -586,13 +588,13 @@ class McpSessionGateway {
|
|
|
586
588
|
});
|
|
587
589
|
if (!allowed) {
|
|
588
590
|
logWarn('Session capacity exhausted', { maxSessions: config.server.maxSessions }, 'session');
|
|
589
|
-
sendError(res, -32000, '
|
|
591
|
+
sendError(res, -32000, 'The server is currently too busy to handle your request. Please try again in a little while.', 503, requestId);
|
|
590
592
|
return false;
|
|
591
593
|
}
|
|
592
594
|
// Double-check: capacity may have changed during the async eviction window above.
|
|
593
595
|
if (!reserveSessionSlot(this.store, config.server.maxSessions)) {
|
|
594
596
|
logWarn('Session capacity exhausted (post-eviction)', { maxSessions: config.server.maxSessions }, 'session');
|
|
595
|
-
sendError(res, -32000, '
|
|
597
|
+
sendError(res, -32000, 'The server is currently too busy to handle your request. Please try again in a little while.', 503, requestId);
|
|
596
598
|
return false;
|
|
597
599
|
}
|
|
598
600
|
return true;
|
|
@@ -648,16 +650,22 @@ class HttpDispatcher {
|
|
|
648
650
|
if (handled)
|
|
649
651
|
return;
|
|
650
652
|
ctx.res.setHeader('Allow', 'DELETE, GET, OPTIONS, POST');
|
|
651
|
-
sendJson(ctx.res, 405, {
|
|
653
|
+
sendJson(ctx.res, 405, {
|
|
654
|
+
error: "Looks like you tried to use a method that isn't allowed here.",
|
|
655
|
+
});
|
|
652
656
|
return;
|
|
653
657
|
}
|
|
654
|
-
sendJson(ctx.res, 404, {
|
|
658
|
+
sendJson(ctx.res, 404, {
|
|
659
|
+
error: "We couldn't find what you were looking for.",
|
|
660
|
+
});
|
|
655
661
|
}
|
|
656
662
|
catch (err) {
|
|
657
663
|
const error = toError(err);
|
|
658
664
|
logError('Request failed', error, 'http');
|
|
659
665
|
if (!ctx.res.writableEnded) {
|
|
660
|
-
sendJson(ctx.res, 500, {
|
|
666
|
+
sendJson(ctx.res, 500, {
|
|
667
|
+
error: "Something went wrong on our end. We're looking into it!",
|
|
668
|
+
});
|
|
661
669
|
}
|
|
662
670
|
}
|
|
663
671
|
}
|
|
@@ -700,21 +708,21 @@ class HttpDispatcher {
|
|
|
700
708
|
const DEFAULT_BODY_ERROR = {
|
|
701
709
|
statusCode: 400,
|
|
702
710
|
mcpCode: -32700,
|
|
703
|
-
mcpMsg: '
|
|
704
|
-
restMsg: '
|
|
711
|
+
mcpMsg: "We couldn't parse the request body. Please ensure it's valid JSON.",
|
|
712
|
+
restMsg: "The request body doesn't seem to be valid JSON. Please check and try again.",
|
|
705
713
|
};
|
|
706
714
|
const BODY_PARSE_ERRORS = {
|
|
707
715
|
'payload-too-large': {
|
|
708
716
|
statusCode: 413,
|
|
709
717
|
mcpCode: -32600,
|
|
710
|
-
mcpMsg: '
|
|
711
|
-
restMsg: '
|
|
718
|
+
mcpMsg: 'The request body is too large. Please send a smaller payload.',
|
|
719
|
+
restMsg: 'That request is a bit too big for us to handle right now.',
|
|
712
720
|
},
|
|
713
721
|
'read-failed': {
|
|
714
722
|
statusCode: 400,
|
|
715
723
|
mcpCode: -32600,
|
|
716
|
-
mcpMsg: '
|
|
717
|
-
restMsg: '
|
|
724
|
+
mcpMsg: 'We ran into an issue reading the request. Please try sending it again.',
|
|
725
|
+
restMsg: "The request body doesn't seem to be valid JSON. Please check and try again.",
|
|
718
726
|
},
|
|
719
727
|
default: DEFAULT_BODY_ERROR,
|
|
720
728
|
};
|
|
@@ -788,7 +796,7 @@ class HttpRequestPipeline {
|
|
|
788
796
|
details: { header: duplicateHeader },
|
|
789
797
|
});
|
|
790
798
|
sendJson(rawRes, 400, {
|
|
791
|
-
error: `
|
|
799
|
+
error: `It seems the '${duplicateHeader}' header was sent multiple times when it should only be sent once.`,
|
|
792
800
|
});
|
|
793
801
|
drainRequest(rawReq);
|
|
794
802
|
return true;
|
|
@@ -810,7 +818,9 @@ class HttpRequestPipeline {
|
|
|
810
818
|
return false;
|
|
811
819
|
}
|
|
812
820
|
if (!this.rateLimiter.check(ctx)) {
|
|
813
|
-
sendJson(ctx.res, 429, {
|
|
821
|
+
sendJson(ctx.res, 429, {
|
|
822
|
+
error: "You're sending requests a bit too quickly. Please slow down and try again.",
|
|
823
|
+
});
|
|
814
824
|
drainRequest(rawReq);
|
|
815
825
|
return false;
|
|
816
826
|
}
|
|
@@ -828,7 +838,7 @@ class HttpRequestPipeline {
|
|
|
828
838
|
catch (error) {
|
|
829
839
|
const bodyErrorKind = isJsonBodyError(error) ? error.kind : null;
|
|
830
840
|
if (bodyErrorKind === 'payload-too-large') {
|
|
831
|
-
logWarn('
|
|
841
|
+
logWarn('The request body is too large. Please send a smaller payload.', { method: ctx.method, path: ctx.url.pathname }, 'http');
|
|
832
842
|
}
|
|
833
843
|
else if (bodyErrorKind === 'read-failed' || bodyErrorKind === null) {
|
|
834
844
|
logError('Request body parsing failed', toError(error), 'http');
|
|
@@ -857,7 +867,9 @@ function handlePipelineError(error, res) {
|
|
|
857
867
|
if (res.writableEnded)
|
|
858
868
|
return;
|
|
859
869
|
if (!res.headersSent) {
|
|
860
|
-
sendJson(res, 500, {
|
|
870
|
+
sendJson(res, 500, {
|
|
871
|
+
error: "Something went wrong on our end. We're looking into it!",
|
|
872
|
+
});
|
|
861
873
|
return;
|
|
862
874
|
}
|
|
863
875
|
res.end();
|
package/package.json
CHANGED