@payloadcms/plugin-mcp 4.0.0-internal.9496957 → 4.0.0-internal.94ef095

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.
Files changed (121) hide show
  1. package/bin.js +0 -7
  2. package/dist/endpoint/access.d.ts +5 -0
  3. package/dist/endpoint/access.d.ts.map +1 -1
  4. package/dist/endpoint/access.js +42 -5
  5. package/dist/endpoint/access.js.map +1 -1
  6. package/dist/endpoint/index.d.ts.map +1 -1
  7. package/dist/endpoint/index.js +58 -4
  8. package/dist/endpoint/index.js.map +1 -1
  9. package/dist/endpoint/oauth.d.ts +37 -0
  10. package/dist/endpoint/oauth.d.ts.map +1 -0
  11. package/dist/endpoint/oauth.js +105 -0
  12. package/dist/endpoint/oauth.js.map +1 -0
  13. package/dist/endpoint/oauthLoginToken.d.ts +23 -0
  14. package/dist/endpoint/oauthLoginToken.d.ts.map +1 -0
  15. package/dist/endpoint/oauthLoginToken.js +80 -0
  16. package/dist/endpoint/oauthLoginToken.js.map +1 -0
  17. package/dist/endpoint/oauthServer.d.ts +28 -0
  18. package/dist/endpoint/oauthServer.d.ts.map +1 -0
  19. package/dist/endpoint/oauthServer.js +423 -0
  20. package/dist/endpoint/oauthServer.js.map +1 -0
  21. package/dist/exports/client.d.ts +1 -1
  22. package/dist/exports/client.d.ts.map +1 -1
  23. package/dist/exports/client.js +1 -1
  24. package/dist/exports/client.js.map +1 -1
  25. package/dist/exports/rsc.d.ts +2 -0
  26. package/dist/exports/rsc.d.ts.map +1 -0
  27. package/dist/exports/rsc.js +3 -0
  28. package/dist/exports/rsc.js.map +1 -0
  29. package/dist/index.d.ts +10 -2
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +34 -10
  32. package/dist/index.js.map +1 -1
  33. package/dist/mcp/buildMcpServer.d.ts +1 -1
  34. package/dist/mcp/buildMcpServer.d.ts.map +1 -1
  35. package/dist/mcp/buildMcpServer.js +3 -3
  36. package/dist/mcp/buildMcpServer.js.map +1 -1
  37. package/dist/mcp/builtin/collections/authTools.d.ts.map +1 -1
  38. package/dist/mcp/builtin/collections/authTools.js +4 -3
  39. package/dist/mcp/builtin/collections/authTools.js.map +1 -1
  40. package/dist/mcp/builtin/collections/createTool.d.ts.map +1 -1
  41. package/dist/mcp/builtin/collections/createTool.js +12 -6
  42. package/dist/mcp/builtin/collections/createTool.js.map +1 -1
  43. package/dist/mcp/builtin/collections/deleteTool.d.ts.map +1 -1
  44. package/dist/mcp/builtin/collections/deleteTool.js +9 -3
  45. package/dist/mcp/builtin/collections/deleteTool.js.map +1 -1
  46. package/dist/mcp/builtin/collections/duplicateTool.d.ts.map +1 -1
  47. package/dist/mcp/builtin/collections/duplicateTool.js +6 -2
  48. package/dist/mcp/builtin/collections/duplicateTool.js.map +1 -1
  49. package/dist/mcp/builtin/collections/fileInput.d.ts.map +1 -1
  50. package/dist/mcp/builtin/collections/fileInput.js +19 -54
  51. package/dist/mcp/builtin/collections/fileInput.js.map +1 -1
  52. package/dist/mcp/builtin/collections/findTool.js +8 -4
  53. package/dist/mcp/builtin/collections/findTool.js.map +1 -1
  54. package/dist/mcp/builtin/collections/getCollectionSchemaTool.d.ts.map +1 -1
  55. package/dist/mcp/builtin/collections/getCollectionSchemaTool.js +19 -3
  56. package/dist/mcp/builtin/collections/getCollectionSchemaTool.js.map +1 -1
  57. package/dist/mcp/builtin/collections/restoreVersionTool.js.map +1 -1
  58. package/dist/mcp/builtin/collections/updateTool.d.ts.map +1 -1
  59. package/dist/mcp/builtin/collections/updateTool.js +21 -8
  60. package/dist/mcp/builtin/collections/updateTool.js.map +1 -1
  61. package/dist/mcp/builtin/collections/uploadInstructionsTool.js.map +1 -1
  62. package/dist/mcp/builtin/globals/findTool.js.map +1 -1
  63. package/dist/mcp/builtin/globals/getGlobalSchemaTool.d.ts.map +1 -1
  64. package/dist/mcp/builtin/globals/getGlobalSchemaTool.js +19 -3
  65. package/dist/mcp/builtin/globals/getGlobalSchemaTool.js.map +1 -1
  66. package/dist/mcp/builtin/globals/updateTool.js.map +1 -1
  67. package/dist/mcp/sanitizeMCPConfig.d.ts.map +1 -1
  68. package/dist/mcp/sanitizeMCPConfig.js +3 -0
  69. package/dist/mcp/sanitizeMCPConfig.js.map +1 -1
  70. package/dist/stdio.js +4 -3
  71. package/dist/stdio.js.map +1 -1
  72. package/dist/types.d.ts +105 -3
  73. package/dist/types.d.ts.map +1 -1
  74. package/dist/types.js.map +1 -1
  75. package/dist/utils/seal.d.ts +17 -0
  76. package/dist/utils/seal.d.ts.map +1 -0
  77. package/dist/utils/seal.js +24 -0
  78. package/dist/utils/seal.js.map +1 -0
  79. package/dist/utils/toStandardSchema.js.map +1 -1
  80. package/dist/views/Authorize/AllowButtons/index.d.ts +18 -0
  81. package/dist/views/Authorize/AllowButtons/index.d.ts.map +1 -0
  82. package/dist/views/Authorize/AllowButtons/index.js +88 -0
  83. package/dist/views/Authorize/AllowButtons/index.js.map +1 -0
  84. package/dist/views/Authorize/index.css +19 -0
  85. package/dist/views/Authorize/index.d.ts +9 -0
  86. package/dist/views/Authorize/index.d.ts.map +1 -0
  87. package/dist/views/Authorize/index.js +86 -0
  88. package/dist/views/Authorize/index.js.map +1 -0
  89. package/package.json +30 -26
  90. package/src/endpoint/access.ts +45 -3
  91. package/src/endpoint/index.ts +50 -4
  92. package/src/endpoint/oauth.ts +108 -0
  93. package/src/endpoint/oauthLoginToken.ts +94 -0
  94. package/src/endpoint/oauthServer.ts +452 -0
  95. package/src/exports/client.ts +1 -1
  96. package/src/exports/rsc.ts +1 -0
  97. package/src/index.ts +53 -9
  98. package/src/mcp/buildMcpServer.ts +5 -5
  99. package/src/mcp/builtin/collections/authTools.ts +7 -4
  100. package/src/mcp/builtin/collections/createTool.ts +26 -6
  101. package/src/mcp/builtin/collections/deleteTool.ts +6 -4
  102. package/src/mcp/builtin/collections/duplicateTool.ts +3 -2
  103. package/src/mcp/builtin/collections/fileInput.ts +17 -59
  104. package/src/mcp/builtin/collections/findTool.ts +4 -4
  105. package/src/mcp/builtin/collections/getCollectionSchemaTool.ts +12 -1
  106. package/src/mcp/builtin/collections/restoreVersionTool.ts +1 -1
  107. package/src/mcp/builtin/collections/updateTool.ts +10 -6
  108. package/src/mcp/builtin/collections/uploadInstructionsTool.ts +1 -1
  109. package/src/mcp/builtin/globals/findTool.ts +1 -1
  110. package/src/mcp/builtin/globals/getGlobalSchemaTool.ts +11 -1
  111. package/src/mcp/builtin/globals/updateTool.ts +1 -1
  112. package/src/mcp/sanitizeMCPConfig.ts +1 -0
  113. package/src/stdio.ts +2 -2
  114. package/src/types.ts +105 -3
  115. package/src/utils/seal.ts +46 -0
  116. package/src/utils/toStandardSchema.ts +1 -1
  117. package/src/views/Authorize/AllowButtons/index.tsx +97 -0
  118. package/src/views/Authorize/index.css +19 -0
  119. package/src/views/Authorize/index.tsx +93 -0
  120. package/dist/mcp/builtin/collections/fileInput.spec.js +0 -86
  121. package/dist/mcp/builtin/collections/fileInput.spec.js.map +0 -1
@@ -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
- ? (schema as StandardSchemaWithJSON)
8
+ ? schema
9
9
  : fromJsonSchema(schema)
@@ -0,0 +1,97 @@
1
+ 'use client'
2
+
3
+ import { Button } from '@payloadcms/ui'
4
+ import React, { useEffect, useState, useSyncExternalStore } from 'react'
5
+
6
+ const baseClass = 'mcp-authorize'
7
+
8
+ /** How long the page must have been in front of the user before the buttons work, in ms. */
9
+ const enableDelay = 1000
10
+
11
+ // Whether the page is inside a frame never changes, so there's nothing to subscribe to
12
+ const subscribe = () => () => {}
13
+
14
+ /**
15
+ * The Allow and Deny buttons, protected against clicks the user didn't mean for this page:
16
+ *
17
+ * - Inside a frame they aren't shown, so other sites can't frame the page and trick users into
18
+ * clicking them. The server can't tell, so they're missing until the browser has checked.
19
+ * - They're disabled until the page has been visible and focused for a moment. Otherwise another
20
+ * site could open the page under the user's cursor while they double-click something else, so
21
+ * the second click lands on Allow. Leaving the page disables them again. Waiting works for every
22
+ * way of clicking, unlike requiring a mouse movement or key press first.
23
+ *
24
+ * @see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-17#section-7.11 for why the
25
+ * OAuth server must prevent clickjacking
26
+ * @see https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html#defending-against-doubleclickjacking
27
+ * for the double-click attack and its mitigation
28
+ */
29
+ export function AllowButtons() {
30
+ const isTopLevel = useSyncExternalStore(
31
+ subscribe,
32
+ () => window.top === window.self,
33
+ () => false,
34
+ )
35
+ const [isEnabled, setIsEnabled] = useState(false)
36
+
37
+ useEffect(() => {
38
+ let timeout: ReturnType<typeof setTimeout> | undefined
39
+
40
+ const enableAfterDelay = () => {
41
+ clearTimeout(timeout)
42
+ if (document.visibilityState === 'visible' && document.hasFocus()) {
43
+ timeout = setTimeout(() => setIsEnabled(true), enableDelay)
44
+ }
45
+ }
46
+ const disable = () => {
47
+ clearTimeout(timeout)
48
+ setIsEnabled(false)
49
+ }
50
+ const onVisibilityChange = () => {
51
+ if (document.visibilityState === 'visible') {
52
+ enableAfterDelay()
53
+ } else {
54
+ disable()
55
+ }
56
+ }
57
+
58
+ enableAfterDelay()
59
+ window.addEventListener('focus', enableAfterDelay)
60
+ window.addEventListener('blur', disable)
61
+ document.addEventListener('visibilitychange', onVisibilityChange)
62
+
63
+ return () => {
64
+ clearTimeout(timeout)
65
+ window.removeEventListener('focus', enableAfterDelay)
66
+ window.removeEventListener('blur', disable)
67
+ document.removeEventListener('visibilitychange', onVisibilityChange)
68
+ }
69
+ }, [])
70
+
71
+ if (!isTopLevel) {
72
+ return null
73
+ }
74
+
75
+ return (
76
+ <div className={`${baseClass}__actions`}>
77
+ <Button
78
+ buttonStyle="primary"
79
+ disabled={!isEnabled}
80
+ extraButtonProps={{ name: 'decision', value: 'allow' }}
81
+ margin={false}
82
+ type="submit"
83
+ >
84
+ Allow
85
+ </Button>
86
+ <Button
87
+ buttonStyle="secondary"
88
+ disabled={!isEnabled}
89
+ extraButtonProps={{ name: 'decision', value: 'deny' }}
90
+ margin={false}
91
+ type="submit"
92
+ >
93
+ Deny
94
+ </Button>
95
+ </div>
96
+ )
97
+ }
@@ -0,0 +1,19 @@
1
+ @layer payload-default {
2
+ .mcp-authorize {
3
+ overflow-wrap: anywhere;
4
+ }
5
+
6
+ .mcp-authorize__brand {
7
+ display: flex;
8
+ justify-content: center;
9
+ width: 100%;
10
+ margin-block-end: var(--spacer-5);
11
+ }
12
+
13
+ .mcp-authorize__actions {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ justify-content: center;
17
+ gap: var(--spacer-2);
18
+ }
19
+ }
@@ -0,0 +1,93 @@
1
+ import type { AdminViewServerProps } from 'payload'
2
+
3
+ import { FormHeader, Logo, MinimalTemplate } from '@payloadcms/ui/rsc'
4
+ import { formatAdminURL } from 'payload/shared'
5
+ import React from 'react'
6
+
7
+ import type { AuthorizeViewError, Client, Consent } from '../../endpoint/oauthServer.js'
8
+
9
+ // eslint-disable-next-line payload/no-imports-from-exports-dir -- Server component must reference exports dir for proper client boundary
10
+ import { AllowButtons } from '../../exports/client.js'
11
+ import { unseal } from '../../utils/seal.js'
12
+ import './index.css'
13
+
14
+ const baseClass = 'mcp-authorize'
15
+
16
+ const errorTitles: Record<AuthorizeViewError, string> = {
17
+ expired: 'This sign-in request expired',
18
+ 'invalid-link': 'This sign-in link is invalid',
19
+ }
20
+
21
+ /**
22
+ * The admin page where users allow an MCP client to use their account, for the built-in OAuth
23
+ * server. Its authorize endpoint sends users here with the consent to show, or with an error.
24
+ */
25
+ export function MCPAuthorizeView({
26
+ initPageResult,
27
+ params,
28
+ searchParams,
29
+ server,
30
+ user,
31
+ }: AdminViewServerProps) {
32
+ const { locale, permissions, req } = initPageResult
33
+ const { i18n, payload } = req
34
+ const sealedConsent = getSearchParam(searchParams?.consent)
35
+ const consent = unseal<Consent>({ type: 'consent', req, value: sealedConsent })
36
+ const client = consent && unseal<Client>({ type: 'client', req, value: consent.clientID })
37
+ // The consent is only valid for the user it was made for
38
+ const isConsentValid =
39
+ client &&
40
+ consent &&
41
+ req.user?.id === consent.userID &&
42
+ req.user.collection === consent.collection
43
+ const error: AuthorizeViewError =
44
+ getSearchParam(searchParams?.error) === 'invalid-link' ? 'invalid-link' : 'expired'
45
+ const account = String(user?.email ?? consent?.userID)
46
+ const returnHost = consent && (new URL(consent.redirectURI).host || consent.redirectURI)
47
+
48
+ return (
49
+ <MinimalTemplate className={baseClass}>
50
+ <div className={`${baseClass}__brand`}>
51
+ <Logo
52
+ i18n={i18n}
53
+ locale={locale}
54
+ params={params}
55
+ payload={payload}
56
+ permissions={permissions}
57
+ searchParams={searchParams}
58
+ server={server}
59
+ user={user}
60
+ />
61
+ </div>
62
+ {/* Not translated yet, so screen readers in other admin languages read it as English */}
63
+ <div lang="en">
64
+ {isConsentValid ? (
65
+ <>
66
+ <FormHeader
67
+ description={`It will be able to use this app's MCP tools as ${account}, and you will return to ${returnHost}.`}
68
+ heading={`Allow ${client.name} to use your account?`}
69
+ />
70
+ <form
71
+ action={formatAdminURL({
72
+ apiRoute: payload.config.routes.api,
73
+ path: '/mcp/oauth/authorize',
74
+ })}
75
+ method="post"
76
+ >
77
+ <input name="consent" type="hidden" value={sealedConsent!} />
78
+ <AllowButtons />
79
+ </form>
80
+ </>
81
+ ) : (
82
+ <FormHeader
83
+ description="Start the sign-in again from your MCP client."
84
+ heading={errorTitles[error]}
85
+ />
86
+ )}
87
+ </div>
88
+ </MinimalTemplate>
89
+ )
90
+ }
91
+
92
+ const getSearchParam = (value: string | string[] | undefined): null | string =>
93
+ typeof value === 'string' ? value : null
@@ -1,86 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { fileInputSchema, resolveFile } from './fileInput.js';
3
- describe('MCP file input', ()=>{
4
- it('should reject malformed MIME types', ()=>{
5
- const result = fileInputSchema.safeParse({
6
- data: 'aGVsbG8=',
7
- mimeType: 'text/plain\r\nx-test: value',
8
- name: 'hello.txt',
9
- source: 'base64'
10
- });
11
- expect(result.success).toBe(false);
12
- });
13
- it('should accept a prepared upload', ()=>{
14
- const result = fileInputSchema.safeParse({
15
- file: {
16
- filename: 'image.png',
17
- mimeType: 'image/png',
18
- size: 123,
19
- uploadReference: {
20
- uploadId: 'upload-id'
21
- }
22
- },
23
- source: 'uploadReference'
24
- });
25
- expect(result.success).toBe(true);
26
- });
27
- it('should reject oversized base64 files', async ()=>{
28
- const req = createRequest({
29
- maxFileSize: 4
30
- });
31
- await expect(resolveFile({
32
- slug: 'media',
33
- input: {
34
- data: Buffer.from('hello').toString('base64'),
35
- mimeType: 'text/plain',
36
- name: 'hello.txt',
37
- source: 'base64'
38
- },
39
- req
40
- })).rejects.toThrow('File exceeds the 4 byte upload limit.');
41
- });
42
- it('should reject URLs outside the collection allowlist', async ()=>{
43
- const req = createRequest({
44
- allowList: [
45
- {
46
- hostname: 'assets.example.com',
47
- protocol: 'https'
48
- }
49
- ]
50
- });
51
- await expect(resolveFile({
52
- slug: 'media',
53
- input: {
54
- source: 'externalURL',
55
- url: 'https://example.com/image.png'
56
- },
57
- req
58
- })).rejects.toThrow('The provided file URL is not allowed.');
59
- });
60
- });
61
- function createRequest({ allowList, maxFileSize }) {
62
- return {
63
- payload: {
64
- collections: {
65
- media: {
66
- config: {
67
- upload: allowList ? {
68
- pasteURL: {
69
- allowList
70
- }
71
- } : {}
72
- }
73
- }
74
- },
75
- config: {
76
- upload: {
77
- limits: {
78
- fileSize: maxFileSize
79
- }
80
- }
81
- }
82
- }
83
- };
84
- }
85
-
86
- //# sourceMappingURL=fileInput.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/mcp/builtin/collections/fileInput.spec.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport { describe, expect, it } from 'vitest'\n\nimport { fileInputSchema, resolveFile } from './fileInput.js'\n\ndescribe('MCP file input', () => {\n it('should reject malformed MIME types', () => {\n const result = fileInputSchema.safeParse({\n data: 'aGVsbG8=',\n mimeType: 'text/plain\\r\\nx-test: value',\n name: 'hello.txt',\n source: 'base64',\n })\n\n expect(result.success).toBe(false)\n })\n\n it('should accept a prepared upload', () => {\n const result = fileInputSchema.safeParse({\n file: {\n filename: 'image.png',\n mimeType: 'image/png',\n size: 123,\n uploadReference: { uploadId: 'upload-id' },\n },\n source: 'uploadReference',\n })\n\n expect(result.success).toBe(true)\n })\n\n it('should reject oversized base64 files', async () => {\n const req = createRequest({ maxFileSize: 4 })\n\n await expect(\n resolveFile({\n slug: 'media',\n input: {\n data: Buffer.from('hello').toString('base64'),\n mimeType: 'text/plain',\n name: 'hello.txt',\n source: 'base64',\n },\n req,\n }),\n ).rejects.toThrow('File exceeds the 4 byte upload limit.')\n })\n\n it('should reject URLs outside the collection allowlist', async () => {\n const req = createRequest({\n allowList: [{ hostname: 'assets.example.com', protocol: 'https' }],\n })\n\n await expect(\n resolveFile({\n slug: 'media',\n input: {\n source: 'externalURL',\n url: 'https://example.com/image.png',\n },\n req,\n }),\n ).rejects.toThrow('The provided file URL is not allowed.')\n })\n})\n\nfunction createRequest({\n allowList,\n maxFileSize,\n}: {\n allowList?: Array<{ hostname: string; protocol: 'http' | 'https' }>\n maxFileSize?: number\n}): PayloadRequest {\n return {\n payload: {\n collections: {\n media: {\n config: {\n upload: allowList ? { pasteURL: { allowList } } : {},\n },\n },\n },\n config: {\n upload: {\n limits: {\n fileSize: maxFileSize,\n },\n },\n },\n },\n } as unknown as PayloadRequest\n}\n"],"names":["describe","expect","it","fileInputSchema","resolveFile","result","safeParse","data","mimeType","name","source","success","toBe","file","filename","size","uploadReference","uploadId","req","createRequest","maxFileSize","slug","input","Buffer","from","toString","rejects","toThrow","allowList","hostname","protocol","url","payload","collections","media","config","up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