@payloadcms/plugin-mcp 4.0.0-internal.2a3c3bc → 4.0.0-internal.2d11d2e
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/endpoint/access.d.ts.map +1 -1
- package/dist/endpoint/access.js +1 -2
- package/dist/endpoint/access.js.map +1 -1
- package/dist/endpoint/index.d.ts.map +1 -1
- package/dist/endpoint/index.js +0 -6
- package/dist/endpoint/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp/buildMcpServer.js +1 -1
- package/dist/mcp/buildMcpServer.js.map +1 -1
- package/dist/mcp/builtin/collections/authTools.js.map +1 -1
- package/dist/mcp/builtin/collections/createTool.d.ts.map +1 -1
- package/dist/mcp/builtin/collections/createTool.js.map +1 -1
- package/dist/mcp/builtin/collections/deleteTool.js.map +1 -1
- package/dist/mcp/builtin/collections/duplicateTool.js.map +1 -1
- package/dist/mcp/builtin/collections/findTool.js +1 -1
- package/dist/mcp/builtin/collections/findTool.js.map +1 -1
- package/dist/mcp/builtin/collections/restoreVersionTool.js.map +1 -1
- package/dist/mcp/builtin/collections/updateTool.js.map +1 -1
- package/dist/mcp/builtin/collections/uploadInstructionsTool.js.map +1 -1
- package/dist/mcp/builtin/globals/findTool.js.map +1 -1
- package/dist/mcp/builtin/globals/updateTool.js.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.d.ts.map +1 -1
- package/dist/mcp/sanitizeMCPConfig.js +0 -1
- package/dist/mcp/sanitizeMCPConfig.js.map +1 -1
- package/dist/types.d.ts +1 -16
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/toStandardSchema.js.map +1 -1
- package/package.json +21 -24
- package/src/endpoint/access.ts +1 -2
- package/src/endpoint/index.ts +0 -6
- package/src/index.ts +1 -8
- package/src/mcp/buildMcpServer.ts +2 -2
- package/src/mcp/builtin/collections/authTools.ts +2 -2
- package/src/mcp/builtin/collections/createTool.ts +1 -3
- package/src/mcp/builtin/collections/deleteTool.ts +1 -1
- package/src/mcp/builtin/collections/duplicateTool.ts +1 -1
- package/src/mcp/builtin/collections/findTool.ts +1 -1
- package/src/mcp/builtin/collections/restoreVersionTool.ts +1 -1
- package/src/mcp/builtin/collections/updateTool.ts +1 -1
- package/src/mcp/builtin/collections/uploadInstructionsTool.ts +1 -1
- package/src/mcp/builtin/globals/findTool.ts +1 -1
- package/src/mcp/builtin/globals/updateTool.ts +1 -1
- package/src/mcp/sanitizeMCPConfig.ts +0 -1
- package/src/types.ts +1 -16
- package/src/utils/toStandardSchema.ts +1 -1
- package/dist/endpoint/oauth.d.ts +0 -27
- package/dist/endpoint/oauth.d.ts.map +0 -1
- package/dist/endpoint/oauth.js +0 -61
- package/dist/endpoint/oauth.js.map +0 -1
- package/src/endpoint/oauth.ts +0 -72
|
@@ -103,7 +103,7 @@ export const updateDocumentTool = defineCollectionTool({
|
|
|
103
103
|
text: `Document updated successfully in collection "${slug}"!\nResult:\n\`\`\`json\n${JSON.stringify(responseResult)}\n\`\`\``,
|
|
104
104
|
},
|
|
105
105
|
],
|
|
106
|
-
doc: responseResult
|
|
106
|
+
doc: responseResult,
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -9,7 +9,7 @@ export const getUploadInstructionsTool = defineCollectionTool({
|
|
|
9
9
|
defaultAccess(args) &&
|
|
10
10
|
Boolean(
|
|
11
11
|
args.permissions?.collections?.[args.slug]?.create ||
|
|
12
|
-
|
|
12
|
+
args.permissions?.collections?.[args.slug]?.update,
|
|
13
13
|
),
|
|
14
14
|
annotations: {
|
|
15
15
|
destructiveHint: false,
|
|
@@ -54,7 +54,7 @@ export const findGlobalTool = defineGlobalTool({
|
|
|
54
54
|
text: `Global "${slug}":\n\`\`\`json\n${JSON.stringify(result)}\n\`\`\``,
|
|
55
55
|
},
|
|
56
56
|
],
|
|
57
|
-
doc: result
|
|
57
|
+
doc: result,
|
|
58
58
|
}
|
|
59
59
|
} catch (error) {
|
|
60
60
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error'
|
|
@@ -82,7 +82,7 @@ export const updateGlobalTool = defineGlobalTool({
|
|
|
82
82
|
text: `Global "${slug}" updated successfully!\n\`\`\`json\n${JSON.stringify(result)}\n\`\`\``,
|
|
83
83
|
},
|
|
84
84
|
],
|
|
85
|
-
doc: result
|
|
85
|
+
doc: result,
|
|
86
86
|
}
|
|
87
87
|
} catch (error) {
|
|
88
88
|
const message = error instanceof Error ? error.message : 'Unknown error'
|
package/src/types.ts
CHANGED
|
@@ -290,21 +290,6 @@ export type MCPPluginConfig = {
|
|
|
290
290
|
serverOptions?: MCPServerOptions
|
|
291
291
|
verboseLogs?: boolean
|
|
292
292
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Lets MCP clients sign in through an OAuth authorization server. MCP requests without an
|
|
295
|
-
* authenticated user get a `401` that points to the protected resource metadata (RFC 9728),
|
|
296
|
-
* served by `oauthProtectedResourceHandler`. Payload's auth strategies must accept the
|
|
297
|
-
* issued access tokens.
|
|
298
|
-
*/
|
|
299
|
-
oauth?: {
|
|
300
|
-
authorizationServers: string[]
|
|
301
|
-
/**
|
|
302
|
-
* The URL clients call to reach the MCP endpoint.
|
|
303
|
-
*
|
|
304
|
-
* @default the absolute URL of `/api/mcp`, based on `serverURL` or the request URL
|
|
305
|
-
*/
|
|
306
|
-
resource?: string
|
|
307
|
-
}
|
|
308
293
|
/**
|
|
309
294
|
* Replace the default MCP authorization resolver.
|
|
310
295
|
*
|
|
@@ -324,7 +309,7 @@ export type MCPPluginConfig = {
|
|
|
324
309
|
|
|
325
310
|
export type SanitizedMCPPluginConfig = {
|
|
326
311
|
items: MCPItem[]
|
|
327
|
-
} & Pick<MCPPluginConfig, 'disabled' | 'hooks' | 'mcp' | '
|
|
312
|
+
} & Pick<MCPPluginConfig, 'disabled' | 'hooks' | 'mcp' | 'overrideGetAuthorizedMCP'>
|
|
328
313
|
|
|
329
314
|
export type MCPServerOptions = {
|
|
330
315
|
options?: McpServerOptions
|
|
@@ -5,5 +5,5 @@ import type { ToolInputSchema } from '../types.js'
|
|
|
5
5
|
/** Normalize a tool/prompt input to a Standard Schema. Raw JSON Schema gets wrapped; Standard Schema instances pass through. */
|
|
6
6
|
export const toStandardSchema = (schema: ToolInputSchema): StandardSchemaWithJSON =>
|
|
7
7
|
typeof schema === 'object' && schema !== null && '~standard' in schema
|
|
8
|
-
?
|
|
8
|
+
? schema
|
|
9
9
|
: fromJsonSchema(schema)
|
package/dist/endpoint/oauth.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { PayloadHandler, PayloadRequest, SanitizedConfig } from 'payload';
|
|
2
|
-
/**
|
|
3
|
-
* Serves the OAuth protected resource metadata (RFC 9728) at `/api/mcp/oauth-protected-resource`.
|
|
4
|
-
* The OAuth challenge links here, so MCP clients find the authorization server without setup.
|
|
5
|
-
*/
|
|
6
|
-
export declare const oauthProtectedResourceEndpoint: PayloadHandler;
|
|
7
|
-
/**
|
|
8
|
-
* Serves the same metadata for clients that ignore the challenge's link and only look at
|
|
9
|
-
* `/.well-known/oauth-protected-resource`. Mount it at the site root, e.g. in Next.js at
|
|
10
|
-
* `app/.well-known/oauth-protected-resource/[[...path]]/route.ts`:
|
|
11
|
-
*
|
|
12
|
-
* ```ts
|
|
13
|
-
* import config from '@payload-config'
|
|
14
|
-
* import { oauthProtectedResourceHandler } from '@payloadcms/plugin-mcp'
|
|
15
|
-
*
|
|
16
|
-
* export const GET = oauthProtectedResourceHandler(config)
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare const oauthProtectedResourceHandler: (config: Promise<SanitizedConfig> | SanitizedConfig) => (request: Request) => Promise<Response>;
|
|
20
|
-
/**
|
|
21
|
-
* Answers an unauthenticated MCP request with a challenge linking to the protected resource
|
|
22
|
-
* metadata, which starts the client's OAuth flow.
|
|
23
|
-
*/
|
|
24
|
-
export declare const oauthChallenge: ({ req }: {
|
|
25
|
-
req: PayloadRequest;
|
|
26
|
-
}) => Response;
|
|
27
|
-
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/endpoint/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAU9E;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,cACuB,CAAA;AAEpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,WAC/B,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,eACnC,OAAO,KAAG,OAAO,CAAC,QAAQ,CACuB,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,cAAc,YAAa;IAAE,GAAG,EAAE,cAAc,CAAA;CAAE,KAAG,QAM/D,CAAA"}
|
package/dist/endpoint/oauth.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { bearerAuthChallengeResponse, OAuthError, OAuthErrorCode } from '@modelcontextprotocol/server';
|
|
2
|
-
import { getPluginConfig } from '../utils/getPluginConfig.js';
|
|
3
|
-
/**
|
|
4
|
-
* Serves the OAuth protected resource metadata (RFC 9728) at `/api/mcp/oauth-protected-resource`.
|
|
5
|
-
* The OAuth challenge links here, so MCP clients find the authorization server without setup.
|
|
6
|
-
*/ export const oauthProtectedResourceEndpoint = (req)=>getMetadataResponse({
|
|
7
|
-
config: req.payload.config,
|
|
8
|
-
url: req.url
|
|
9
|
-
});
|
|
10
|
-
/**
|
|
11
|
-
* Serves the same metadata for clients that ignore the challenge's link and only look at
|
|
12
|
-
* `/.well-known/oauth-protected-resource`. Mount it at the site root, e.g. in Next.js at
|
|
13
|
-
* `app/.well-known/oauth-protected-resource/[[...path]]/route.ts`:
|
|
14
|
-
*
|
|
15
|
-
* ```ts
|
|
16
|
-
* import config from '@payload-config'
|
|
17
|
-
* import { oauthProtectedResourceHandler } from '@payloadcms/plugin-mcp'
|
|
18
|
-
*
|
|
19
|
-
* export const GET = oauthProtectedResourceHandler(config)
|
|
20
|
-
* ```
|
|
21
|
-
*/ export const oauthProtectedResourceHandler = (config)=>async (request)=>getMetadataResponse({
|
|
22
|
-
config: await config,
|
|
23
|
-
url: request.url
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Answers an unauthenticated MCP request with a challenge linking to the protected resource
|
|
27
|
-
* metadata, which starts the client's OAuth flow.
|
|
28
|
-
*/ export const oauthChallenge = ({ req })=>bearerAuthChallengeResponse(new OAuthError(OAuthErrorCode.InvalidToken, req.t('error:unauthorized')), {
|
|
29
|
-
resourceMetadataUrl: `${getMCPURL({
|
|
30
|
-
config: req.payload.config,
|
|
31
|
-
url: req.url
|
|
32
|
-
})}/oauth-protected-resource`
|
|
33
|
-
});
|
|
34
|
-
const getMCPURL = ({ config, url })=>new URL(`${config.routes.api}/mcp`, config.serverURL || url).href;
|
|
35
|
-
const getMetadataResponse = ({ config, url })=>{
|
|
36
|
-
const pluginConfig = getPluginConfig({
|
|
37
|
-
config
|
|
38
|
-
});
|
|
39
|
-
if (!pluginConfig.oauth) {
|
|
40
|
-
return new Response(null, {
|
|
41
|
-
status: 404
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return Response.json({
|
|
45
|
-
authorization_servers: pluginConfig.oauth.authorizationServers,
|
|
46
|
-
bearer_methods_supported: [
|
|
47
|
-
'header'
|
|
48
|
-
],
|
|
49
|
-
resource: pluginConfig.oauth.resource ?? getMCPURL({
|
|
50
|
-
config,
|
|
51
|
-
url
|
|
52
|
-
})
|
|
53
|
-
}, // Public document, readable by browser-based MCP clients on any origin
|
|
54
|
-
{
|
|
55
|
-
headers: {
|
|
56
|
-
'Access-Control-Allow-Origin': '*'
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=oauth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/endpoint/oauth.ts"],"sourcesContent":["import type { PayloadHandler, PayloadRequest, SanitizedConfig } from 'payload'\n\nimport {\n bearerAuthChallengeResponse,\n OAuthError,\n OAuthErrorCode,\n} from '@modelcontextprotocol/server'\n\nimport { getPluginConfig } from '../utils/getPluginConfig.js'\n\n/**\n * Serves the OAuth protected resource metadata (RFC 9728) at `/api/mcp/oauth-protected-resource`.\n * The OAuth challenge links here, so MCP clients find the authorization server without setup.\n */\nexport const oauthProtectedResourceEndpoint: PayloadHandler = (req) =>\n getMetadataResponse({ config: req.payload.config, url: req.url! })\n\n/**\n * Serves the same metadata for clients that ignore the challenge's link and only look at\n * `/.well-known/oauth-protected-resource`. Mount it at the site root, e.g. in Next.js at\n * `app/.well-known/oauth-protected-resource/[[...path]]/route.ts`:\n *\n * ```ts\n * import config from '@payload-config'\n * import { oauthProtectedResourceHandler } from '@payloadcms/plugin-mcp'\n *\n * export const GET = oauthProtectedResourceHandler(config)\n * ```\n */\nexport const oauthProtectedResourceHandler =\n (config: Promise<SanitizedConfig> | SanitizedConfig) =>\n async (request: Request): Promise<Response> =>\n getMetadataResponse({ config: await config, url: request.url })\n\n/**\n * Answers an unauthenticated MCP request with a challenge linking to the protected resource\n * metadata, which starts the client's OAuth flow.\n */\nexport const oauthChallenge = ({ req }: { req: PayloadRequest }): Response =>\n bearerAuthChallengeResponse(\n new OAuthError(OAuthErrorCode.InvalidToken, req.t('error:unauthorized')),\n {\n resourceMetadataUrl: `${getMCPURL({ config: req.payload.config, url: req.url! })}/oauth-protected-resource`,\n },\n )\n\nconst getMCPURL = ({ config, url }: { config: SanitizedConfig; url: string }): string =>\n new URL(`${config.routes.api}/mcp`, config.serverURL || url).href\n\nconst getMetadataResponse = ({\n config,\n url,\n}: {\n config: SanitizedConfig\n url: string\n}): Response => {\n const pluginConfig = getPluginConfig({ config })\n\n if (!pluginConfig.oauth) {\n return new Response(null, { status: 404 })\n }\n\n return Response.json(\n {\n authorization_servers: pluginConfig.oauth.authorizationServers,\n bearer_methods_supported: ['header'],\n resource: pluginConfig.oauth.resource ?? getMCPURL({ config, url }),\n },\n // Public document, readable by browser-based MCP clients on any origin\n { headers: { 'Access-Control-Allow-Origin': '*' } },\n )\n}\n"],"names":["bearerAuthChallengeResponse","OAuthError","OAuthErrorCode","getPluginConfig","oauthProtectedResourceEndpoint","req","getMetadataResponse","config","payload","url","oauthProtectedResourceHandler","request","oauthChallenge","InvalidToken","t","resourceMetadataUrl","getMCPURL","URL","routes","api","serverURL","href","pluginConfig","oauth","Response","status","json","authorization_servers","authorizationServers","bearer_methods_supported","resource","headers"],"mappings":"AAEA,SACEA,2BAA2B,EAC3BC,UAAU,EACVC,cAAc,QACT,+BAA8B;AAErC,SAASC,eAAe,QAAQ,8BAA6B;AAE7D;;;CAGC,GACD,OAAO,MAAMC,iCAAiD,CAACC,MAC7DC,oBAAoB;QAAEC,QAAQF,IAAIG,OAAO,CAACD,MAAM;QAAEE,KAAKJ,IAAII,GAAG;IAAE,GAAE;AAEpE;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,gCACX,CAACH,SACD,OAAOI,UACLL,oBAAoB;YAAEC,QAAQ,MAAMA;YAAQE,KAAKE,QAAQF,GAAG;QAAC,GAAE;AAEnE;;;CAGC,GACD,OAAO,MAAMG,iBAAiB,CAAC,EAAEP,GAAG,EAA2B,GAC7DL,4BACE,IAAIC,WAAWC,eAAeW,YAAY,EAAER,IAAIS,CAAC,CAAC,wBAClD;QACEC,qBAAqB,GAAGC,UAAU;YAAET,QAAQF,IAAIG,OAAO,CAACD,MAAM;YAAEE,KAAKJ,IAAII,GAAG;QAAE,GAAG,yBAAyB,CAAC;IAC7G,GACD;AAEH,MAAMO,YAAY,CAAC,EAAET,MAAM,EAAEE,GAAG,EAA4C,GAC1E,IAAIQ,IAAI,GAAGV,OAAOW,MAAM,CAACC,GAAG,CAAC,IAAI,CAAC,EAAEZ,OAAOa,SAAS,IAAIX,KAAKY,IAAI;AAEnE,MAAMf,sBAAsB,CAAC,EAC3BC,MAAM,EACNE,GAAG,EAIJ;IACC,MAAMa,eAAenB,gBAAgB;QAAEI;IAAO;IAE9C,IAAI,CAACe,aAAaC,KAAK,EAAE;QACvB,OAAO,IAAIC,SAAS,MAAM;YAAEC,QAAQ;QAAI;IAC1C;IAEA,OAAOD,SAASE,IAAI,CAClB;QACEC,uBAAuBL,aAAaC,KAAK,CAACK,oBAAoB;QAC9DC,0BAA0B;YAAC;SAAS;QACpCC,UAAUR,aAAaC,KAAK,CAACO,QAAQ,IAAId,UAAU;YAAET;YAAQE;QAAI;IACnE,GACA,uEAAuE;IACvE;QAAEsB,SAAS;YAAE,+BAA+B;QAAI;IAAE;AAEtD"}
|
package/src/endpoint/oauth.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { PayloadHandler, PayloadRequest, SanitizedConfig } from 'payload'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
bearerAuthChallengeResponse,
|
|
5
|
-
OAuthError,
|
|
6
|
-
OAuthErrorCode,
|
|
7
|
-
} from '@modelcontextprotocol/server'
|
|
8
|
-
|
|
9
|
-
import { getPluginConfig } from '../utils/getPluginConfig.js'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Serves the OAuth protected resource metadata (RFC 9728) at `/api/mcp/oauth-protected-resource`.
|
|
13
|
-
* The OAuth challenge links here, so MCP clients find the authorization server without setup.
|
|
14
|
-
*/
|
|
15
|
-
export const oauthProtectedResourceEndpoint: PayloadHandler = (req) =>
|
|
16
|
-
getMetadataResponse({ config: req.payload.config, url: req.url! })
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Serves the same metadata for clients that ignore the challenge's link and only look at
|
|
20
|
-
* `/.well-known/oauth-protected-resource`. Mount it at the site root, e.g. in Next.js at
|
|
21
|
-
* `app/.well-known/oauth-protected-resource/[[...path]]/route.ts`:
|
|
22
|
-
*
|
|
23
|
-
* ```ts
|
|
24
|
-
* import config from '@payload-config'
|
|
25
|
-
* import { oauthProtectedResourceHandler } from '@payloadcms/plugin-mcp'
|
|
26
|
-
*
|
|
27
|
-
* export const GET = oauthProtectedResourceHandler(config)
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export const oauthProtectedResourceHandler =
|
|
31
|
-
(config: Promise<SanitizedConfig> | SanitizedConfig) =>
|
|
32
|
-
async (request: Request): Promise<Response> =>
|
|
33
|
-
getMetadataResponse({ config: await config, url: request.url })
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Answers an unauthenticated MCP request with a challenge linking to the protected resource
|
|
37
|
-
* metadata, which starts the client's OAuth flow.
|
|
38
|
-
*/
|
|
39
|
-
export const oauthChallenge = ({ req }: { req: PayloadRequest }): Response =>
|
|
40
|
-
bearerAuthChallengeResponse(
|
|
41
|
-
new OAuthError(OAuthErrorCode.InvalidToken, req.t('error:unauthorized')),
|
|
42
|
-
{
|
|
43
|
-
resourceMetadataUrl: `${getMCPURL({ config: req.payload.config, url: req.url! })}/oauth-protected-resource`,
|
|
44
|
-
},
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
const getMCPURL = ({ config, url }: { config: SanitizedConfig; url: string }): string =>
|
|
48
|
-
new URL(`${config.routes.api}/mcp`, config.serverURL || url).href
|
|
49
|
-
|
|
50
|
-
const getMetadataResponse = ({
|
|
51
|
-
config,
|
|
52
|
-
url,
|
|
53
|
-
}: {
|
|
54
|
-
config: SanitizedConfig
|
|
55
|
-
url: string
|
|
56
|
-
}): Response => {
|
|
57
|
-
const pluginConfig = getPluginConfig({ config })
|
|
58
|
-
|
|
59
|
-
if (!pluginConfig.oauth) {
|
|
60
|
-
return new Response(null, { status: 404 })
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return Response.json(
|
|
64
|
-
{
|
|
65
|
-
authorization_servers: pluginConfig.oauth.authorizationServers,
|
|
66
|
-
bearer_methods_supported: ['header'],
|
|
67
|
-
resource: pluginConfig.oauth.resource ?? getMCPURL({ config, url }),
|
|
68
|
-
},
|
|
69
|
-
// Public document, readable by browser-based MCP clients on any origin
|
|
70
|
-
{ headers: { 'Access-Control-Allow-Origin': '*' } },
|
|
71
|
-
)
|
|
72
|
-
}
|