@j0hanz/fetch-url-mcp 1.13.0 → 2.0.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 +21 -21
- package/README.md +815 -807
- package/dist/assets/logo.svg +53 -53
- package/dist/http/auth.d.ts +7 -3
- package/dist/http/auth.d.ts.map +1 -1
- package/dist/http/auth.js +65 -37
- package/dist/http/helpers.d.ts +21 -0
- package/dist/http/helpers.d.ts.map +1 -0
- package/dist/http/helpers.js +31 -0
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +1 -0
- package/dist/http/native.d.ts +6 -24
- package/dist/http/native.d.ts.map +1 -1
- package/dist/http/native.js +141 -86
- package/dist/http/rate-limit.d.ts +1 -1
- package/dist/http/rate-limit.d.ts.map +1 -1
- package/dist/http/rate-limit.js +3 -9
- package/dist/index.js +0 -0
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +1 -0
- package/dist/lib/core.d.ts +4 -3
- package/dist/lib/core.d.ts.map +1 -1
- package/dist/lib/core.js +4 -1
- package/dist/lib/error/classify.d.ts.map +1 -1
- package/dist/lib/error/classify.js +27 -6
- package/dist/lib/error/payload.d.ts +2 -2
- package/dist/lib/error/payload.d.ts.map +1 -1
- package/dist/lib/error/payload.js +2 -2
- package/dist/lib/mcp-interop.d.ts +9 -108
- package/dist/lib/mcp-interop.d.ts.map +1 -1
- package/dist/lib/mcp-interop.js +39 -240
- package/dist/lib/net/http.d.ts.map +1 -1
- package/dist/lib/net/http.js +4 -17
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +67 -60
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +39 -34
- package/dist/tasks/adapter.d.ts +15 -0
- package/dist/tasks/adapter.d.ts.map +1 -0
- package/dist/tasks/adapter.js +138 -0
- package/dist/tasks/manager.d.ts +14 -82
- package/dist/tasks/manager.d.ts.map +1 -1
- package/dist/tasks/manager.js +48 -607
- package/dist/tasks/store.d.ts +33 -19
- package/dist/tasks/store.d.ts.map +1 -1
- package/dist/tasks/store.js +143 -80
- package/dist/tools/index.d.ts +7 -13
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +153 -58
- package/dist/transform/index.js +1 -1
- package/package.json +110 -108
package/dist/assets/logo.svg
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
|
|
3
|
-
<!-- License: CC Attribution. Made by Saeedworks: https://dribbble.com/saeedworks -->
|
|
4
|
-
|
|
5
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="web globe icon">
|
|
6
|
-
<style>
|
|
7
|
-
.primary {
|
|
8
|
-
fill: #141314;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.secondary {
|
|
12
|
-
fill: #000000;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (prefers-color-scheme: dark) {
|
|
16
|
-
.primary {
|
|
17
|
-
fill: #FEFBFF;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.secondary {
|
|
21
|
-
fill: #FFFFFF;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
25
|
-
<g id="style=bulk">
|
|
26
|
-
<g id="web">
|
|
27
|
-
<g id="vector">
|
|
28
|
-
<path class="primary"
|
|
29
|
-
d="M21.4016 7.31948C20.3697 7.63221 18.5789 8.14039 16.6598 8.53603C16.2178 5.84926 15.4429 3.16951 15.0702 1.95598C17.8422 2.80227 20.1273 4.76467 21.4016 7.31948Z" />
|
|
30
|
-
<path class="primary"
|
|
31
|
-
d="M15.1116 8.82229C14.0253 8.99781 12.9513 9.1125 12 9.1125C11.0487 9.1125 9.97474 8.99781 8.8884 8.8223C9.30468 6.28005 10.0478 3.68306 10.4277 2.44333C10.525 2.12606 10.5636 2.00144 10.6306 1.83418C10.664 1.75062 10.698 1.67398 10.7457 1.57414C11.157 1.52518 11.5755 1.5 12 1.5C12.4433 1.5 12.8803 1.52748 13.3092 1.58083C13.3184 1.61564 13.3268 1.64679 13.3351 1.67626C13.3596 1.76333 13.3981 1.8857 13.4627 2.09104L13.4695 2.11261C13.7935 3.14223 14.6518 6.01401 15.1116 8.82229Z" />
|
|
32
|
-
<path class="primary"
|
|
33
|
-
d="M7.34001 8.536C7.78007 5.86107 8.54983 3.19576 8.92188 1.98181L8.9298 1.95597C6.15773 2.80225 3.87267 4.76465 2.59831 7.31946C3.63015 7.63219 5.42092 8.14036 7.34001 8.536Z" />
|
|
34
|
-
<path class="primary"
|
|
35
|
-
d="M12 16.9875C12.8769 16.9875 13.8389 16.8997 14.8153 16.7599C14.4016 18.7425 13.8731 20.575 13.5722 21.5566C13.475 21.8739 13.4363 21.9985 13.3694 22.1658C13.336 22.2494 13.3019 22.326 13.2542 22.4259C12.843 22.4748 12.4244 22.5 12 22.5C11.5755 22.5 11.157 22.4748 10.7457 22.4259C10.698 22.326 10.664 22.2494 10.6306 22.1658C10.5637 21.9986 10.525 21.8739 10.4277 21.5567C10.1269 20.5751 9.59842 18.7427 9.18474 16.7603C10.1579 16.8996 11.12 16.9875 12 16.9875Z" />
|
|
36
|
-
<path class="primary"
|
|
37
|
-
d="M5.03847 15.9259C3.7385 15.6024 2.63132 15.2775 1.95593 15.0702C2.97255 18.4002 5.59979 21.0274 8.9298 22.044L8.92189 22.0182C8.59702 20.9582 7.96893 18.7917 7.52187 16.4784C6.65247 16.3103 5.80719 16.1171 5.03847 15.9259Z" />
|
|
38
|
-
<path class="primary"
|
|
39
|
-
d="M22.0182 15.0781C20.9581 15.403 18.7915 16.0311 16.4781 16.4781C16.0311 18.7915 15.4029 20.9581 15.0781 22.0182L15.0701 22.044C18.4001 21.0274 21.0274 18.4002 22.044 15.0702L22.0182 15.0781Z" />
|
|
40
|
-
</g>
|
|
41
|
-
<g id="vector_2">
|
|
42
|
-
<path class="secondary"
|
|
43
|
-
d="M2.00184 8.78369C1.67598 9.79737 1.5 10.8783 1.5 12.0002C1.5 12.4392 1.52693 12.8718 1.57923 13.2965L1.74471 13.3517L1.74603 13.3522L1.74765 13.3527L1.74879 13.3531C1.80205 13.3707 3.36305 13.8862 5.41878 14.3977C5.99886 14.542 6.61307 14.6847 7.24006 14.8154C7.10025 13.8391 7.0125 12.8771 7.0125 12.0002C7.0125 11.3991 7.05374 10.758 7.12472 10.0996C5.03428 9.6746 3.11218 9.12235 2.08597 8.81012L2.07883 8.80795L2.00184 8.78369Z" />
|
|
44
|
-
<path class="secondary"
|
|
45
|
-
d="M1.6103 13.3232C1.64665 13.3279 1.67628 13.3329 1.68611 13.3351C1.69472 13.3373 1.70821 13.3408 1.7131 13.3422L1.72391 13.3453L1.72973 13.347L1.73585 13.3489L1.74098 13.3505C1.7381 13.3496 1.67976 13.335 1.6103 13.3232Z" />
|
|
46
|
-
<path class="secondary"
|
|
47
|
-
d="M16.8752 10.0996C16.9463 10.7581 16.9875 11.3993 16.9875 12.0002C16.9875 12.8772 16.8998 13.8392 16.7599 14.8155C18.7425 14.4018 20.5751 13.8733 21.5567 13.5725C21.8739 13.4752 21.9986 13.4365 22.1658 13.3696C22.2494 13.3362 22.326 13.3022 22.4259 13.2545C22.4748 12.8432 22.5 12.4247 22.5 12.0002C22.5 10.8783 22.324 9.79737 21.9982 8.78369L21.9133 8.8104C20.8869 9.12268 18.9652 9.67473 16.8752 10.0996Z" />
|
|
48
|
-
<path class="secondary"
|
|
49
|
-
d="M15.3222 10.3832C15.3796 10.9459 15.4125 11.4905 15.4125 12.0002C15.4125 12.9543 15.2972 14.0317 15.1208 15.121C14.0315 15.2973 12.9541 15.4127 12 15.4127C11.0502 15.4127 9.97313 15.2977 8.87911 15.1206C8.70281 14.0314 8.5875 12.9542 8.5875 12.0002C8.5875 11.4907 8.62039 10.946 8.67789 10.3832C9.82608 10.567 10.9715 10.6877 12 10.6877C13.0286 10.6877 14.174 10.567 15.3222 10.3832Z" />
|
|
50
|
-
</g>
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
53
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<!-- License: CC Attribution. Made by Saeedworks: https://dribbble.com/saeedworks -->
|
|
4
|
+
|
|
5
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="web globe icon">
|
|
6
|
+
<style>
|
|
7
|
+
.primary {
|
|
8
|
+
fill: #141314;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.secondary {
|
|
12
|
+
fill: #000000;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
.primary {
|
|
17
|
+
fill: #FEFBFF;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.secondary {
|
|
21
|
+
fill: #FFFFFF;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
<g id="style=bulk">
|
|
26
|
+
<g id="web">
|
|
27
|
+
<g id="vector">
|
|
28
|
+
<path class="primary"
|
|
29
|
+
d="M21.4016 7.31948C20.3697 7.63221 18.5789 8.14039 16.6598 8.53603C16.2178 5.84926 15.4429 3.16951 15.0702 1.95598C17.8422 2.80227 20.1273 4.76467 21.4016 7.31948Z" />
|
|
30
|
+
<path class="primary"
|
|
31
|
+
d="M15.1116 8.82229C14.0253 8.99781 12.9513 9.1125 12 9.1125C11.0487 9.1125 9.97474 8.99781 8.8884 8.8223C9.30468 6.28005 10.0478 3.68306 10.4277 2.44333C10.525 2.12606 10.5636 2.00144 10.6306 1.83418C10.664 1.75062 10.698 1.67398 10.7457 1.57414C11.157 1.52518 11.5755 1.5 12 1.5C12.4433 1.5 12.8803 1.52748 13.3092 1.58083C13.3184 1.61564 13.3268 1.64679 13.3351 1.67626C13.3596 1.76333 13.3981 1.8857 13.4627 2.09104L13.4695 2.11261C13.7935 3.14223 14.6518 6.01401 15.1116 8.82229Z" />
|
|
32
|
+
<path class="primary"
|
|
33
|
+
d="M7.34001 8.536C7.78007 5.86107 8.54983 3.19576 8.92188 1.98181L8.9298 1.95597C6.15773 2.80225 3.87267 4.76465 2.59831 7.31946C3.63015 7.63219 5.42092 8.14036 7.34001 8.536Z" />
|
|
34
|
+
<path class="primary"
|
|
35
|
+
d="M12 16.9875C12.8769 16.9875 13.8389 16.8997 14.8153 16.7599C14.4016 18.7425 13.8731 20.575 13.5722 21.5566C13.475 21.8739 13.4363 21.9985 13.3694 22.1658C13.336 22.2494 13.3019 22.326 13.2542 22.4259C12.843 22.4748 12.4244 22.5 12 22.5C11.5755 22.5 11.157 22.4748 10.7457 22.4259C10.698 22.326 10.664 22.2494 10.6306 22.1658C10.5637 21.9986 10.525 21.8739 10.4277 21.5567C10.1269 20.5751 9.59842 18.7427 9.18474 16.7603C10.1579 16.8996 11.12 16.9875 12 16.9875Z" />
|
|
36
|
+
<path class="primary"
|
|
37
|
+
d="M5.03847 15.9259C3.7385 15.6024 2.63132 15.2775 1.95593 15.0702C2.97255 18.4002 5.59979 21.0274 8.9298 22.044L8.92189 22.0182C8.59702 20.9582 7.96893 18.7917 7.52187 16.4784C6.65247 16.3103 5.80719 16.1171 5.03847 15.9259Z" />
|
|
38
|
+
<path class="primary"
|
|
39
|
+
d="M22.0182 15.0781C20.9581 15.403 18.7915 16.0311 16.4781 16.4781C16.0311 18.7915 15.4029 20.9581 15.0781 22.0182L15.0701 22.044C18.4001 21.0274 21.0274 18.4002 22.044 15.0702L22.0182 15.0781Z" />
|
|
40
|
+
</g>
|
|
41
|
+
<g id="vector_2">
|
|
42
|
+
<path class="secondary"
|
|
43
|
+
d="M2.00184 8.78369C1.67598 9.79737 1.5 10.8783 1.5 12.0002C1.5 12.4392 1.52693 12.8718 1.57923 13.2965L1.74471 13.3517L1.74603 13.3522L1.74765 13.3527L1.74879 13.3531C1.80205 13.3707 3.36305 13.8862 5.41878 14.3977C5.99886 14.542 6.61307 14.6847 7.24006 14.8154C7.10025 13.8391 7.0125 12.8771 7.0125 12.0002C7.0125 11.3991 7.05374 10.758 7.12472 10.0996C5.03428 9.6746 3.11218 9.12235 2.08597 8.81012L2.07883 8.80795L2.00184 8.78369Z" />
|
|
44
|
+
<path class="secondary"
|
|
45
|
+
d="M1.6103 13.3232C1.64665 13.3279 1.67628 13.3329 1.68611 13.3351C1.69472 13.3373 1.70821 13.3408 1.7131 13.3422L1.72391 13.3453L1.72973 13.347L1.73585 13.3489L1.74098 13.3505C1.7381 13.3496 1.67976 13.335 1.6103 13.3232Z" />
|
|
46
|
+
<path class="secondary"
|
|
47
|
+
d="M16.8752 10.0996C16.9463 10.7581 16.9875 11.3993 16.9875 12.0002C16.9875 12.8772 16.8998 13.8392 16.7599 14.8155C18.7425 14.4018 20.5751 13.8733 21.5567 13.5725C21.8739 13.4752 21.9986 13.4365 22.1658 13.3696C22.2494 13.3362 22.326 13.3022 22.4259 13.2545C22.4748 12.8432 22.5 12.4247 22.5 12.0002C22.5 10.8783 22.324 9.79737 21.9982 8.78369L21.9133 8.8104C20.8869 9.12268 18.9652 9.67473 16.8752 10.0996Z" />
|
|
48
|
+
<path class="secondary"
|
|
49
|
+
d="M15.3222 10.3832C15.3796 10.9459 15.4125 11.4905 15.4125 12.0002C15.4125 12.9543 15.2972 14.0317 15.1208 15.121C14.0315 15.2973 12.9541 15.4127 12 15.4127C11.0502 15.4127 9.97313 15.2977 8.87911 15.1206C8.70281 14.0314 8.5875 12.9542 8.5875 12.0002C8.5875 11.4907 8.62039 10.946 8.67789 10.3832C9.82608 10.567 10.9715 10.6877 12 10.6877C13.0286 10.6877 14.174 10.567 15.3222 10.3832Z" />
|
|
50
|
+
</g>
|
|
51
|
+
</g>
|
|
52
|
+
</g>
|
|
53
|
+
|
|
54
54
|
</svg>
|
package/dist/http/auth.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/server';
|
|
3
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
|
-
import type
|
|
3
|
+
import { type RequestContext } from './helpers.js';
|
|
5
4
|
declare class CorsPolicy {
|
|
6
5
|
handle(ctx: RequestContext): boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare const corsPolicy: CorsPolicy;
|
|
8
|
+
declare class InvalidTokenError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
9
11
|
declare class InsufficientScopeError extends InvalidTokenError {
|
|
10
12
|
readonly requiredScopes: readonly string[];
|
|
11
13
|
constructor(requiredScopes: readonly string[], message?: string);
|
|
@@ -47,6 +49,8 @@ declare class AuthService {
|
|
|
47
49
|
private requestIntrospection;
|
|
48
50
|
private buildIntrospectionAuthInfo;
|
|
49
51
|
private assertRequiredScopes;
|
|
52
|
+
private isExpiredAuthInfo;
|
|
53
|
+
private resolveCacheExpiry;
|
|
50
54
|
private verifyWithIntrospection;
|
|
51
55
|
private evictStaleEntries;
|
|
52
56
|
}
|
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":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/http/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYjE,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,cAAc,CAAC;AAMtB,cAAM,UAAU;IAId,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAA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CAAC,QAAQ,CAAC;IAwBpB,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,sBAAsB;IA6B9B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,mBAAmB;IA+B3B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,yBAAyB;YA0BnB,oBAAoB;IAiClC,OAAO,CAAC,0BAA0B;IAuClC,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,kBAAkB;YAOZ,uBAAuB;IA6ErC,OAAO,CAAC,iBAAiB;CAa1B;AAyBD,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,GAClB,IAAI,CAUN;AAED,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,OAAO,SAA+C,GACrD,IAAI,CAYN;AAED,wBAAgB,sCAAsC,IAAI;IACxD,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,CAgBA;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKzE;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
package/dist/http/auth.js
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
import { InvalidTokenError, ServerError, } from '@modelcontextprotocol/sdk/server/auth/errors.js';
|
|
2
1
|
import { randomBytes } from 'node:crypto';
|
|
3
2
|
import { config } from '../lib/config.js';
|
|
4
3
|
import { logDebug, Loggers, logWarn } from '../lib/core.js';
|
|
5
|
-
import { sendJsonRpcError } from '../lib/mcp-interop.js';
|
|
6
4
|
import { normalizeHost } from '../lib/net/index.js';
|
|
7
5
|
import { composeAbortSignal, hmacSha256Hex, isObject, timingSafeEqualUtf8, } from '../lib/utils.js';
|
|
8
|
-
|
|
9
|
-
res.setHeader('X-Content-Type-Options', 'nosniff');
|
|
10
|
-
res.setHeader('Cache-Control', 'no-store');
|
|
11
|
-
}
|
|
12
|
-
function sendJson(res, status, body) {
|
|
13
|
-
res.statusCode = status;
|
|
14
|
-
res.setHeader('Content-Type', 'application/json; charset=utf-8');
|
|
15
|
-
setNoStoreHeaders(res);
|
|
16
|
-
res.end(JSON.stringify(body));
|
|
17
|
-
}
|
|
18
|
-
function sendEmpty(res, status) {
|
|
19
|
-
res.statusCode = status;
|
|
20
|
-
res.setHeader('Content-Length', '0');
|
|
21
|
-
res.end();
|
|
22
|
-
}
|
|
23
|
-
function sendError(res, code, message, status = 400, id) {
|
|
24
|
-
sendJsonRpcError(res, status, code, message, id ?? null);
|
|
25
|
-
}
|
|
26
|
-
function getHeaderValue(req, name) {
|
|
27
|
-
const value = req.headers[name];
|
|
28
|
-
if (!value)
|
|
29
|
-
return null;
|
|
30
|
-
return Array.isArray(value) ? (value[0] ?? null) : value;
|
|
31
|
-
}
|
|
6
|
+
import { getHeaderValue, sendEmpty, sendError, sendJson, } from './helpers.js';
|
|
32
7
|
// ---------------------------------------------------------------------------
|
|
33
8
|
// CORS
|
|
34
9
|
// ---------------------------------------------------------------------------
|
|
@@ -53,6 +28,18 @@ class CorsPolicy {
|
|
|
53
28
|
}
|
|
54
29
|
}
|
|
55
30
|
export const corsPolicy = new CorsPolicy();
|
|
31
|
+
class InvalidTokenError extends Error {
|
|
32
|
+
constructor(message) {
|
|
33
|
+
super(message);
|
|
34
|
+
this.name = 'InvalidTokenError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
class AuthServerError extends Error {
|
|
38
|
+
constructor(message) {
|
|
39
|
+
super(message);
|
|
40
|
+
this.name = 'AuthServerError';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
56
43
|
// ---------------------------------------------------------------------------
|
|
57
44
|
// Host / Origin validation
|
|
58
45
|
// ---------------------------------------------------------------------------
|
|
@@ -269,6 +256,7 @@ const STATIC_TOKEN_TTL_SECONDS = 60 * 60 * 24;
|
|
|
269
256
|
const STATIC_TOKEN_HMAC_KEY = randomBytes(32);
|
|
270
257
|
const INTROSPECTION_CACHE_TTL_MS = 30_000;
|
|
271
258
|
const INTROSPECTION_CACHE_MAX_ENTRIES = 1_000;
|
|
259
|
+
const ONE_SECOND_MS = 1000;
|
|
272
260
|
class AuthService {
|
|
273
261
|
staticTokenDigests = config.auth.staticTokens.map((token) => hmacSha256Hex(STATIC_TOKEN_HMAC_KEY, token));
|
|
274
262
|
introspectionCache = new Map();
|
|
@@ -377,7 +365,7 @@ class AuthService {
|
|
|
377
365
|
assertTokenAudience(payload) {
|
|
378
366
|
const expected = this.canonicalizeResourceUri(this.stripHash(config.auth.resourceUrl));
|
|
379
367
|
if (!expected) {
|
|
380
|
-
const error = new
|
|
368
|
+
const error = new AuthServerError('Configured resource URL is invalid');
|
|
381
369
|
throw error;
|
|
382
370
|
}
|
|
383
371
|
const audiences = this.readAudienceValues(payload)
|
|
@@ -397,7 +385,7 @@ class AuthService {
|
|
|
397
385
|
buildBasicAuthHeader(clientId, clientSecret) {
|
|
398
386
|
// Base64 is only an encoding for header transport; it is NOT encryption.
|
|
399
387
|
const credentials = `${clientId}:${clientSecret ?? ''}`;
|
|
400
|
-
return `Basic ${
|
|
388
|
+
return `Basic ${Buffer.from(credentials, 'utf8').toString('base64')}`;
|
|
401
389
|
}
|
|
402
390
|
buildIntrospectionRequest(token, resourceUrl, clientId, clientSecret) {
|
|
403
391
|
const body = new URLSearchParams({
|
|
@@ -426,13 +414,13 @@ class AuthService {
|
|
|
426
414
|
await response.body.cancel();
|
|
427
415
|
}
|
|
428
416
|
logWarn('Token introspection HTTP error', { status: response.status }, Loggers.LOG_AUTH);
|
|
429
|
-
const error = new
|
|
417
|
+
const error = new AuthServerError(`Token introspection failed: ${response.status}`);
|
|
430
418
|
throw error;
|
|
431
419
|
}
|
|
432
420
|
return response.json();
|
|
433
421
|
}
|
|
434
422
|
buildIntrospectionAuthInfo(token, payload) {
|
|
435
|
-
const { exp, client_id: clientIdRaw, scope: scopeRaw } = payload;
|
|
423
|
+
const { exp, client_id: clientIdRaw, scope: scopeRaw, sub, subject, username, preferred_username: preferredUsername, } = payload;
|
|
436
424
|
const expiresAt = typeof exp === 'number' ? exp : undefined;
|
|
437
425
|
const clientId = typeof clientIdRaw === 'string' ? clientIdRaw : 'unknown';
|
|
438
426
|
const info = {
|
|
@@ -443,6 +431,20 @@ class AuthService {
|
|
|
443
431
|
};
|
|
444
432
|
if (expiresAt !== undefined)
|
|
445
433
|
info.expiresAt = expiresAt;
|
|
434
|
+
const extra = {};
|
|
435
|
+
if (typeof sub === 'string' && sub.length > 0)
|
|
436
|
+
extra['sub'] = sub;
|
|
437
|
+
if (typeof subject === 'string' && subject.length > 0) {
|
|
438
|
+
extra['subject'] = subject;
|
|
439
|
+
}
|
|
440
|
+
if (typeof username === 'string' && username.length > 0) {
|
|
441
|
+
extra['username'] = username;
|
|
442
|
+
}
|
|
443
|
+
if (typeof preferredUsername === 'string' && preferredUsername.length > 0) {
|
|
444
|
+
extra['preferred_username'] = preferredUsername;
|
|
445
|
+
}
|
|
446
|
+
if (Object.keys(extra).length > 0)
|
|
447
|
+
info.extra = extra;
|
|
446
448
|
return info;
|
|
447
449
|
}
|
|
448
450
|
assertRequiredScopes(tokenScopes) {
|
|
@@ -457,19 +459,35 @@ class AuthService {
|
|
|
457
459
|
throw error;
|
|
458
460
|
}
|
|
459
461
|
}
|
|
462
|
+
isExpiredAuthInfo(info, nowMs) {
|
|
463
|
+
return (typeof info.expiresAt === 'number' &&
|
|
464
|
+
info.expiresAt <= Math.floor(nowMs / ONE_SECOND_MS));
|
|
465
|
+
}
|
|
466
|
+
resolveCacheExpiry(info, nowMs) {
|
|
467
|
+
const cacheExpiry = nowMs + INTROSPECTION_CACHE_TTL_MS;
|
|
468
|
+
return typeof info.expiresAt === 'number'
|
|
469
|
+
? Math.min(cacheExpiry, info.expiresAt * ONE_SECOND_MS)
|
|
470
|
+
: cacheExpiry;
|
|
471
|
+
}
|
|
460
472
|
async verifyWithIntrospection(token, signal) {
|
|
461
473
|
if (!config.auth.introspectionUrl) {
|
|
462
|
-
const error = new
|
|
474
|
+
const error = new AuthServerError('Introspection not configured');
|
|
463
475
|
throw error;
|
|
464
476
|
}
|
|
465
477
|
const cacheKey = hmacSha256Hex(STATIC_TOKEN_HMAC_KEY, token);
|
|
466
478
|
const cached = this.introspectionCache.get(cacheKey);
|
|
467
|
-
|
|
479
|
+
const cacheLookupNow = Date.now();
|
|
480
|
+
if (cached &&
|
|
481
|
+
cached.expiresAt > cacheLookupNow &&
|
|
482
|
+
!this.isExpiredAuthInfo(cached.info, cacheLookupNow)) {
|
|
468
483
|
this.introspectionCache.delete(cacheKey);
|
|
469
484
|
this.introspectionCache.set(cacheKey, cached);
|
|
470
485
|
logDebug('Token introspection cache hit', {}, Loggers.LOG_AUTH);
|
|
471
486
|
return cached.info;
|
|
472
487
|
}
|
|
488
|
+
if (cached) {
|
|
489
|
+
this.introspectionCache.delete(cacheKey);
|
|
490
|
+
}
|
|
473
491
|
const req = this.buildIntrospectionRequest(token, config.auth.resourceUrl, config.auth.clientId, config.auth.clientSecret);
|
|
474
492
|
const payload = await this.requestIntrospection(config.auth.introspectionUrl, req, config.auth.introspectionTimeoutMs, signal);
|
|
475
493
|
if (!isObject(payload) || payload['active'] !== true) {
|
|
@@ -480,13 +498,23 @@ class AuthService {
|
|
|
480
498
|
}
|
|
481
499
|
this.assertTokenAudience(payload);
|
|
482
500
|
const info = this.buildIntrospectionAuthInfo(token, payload);
|
|
501
|
+
const verifiedAt = Date.now();
|
|
502
|
+
if (this.isExpiredAuthInfo(info, verifiedAt)) {
|
|
503
|
+
this.introspectionCache.delete(cacheKey);
|
|
504
|
+
logWarn('Auth failed: token expired', {}, Loggers.LOG_AUTH);
|
|
505
|
+
const error = new InvalidTokenError('Token is expired');
|
|
506
|
+
throw error;
|
|
507
|
+
}
|
|
483
508
|
this.assertRequiredScopes(info.scopes);
|
|
484
509
|
logDebug('Token introspection successful', { clientId: info.clientId }, Loggers.LOG_AUTH);
|
|
485
510
|
this.evictStaleEntries();
|
|
486
|
-
this.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
511
|
+
const cacheExpiresAt = this.resolveCacheExpiry(info, verifiedAt);
|
|
512
|
+
if (cacheExpiresAt > verifiedAt) {
|
|
513
|
+
this.introspectionCache.set(cacheKey, {
|
|
514
|
+
info,
|
|
515
|
+
expiresAt: cacheExpiresAt,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
490
518
|
return info;
|
|
491
519
|
}
|
|
492
520
|
evictStaleEntries() {
|
|
@@ -545,7 +573,7 @@ export function applyInsufficientScopeAuthHeaders(req, res, requiredScopes, mess
|
|
|
545
573
|
export function buildProtectedResourceMetadataDocument() {
|
|
546
574
|
const urls = buildRequestScopedProtectedResourceUrls();
|
|
547
575
|
if (!config.auth.issuerUrl) {
|
|
548
|
-
const error = new
|
|
576
|
+
const error = new AuthServerError('OAuth issuer URL is required for protected resource metadata');
|
|
549
577
|
throw error;
|
|
550
578
|
}
|
|
551
579
|
return {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
import { type JsonRpcId } from '../lib/mcp-interop.js';
|
|
4
|
+
export interface RequestContext {
|
|
5
|
+
req: IncomingMessage;
|
|
6
|
+
res: ServerResponse;
|
|
7
|
+
url: URL;
|
|
8
|
+
method: string | undefined;
|
|
9
|
+
ip: string | null;
|
|
10
|
+
body: unknown;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthenticatedContext extends RequestContext {
|
|
14
|
+
auth: AuthInfo;
|
|
15
|
+
}
|
|
16
|
+
export declare function setNoStoreHeaders(res: ServerResponse): void;
|
|
17
|
+
export declare function sendJson(res: ServerResponse, status: number, body: unknown): void;
|
|
18
|
+
export declare function sendEmpty(res: ServerResponse, status: number): void;
|
|
19
|
+
export declare function sendError(res: ServerResponse, code: number, message: string, status?: number, id?: JsonRpcId | null): void;
|
|
20
|
+
export declare function getHeaderValue(req: IncomingMessage, name: string): string | null;
|
|
21
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/http/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,uBAAuB,CAAC;AAMzE,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,eAAe,CAAC;IACrB,GAAG,EAAE,cAAc,CAAC;IACpB,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,IAAI,EAAE,QAAQ,CAAC;CAChB;AAMD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAG3D;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GACZ,IAAI,CAKN;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAInE;AAED,wBAAgB,SAAS,CACvB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,SAAM,EACZ,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,GACpB,IAAI,CAEN;AAMD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAIf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { sendJsonRpcError } from '../lib/mcp-interop.js';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Response helpers
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
export function setNoStoreHeaders(res) {
|
|
6
|
+
res.setHeader('X-Content-Type-Options', 'nosniff');
|
|
7
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
8
|
+
}
|
|
9
|
+
export function sendJson(res, status, body) {
|
|
10
|
+
res.statusCode = status;
|
|
11
|
+
res.setHeader('Content-Type', 'application/json; charset=utf-8');
|
|
12
|
+
setNoStoreHeaders(res);
|
|
13
|
+
res.end(JSON.stringify(body));
|
|
14
|
+
}
|
|
15
|
+
export function sendEmpty(res, status) {
|
|
16
|
+
res.statusCode = status;
|
|
17
|
+
res.setHeader('Content-Length', '0');
|
|
18
|
+
res.end();
|
|
19
|
+
}
|
|
20
|
+
export function sendError(res, code, message, status = 400, id) {
|
|
21
|
+
sendJsonRpcError(res, status, code, message, id ?? null);
|
|
22
|
+
}
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Request helpers
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
export function getHeaderValue(req, name) {
|
|
27
|
+
const value = req.headers[name];
|
|
28
|
+
if (!value)
|
|
29
|
+
return null;
|
|
30
|
+
return Array.isArray(value) ? (value[0] ?? null) : value;
|
|
31
|
+
}
|
package/dist/http/index.d.ts
CHANGED
package/dist/http/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
package/dist/http/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Area contract: HTTP transport surface for auth, gateway, and rate limiting.
|
|
2
2
|
// Export only HTTP-facing primitives used outside http/; keep generic shared utilities and fetch logic out.
|
|
3
3
|
export * from './auth.js';
|
|
4
|
+
export * from './helpers.js';
|
|
4
5
|
export * from './native.js';
|
|
5
6
|
export * from './rate-limit.js';
|
package/dist/http/native.d.ts
CHANGED
|
@@ -1,28 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
4
|
-
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
1
|
+
import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node';
|
|
2
|
+
import { type McpServer } from '@modelcontextprotocol/server';
|
|
5
3
|
import { type IncomingMessage, type Server, type ServerResponse } from 'node:http';
|
|
6
4
|
import { type Server as HttpsServer } from 'node:https';
|
|
7
5
|
import { type SessionStore } from '../lib/core.js';
|
|
8
|
-
import { type
|
|
6
|
+
import { type RequestContext } from './helpers.js';
|
|
7
|
+
export { type AuthenticatedContext, getHeaderValue, type RequestContext, sendEmpty, sendError, sendJson, setNoStoreHeaders, } from './helpers.js';
|
|
9
8
|
export type NetworkServer = Server | HttpsServer;
|
|
10
|
-
export interface RequestContext {
|
|
11
|
-
req: IncomingMessage;
|
|
12
|
-
res: ServerResponse;
|
|
13
|
-
url: URL;
|
|
14
|
-
method: string | undefined;
|
|
15
|
-
ip: string | null;
|
|
16
|
-
body: unknown;
|
|
17
|
-
signal?: AbortSignal;
|
|
18
|
-
}
|
|
19
|
-
export interface AuthenticatedContext extends RequestContext {
|
|
20
|
-
auth: AuthInfo;
|
|
21
|
-
}
|
|
22
|
-
export declare function sendJson(res: ServerResponse, status: number, body: unknown): void;
|
|
23
|
-
export declare function sendEmpty(res: ServerResponse, status: number): void;
|
|
24
|
-
export declare function sendError(res: ServerResponse, code: number, message: string, status?: number, id?: JsonRpcId | null): void;
|
|
25
|
-
export declare function getHeaderValue(req: IncomingMessage, name: string): string | null;
|
|
26
9
|
export declare function getMcpSessionId(req: IncomingMessage): string | null;
|
|
27
10
|
export declare function findDuplicateSingleValueHeader(req: IncomingMessage): string | null;
|
|
28
11
|
export declare function drainRequest(req: IncomingMessage): void;
|
|
@@ -30,13 +13,13 @@ export declare function createRequestAbortSignal(req: IncomingMessage): {
|
|
|
30
13
|
signal: AbortSignal;
|
|
31
14
|
cleanup: () => void;
|
|
32
15
|
};
|
|
16
|
+
export declare function resolveClientIp(req: IncomingMessage): string | null;
|
|
33
17
|
export declare function registerInboundBlockList(server: NetworkServer): void;
|
|
34
18
|
export declare function buildRequestContext(req: IncomingMessage, res: ServerResponse, signal?: AbortSignal): RequestContext | null;
|
|
35
19
|
export declare function closeTransportBestEffort(transport: {
|
|
36
20
|
close: () => Promise<unknown>;
|
|
37
21
|
}, context: string): Promise<void>;
|
|
38
22
|
export declare function closeMcpServerBestEffort(server: McpServer, context: string): Promise<void>;
|
|
39
|
-
export declare function createTransportAdapter(transportImpl: StreamableHTTPServerTransport): Transport;
|
|
40
23
|
type JsonBodyErrorKind = 'payload-too-large' | 'invalid-json' | 'read-failed';
|
|
41
24
|
export declare class JsonBodyError extends Error {
|
|
42
25
|
readonly kind: JsonBodyErrorKind;
|
|
@@ -56,7 +39,7 @@ declare class JsonBodyReader {
|
|
|
56
39
|
export declare const jsonBodyReader: JsonBodyReader;
|
|
57
40
|
interface SessionRecordLike {
|
|
58
41
|
server: McpServer;
|
|
59
|
-
transport:
|
|
42
|
+
transport: NodeStreamableHTTPServerTransport;
|
|
60
43
|
}
|
|
61
44
|
interface SessionTeardownOptions {
|
|
62
45
|
cancelMessage: string;
|
|
@@ -78,5 +61,4 @@ export declare function startHttpServer(): Promise<{
|
|
|
78
61
|
port: number;
|
|
79
62
|
host: string;
|
|
80
63
|
}>;
|
|
81
|
-
export {};
|
|
82
64
|
//# sourceMappingURL=native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAEL,KAAK,MAAM,IAAI,WAAW,EAE3B,MAAM,YAAY,CAAC;AASpB,OAAO,EAgBL,KAAK,YAAY,EAIlB,MAAM,gBAAgB,CAAC;AAiCxB,OAAO,EAGL,KAAK,cAAc,EAIpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,oBAAoB,EACzB,cAAc,EACd,KAAK,cAAc,EACnB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAmBtB,MAAM,MAAM,aAAa,GAAG,MAAM,GAA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