@payloadcms/plugin-mcp 4.0.0-internal.40de3ec → 4.0.0-internal.4c792ad

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 (201) hide show
  1. package/dist/defaultAccess.d.ts +3 -0
  2. package/dist/defaultAccess.d.ts.map +1 -0
  3. package/dist/defaultAccess.js +3 -0
  4. package/dist/defaultAccess.js.map +1 -0
  5. package/dist/endpoint/access.d.ts +17 -5
  6. package/dist/endpoint/access.d.ts.map +1 -1
  7. package/dist/endpoint/access.js +82 -88
  8. package/dist/endpoint/access.js.map +1 -1
  9. package/dist/endpoint/index.d.ts.map +1 -1
  10. package/dist/endpoint/index.js +11 -0
  11. package/dist/endpoint/index.js.map +1 -1
  12. package/dist/exports/client.d.ts +1 -1
  13. package/dist/exports/client.d.ts.map +1 -1
  14. package/dist/exports/client.js +1 -1
  15. package/dist/exports/client.js.map +1 -1
  16. package/dist/exports/internal.d.ts +2 -0
  17. package/dist/exports/internal.d.ts.map +1 -0
  18. package/dist/exports/internal.js +3 -0
  19. package/dist/exports/internal.js.map +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +13 -18
  22. package/dist/index.js.map +1 -1
  23. package/dist/mcp/buildMcpServer.d.ts.map +1 -1
  24. package/dist/mcp/buildMcpServer.js +102 -71
  25. package/dist/mcp/buildMcpServer.js.map +1 -1
  26. package/dist/mcp/builtin/collections/authTools.d.ts.map +1 -1
  27. package/dist/mcp/builtin/collections/authTools.js +44 -6
  28. package/dist/mcp/builtin/collections/authTools.js.map +1 -1
  29. package/dist/mcp/builtin/collections/countTool.d.ts +2 -0
  30. package/dist/mcp/builtin/collections/countTool.d.ts.map +1 -0
  31. package/dist/mcp/builtin/collections/countTool.js +69 -0
  32. package/dist/mcp/builtin/collections/countTool.js.map +1 -0
  33. package/dist/mcp/builtin/collections/countVersionsTool.d.ts +2 -0
  34. package/dist/mcp/builtin/collections/countVersionsTool.d.ts.map +1 -0
  35. package/dist/mcp/builtin/collections/countVersionsTool.js +65 -0
  36. package/dist/mcp/builtin/collections/countVersionsTool.js.map +1 -0
  37. package/dist/mcp/builtin/collections/createTool.d.ts +1 -1
  38. package/dist/mcp/builtin/collections/createTool.d.ts.map +1 -1
  39. package/dist/mcp/builtin/collections/createTool.js +38 -42
  40. package/dist/mcp/builtin/collections/createTool.js.map +1 -1
  41. package/dist/mcp/builtin/collections/deleteTool.d.ts +1 -1
  42. package/dist/mcp/builtin/collections/deleteTool.d.ts.map +1 -1
  43. package/dist/mcp/builtin/collections/deleteTool.js +14 -20
  44. package/dist/mcp/builtin/collections/deleteTool.js.map +1 -1
  45. package/dist/mcp/builtin/collections/duplicateTool.d.ts +2 -0
  46. package/dist/mcp/builtin/collections/duplicateTool.d.ts.map +1 -0
  47. package/dist/mcp/builtin/collections/duplicateTool.js +97 -0
  48. package/dist/mcp/builtin/collections/duplicateTool.js.map +1 -0
  49. package/dist/mcp/builtin/collections/findDistinctTool.d.ts +2 -0
  50. package/dist/mcp/builtin/collections/findDistinctTool.d.ts.map +1 -0
  51. package/dist/mcp/builtin/collections/findDistinctTool.js +93 -0
  52. package/dist/mcp/builtin/collections/findDistinctTool.js.map +1 -0
  53. package/dist/mcp/builtin/collections/findTool.d.ts +1 -1
  54. package/dist/mcp/builtin/collections/findTool.d.ts.map +1 -1
  55. package/dist/mcp/builtin/collections/findTool.js +49 -43
  56. package/dist/mcp/builtin/collections/findTool.js.map +1 -1
  57. package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts +2 -0
  58. package/dist/mcp/builtin/collections/findVersionByIDTool.d.ts.map +1 -0
  59. package/dist/mcp/builtin/collections/findVersionByIDTool.js +84 -0
  60. package/dist/mcp/builtin/collections/findVersionByIDTool.js.map +1 -0
  61. package/dist/mcp/builtin/collections/findVersionsTool.d.ts +2 -0
  62. package/dist/mcp/builtin/collections/findVersionsTool.d.ts.map +1 -0
  63. package/dist/mcp/builtin/collections/findVersionsTool.js +99 -0
  64. package/dist/mcp/builtin/collections/findVersionsTool.js.map +1 -0
  65. package/dist/mcp/builtin/collections/formatCollectionError.d.ts +9 -0
  66. package/dist/mcp/builtin/collections/formatCollectionError.d.ts.map +1 -0
  67. package/dist/mcp/builtin/collections/formatCollectionError.js +60 -0
  68. package/dist/mcp/builtin/collections/formatCollectionError.js.map +1 -0
  69. package/dist/mcp/builtin/collections/getCollectionSchemaTool.d.ts +2 -0
  70. package/dist/mcp/builtin/collections/getCollectionSchemaTool.d.ts.map +1 -0
  71. package/dist/mcp/builtin/collections/getCollectionSchemaTool.js +47 -0
  72. package/dist/mcp/builtin/collections/getCollectionSchemaTool.js.map +1 -0
  73. package/dist/mcp/builtin/collections/restoreVersionTool.d.ts +2 -0
  74. package/dist/mcp/builtin/collections/restoreVersionTool.d.ts.map +1 -0
  75. package/dist/mcp/builtin/collections/restoreVersionTool.js +82 -0
  76. package/dist/mcp/builtin/collections/restoreVersionTool.js.map +1 -0
  77. package/dist/mcp/builtin/collections/updateTool.d.ts +1 -1
  78. package/dist/mcp/builtin/collections/updateTool.d.ts.map +1 -1
  79. package/dist/mcp/builtin/collections/updateTool.js +87 -86
  80. package/dist/mcp/builtin/collections/updateTool.js.map +1 -1
  81. package/dist/mcp/builtin/getConfigInfoTool.d.ts +2 -0
  82. package/dist/mcp/builtin/getConfigInfoTool.d.ts.map +1 -0
  83. package/dist/mcp/builtin/getConfigInfoTool.js +71 -0
  84. package/dist/mcp/builtin/getConfigInfoTool.js.map +1 -0
  85. package/dist/mcp/builtin/globals/countVersionsTool.d.ts +2 -0
  86. package/dist/mcp/builtin/globals/countVersionsTool.d.ts.map +1 -0
  87. package/dist/mcp/builtin/globals/countVersionsTool.js +65 -0
  88. package/dist/mcp/builtin/globals/countVersionsTool.js.map +1 -0
  89. package/dist/mcp/builtin/globals/findTool.d.ts.map +1 -1
  90. package/dist/mcp/builtin/globals/findTool.js +18 -21
  91. package/dist/mcp/builtin/globals/findTool.js.map +1 -1
  92. package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts +2 -0
  93. package/dist/mcp/builtin/globals/findVersionByIDTool.d.ts.map +1 -0
  94. package/dist/mcp/builtin/globals/findVersionByIDTool.js +80 -0
  95. package/dist/mcp/builtin/globals/findVersionByIDTool.js.map +1 -0
  96. package/dist/mcp/builtin/globals/findVersionsTool.d.ts +2 -0
  97. package/dist/mcp/builtin/globals/findVersionsTool.d.ts.map +1 -0
  98. package/dist/mcp/builtin/globals/findVersionsTool.js +95 -0
  99. package/dist/mcp/builtin/globals/findVersionsTool.js.map +1 -0
  100. package/dist/mcp/builtin/globals/getGlobalSchemaTool.d.ts +2 -0
  101. package/dist/mcp/builtin/globals/getGlobalSchemaTool.d.ts.map +1 -0
  102. package/dist/mcp/builtin/globals/getGlobalSchemaTool.js +47 -0
  103. package/dist/mcp/builtin/globals/getGlobalSchemaTool.js.map +1 -0
  104. package/dist/mcp/builtin/globals/restoreVersionTool.d.ts +2 -0
  105. package/dist/mcp/builtin/globals/restoreVersionTool.d.ts.map +1 -0
  106. package/dist/mcp/builtin/globals/restoreVersionTool.js +78 -0
  107. package/dist/mcp/builtin/globals/restoreVersionTool.js.map +1 -0
  108. package/dist/mcp/builtin/globals/updateTool.d.ts.map +1 -1
  109. package/dist/mcp/builtin/globals/updateTool.js +31 -40
  110. package/dist/mcp/builtin/globals/updateTool.js.map +1 -1
  111. package/dist/mcp/builtin/validateEntityData.d.ts +14 -0
  112. package/dist/mcp/builtin/validateEntityData.d.ts.map +1 -0
  113. package/dist/mcp/builtin/validateEntityData.js +82 -0
  114. package/dist/mcp/builtin/validateEntityData.js.map +1 -0
  115. package/dist/mcp/builtinTools.d.ts +144 -19
  116. package/dist/mcp/builtinTools.d.ts.map +1 -1
  117. package/dist/mcp/builtinTools.js +119 -20
  118. package/dist/mcp/builtinTools.js.map +1 -1
  119. package/dist/mcp/sanitizeMCPConfig.d.ts +0 -1
  120. package/dist/mcp/sanitizeMCPConfig.d.ts.map +1 -1
  121. package/dist/mcp/sanitizeMCPConfig.js +120 -58
  122. package/dist/mcp/sanitizeMCPConfig.js.map +1 -1
  123. package/dist/stdio.d.ts +3 -2
  124. package/dist/stdio.d.ts.map +1 -1
  125. package/dist/stdio.js +27 -8
  126. package/dist/stdio.js.map +1 -1
  127. package/dist/types.d.ts +62 -108
  128. package/dist/types.d.ts.map +1 -1
  129. package/dist/types.js +4 -4
  130. package/dist/types.js.map +1 -1
  131. package/dist/utils/getPluginConfig.d.ts +1 -1
  132. package/dist/utils/getPluginConfig.js +1 -1
  133. package/dist/utils/getPluginConfig.js.map +1 -1
  134. package/dist/utils/schemaConversion/getEntityInputSchema.d.ts +11 -0
  135. package/dist/utils/schemaConversion/getEntityInputSchema.d.ts.map +1 -0
  136. package/dist/utils/schemaConversion/getEntityInputSchema.js +34 -0
  137. package/dist/utils/schemaConversion/getEntityInputSchema.js.map +1 -0
  138. package/dist/utils/whereSchema.d.ts +9 -0
  139. package/dist/utils/whereSchema.d.ts.map +1 -0
  140. package/dist/utils/whereSchema.js +13 -0
  141. package/dist/utils/whereSchema.js.map +1 -0
  142. package/package.json +8 -11
  143. package/src/defaultAccess.ts +3 -0
  144. package/src/endpoint/access.ts +88 -101
  145. package/src/endpoint/index.ts +14 -1
  146. package/src/exports/client.ts +2 -1
  147. package/src/exports/internal.ts +1 -0
  148. package/src/index.ts +8 -16
  149. package/src/mcp/buildMcpServer.ts +131 -96
  150. package/src/mcp/builtin/collections/authTools.ts +45 -9
  151. package/src/mcp/builtin/collections/countTool.ts +74 -0
  152. package/src/mcp/builtin/collections/countVersionsTool.ts +70 -0
  153. package/src/mcp/builtin/collections/createTool.ts +55 -59
  154. package/src/mcp/builtin/collections/deleteTool.ts +19 -16
  155. package/src/mcp/builtin/collections/duplicateTool.ts +135 -0
  156. package/src/mcp/builtin/collections/findDistinctTool.ts +120 -0
  157. package/src/mcp/builtin/collections/findTool.ts +63 -33
  158. package/src/mcp/builtin/collections/findVersionByIDTool.ts +110 -0
  159. package/src/mcp/builtin/collections/findVersionsTool.ts +155 -0
  160. package/src/mcp/builtin/collections/formatCollectionError.ts +84 -0
  161. package/src/mcp/builtin/collections/getCollectionSchemaTool.ts +46 -0
  162. package/src/mcp/builtin/collections/restoreVersionTool.ts +108 -0
  163. package/src/mcp/builtin/collections/updateTool.ts +111 -110
  164. package/src/mcp/builtin/getConfigInfoTool.ts +69 -0
  165. package/src/mcp/builtin/globals/countVersionsTool.ts +69 -0
  166. package/src/mcp/builtin/globals/findTool.ts +26 -17
  167. package/src/mcp/builtin/globals/findVersionByIDTool.ts +104 -0
  168. package/src/mcp/builtin/globals/findVersionsTool.ts +148 -0
  169. package/src/mcp/builtin/globals/getGlobalSchemaTool.ts +41 -0
  170. package/src/mcp/builtin/globals/restoreVersionTool.ts +100 -0
  171. package/src/mcp/builtin/globals/updateTool.ts +50 -55
  172. package/src/mcp/builtin/validateEntityData.ts +132 -0
  173. package/src/mcp/builtinTools.ts +111 -41
  174. package/src/mcp/sanitizeMCPConfig.ts +116 -78
  175. package/src/stdio.ts +23 -8
  176. package/src/types.ts +77 -112
  177. package/src/utils/getPluginConfig.ts +1 -1
  178. package/src/utils/schemaConversion/getEntityInputSchema.ts +78 -0
  179. package/src/utils/whereSchema.ts +24 -0
  180. package/dist/collection/getAccessField.d.ts +0 -12
  181. package/dist/collection/getAccessField.d.ts.map +0 -1
  182. package/dist/collection/getAccessField.js +0 -57
  183. package/dist/collection/getAccessField.js.map +0 -1
  184. package/dist/collection/index.d.ts +0 -6
  185. package/dist/collection/index.d.ts.map +0 -1
  186. package/dist/collection/index.js +0 -60
  187. package/dist/collection/index.js.map +0 -1
  188. package/dist/components/AccessField/index.client.d.ts +0 -10
  189. package/dist/components/AccessField/index.client.d.ts.map +0 -1
  190. package/dist/components/AccessField/index.client.js +0 -305
  191. package/dist/components/AccessField/index.client.js.map +0 -1
  192. package/dist/components/AccessField/index.css +0 -93
  193. package/dist/utils/schemaConversion/buildToolInput.d.ts +0 -29
  194. package/dist/utils/schemaConversion/buildToolInput.d.ts.map +0 -1
  195. package/dist/utils/schemaConversion/buildToolInput.js +0 -51
  196. package/dist/utils/schemaConversion/buildToolInput.js.map +0 -1
  197. package/src/collection/getAccessField.ts +0 -64
  198. package/src/collection/index.ts +0 -64
  199. package/src/components/AccessField/index.client.tsx +0 -344
  200. package/src/components/AccessField/index.css +0 -93
  201. package/src/utils/schemaConversion/buildToolInput.ts +0 -68
package/src/types.ts CHANGED
@@ -6,18 +6,19 @@ import type {
6
6
  ResourceTemplate,
7
7
  ServerContext,
8
8
  StandardSchemaWithJSON,
9
+ ToolAnnotations,
9
10
  } from '@modelcontextprotocol/server'
10
11
  import type {
11
12
  AuthCollectionSlug,
12
- CollectionConfig,
13
13
  CollectionSlug,
14
- DefaultDocumentIDType,
15
14
  GlobalSlug,
16
15
  MaybePromise,
17
16
  PayloadRequest,
17
+ SanitizedPermissions,
18
18
  TypedUser,
19
19
  } from 'payload'
20
20
 
21
+ import type { GetAuthorizedMCPArgs } from './endpoint/access.js'
21
22
  import type {
22
23
  MCPCollectionAuthToolName,
23
24
  MCPCollectionBuiltinName,
@@ -26,8 +27,8 @@ import type {
26
27
 
27
28
  export type { MCPCollectionAuthToolName, MCPCollectionBuiltinName, MCPGlobalBuiltinName }
28
29
 
29
- /** Re-exported from `@modelcontextprotocol/server` — the JSON Schema shape the MCP runtime validates against. */
30
- export type { JsonSchemaType, StandardSchemaWithJSON }
30
+ /** Re-exported from `@modelcontextprotocol/server` — common MCP types used in plugin config. */
31
+ export type { JsonSchemaType, StandardSchemaWithJSON, ToolAnnotations }
31
32
 
32
33
  /**
33
34
  * What a tool's `input` (or a prompt's `argsSchema`) can be — either a raw
@@ -35,25 +36,6 @@ export type { JsonSchemaType, StandardSchemaWithJSON }
35
36
  */
36
37
  export type ToolInputSchema = JsonSchemaType | StandardSchemaWithJSON
37
38
 
38
- /**
39
- * Serializable mirror of `SanitizedMCPPluginConfig` for client components —
40
- * the full sanitized config carries functions (tool handlers, etc.) that can't
41
- * cross the server→client boundary. Built by `sanitizeClientPluginConfig` and
42
- * passed to the `AccessField` component via `clientProps`.
43
- *
44
- * @internal
45
- */
46
- export type ClientMCPPluginConfig = {
47
- items: Array<{
48
- collectionSlug?: string
49
- description: string
50
- globalSlug?: string
51
- key: string
52
- label: string
53
- type: 'collectionTool' | 'globalTool' | 'prompt' | 'resource' | 'tool'
54
- }>
55
- }
56
-
57
39
  export type MCPToolResponse = {
58
40
  content: ContentBlock[]
59
41
  /**
@@ -80,6 +62,19 @@ export type TypedInput<TSchema> = TSchema extends StandardSchemaWithJSON
80
62
  : StandardSchemaWithJSON.InferOutput<TSchema>
81
63
  : Record<string, unknown>
82
64
 
65
+ export type MCPAccessArgs = {
66
+ permissions?: SanitizedPermissions
67
+ req: PayloadRequest
68
+ }
69
+
70
+ export type CollectionMCPAccessArgs = {
71
+ collectionSlug: CollectionSlug
72
+ } & MCPAccessArgs
73
+
74
+ export type GlobalMCPAccessArgs = {
75
+ globalSlug: GlobalSlug
76
+ } & MCPAccessArgs
77
+
83
78
  export type ToolHandlerArgs<TSchema = undefined> = {
84
79
  authorizedMCP: AuthorizedMCP
85
80
  input: TypedInput<TSchema>
@@ -96,6 +91,8 @@ export type GlobalToolHandlerArgs<TSchema = undefined> = {
96
91
  } & ToolHandlerArgs<TSchema>
97
92
 
98
93
  export type Tool<TSchema extends ToolInputSchema | undefined = ToolInputSchema | undefined> = {
94
+ access?: (args: MCPAccessArgs) => MaybePromise<boolean>
95
+ annotations?: ToolAnnotations
99
96
  description: string
100
97
  handler: (args: ToolHandlerArgs<TSchema>) => MaybePromise<MCPToolResponse>
101
98
  input?: TSchema
@@ -105,30 +102,37 @@ export type Tool<TSchema extends ToolInputSchema | undefined = ToolInputSchema |
105
102
  overrideResponse?: MCPResponseOverride
106
103
  }
107
104
 
108
- /**
109
- * `TSchema` is the schema itself (Standard Schema, raw JSON Schema, or undefined).
110
- * The function-form variant of `input` carries a concrete `{ collectionSchema: JsonSchemaType }`
111
- * parameter type so callers can write `({ collectionSchema }) => …` without annotating it.
112
- */
113
105
  export type CollectionTool<
114
106
  TSchema extends ToolInputSchema | undefined = ToolInputSchema | undefined,
115
107
  > = {
108
+ access?: (args: CollectionMCPAccessArgs) => MaybePromise<boolean>
116
109
  handler: (args: CollectionToolHandlerArgs<TSchema>) => MaybePromise<MCPToolResponse>
117
- input?: ((args: { collectionSchema: JsonSchemaType }) => TSchema) | TSchema
118
- } & Pick<Tool, 'description' | 'overrideResponse'>
110
+ input?: TSchema
111
+ } & Pick<Tool, 'annotations' | 'description' | 'overrideResponse'>
119
112
 
120
113
  export type GlobalTool<TSchema extends ToolInputSchema | undefined = ToolInputSchema | undefined> =
121
114
  {
115
+ access?: (args: GlobalMCPAccessArgs) => MaybePromise<boolean>
122
116
  handler: (args: GlobalToolHandlerArgs<TSchema>) => MaybePromise<MCPToolResponse>
123
- input?: ((args: { globalSchema: JsonSchemaType }) => TSchema) | TSchema
124
- } & Pick<Tool, 'description' | 'overrideResponse'>
117
+ input?: TSchema
118
+ } & Pick<Tool, 'annotations' | 'description' | 'overrideResponse'>
125
119
 
126
120
  /**
127
121
  * Configures (or disables) a built-in tool without replacing it.
128
122
  * `handler?: never` prevents a full `CollectionTool`/`GlobalTool` (which has a
129
123
  * required handler) from being silently accepted at a built-in key slot.
130
124
  */
131
- export type MCPBuiltInToolOverride = {
125
+ export type MCPBuiltInCollectionToolOverride = {
126
+ access?: (args: CollectionMCPAccessArgs) => MaybePromise<boolean>
127
+ annotations?: ToolAnnotations
128
+ description?: string
129
+ handler?: never
130
+ overrideResponse?: MCPResponseOverride
131
+ }
132
+
133
+ export type MCPBuiltInGlobalToolOverride = {
134
+ access?: (args: GlobalMCPAccessArgs) => MaybePromise<boolean>
135
+ annotations?: ToolAnnotations
132
136
  description?: string
133
137
  handler?: never
134
138
  overrideResponse?: MCPResponseOverride
@@ -142,13 +146,13 @@ export type MCPBuiltInToolOverride = {
142
146
  export type MCPTopLevelToolEntry = Tool
143
147
 
144
148
  export type MCPCollectionToolsMap = {
145
- [customToolName: string]: boolean | CollectionTool | MCPBuiltInToolOverride | undefined
149
+ [customToolName: string]: boolean | CollectionTool | MCPBuiltInCollectionToolOverride | undefined
146
150
  } & {
147
- [K in MCPCollectionBuiltinName]?: false | MCPBuiltInToolOverride
151
+ [K in MCPCollectionBuiltinName]?: false | MCPBuiltInCollectionToolOverride
148
152
  }
149
153
 
150
154
  export type MCPAuthCollectionToolsMap = {
151
- [K in MCPCollectionAuthToolName]?: MCPBuiltInToolOverride | true
155
+ [K in MCPCollectionAuthToolName]?: MCPBuiltInCollectionToolOverride | true
152
156
  } & MCPCollectionToolsMap
153
157
 
154
158
  /** Auth-enabled collections get auth-tool name autocomplete; others get CRUD-only. */
@@ -157,9 +161,9 @@ export type MCPToolsMapForCollection<Slug extends CollectionSlug> = Slug extends
157
161
  : MCPCollectionToolsMap
158
162
 
159
163
  export type MCPGlobalToolsMap = {
160
- [customToolName: string]: boolean | GlobalTool | MCPBuiltInToolOverride | undefined
164
+ [customToolName: string]: boolean | GlobalTool | MCPBuiltInGlobalToolOverride | undefined
161
165
  } & {
162
- [K in MCPGlobalBuiltinName]?: false | MCPBuiltInToolOverride
166
+ [K in MCPGlobalBuiltinName]?: false | MCPBuiltInGlobalToolOverride
163
167
  }
164
168
 
165
169
  export type MCPTopLevelToolsMap = Record<string, Tool>
@@ -171,6 +175,7 @@ export type PromptHandlerArgs<TSchema = undefined> = {
171
175
  }
172
176
 
173
177
  export type Prompt<TSchema extends ToolInputSchema = ToolInputSchema> = {
178
+ access?: (args: MCPAccessArgs) => MaybePromise<boolean>
174
179
  argsSchema: TSchema
175
180
  description: string
176
181
  handler: (args: PromptHandlerArgs<TSchema>) => MaybePromise<{
@@ -188,6 +193,7 @@ export type ResourceHandlerArgs = {
188
193
  }
189
194
 
190
195
  export type Resource = {
196
+ access?: (args: MCPAccessArgs) => MaybePromise<boolean>
191
197
  description: string
192
198
  handler: (args: ResourceHandlerArgs) => MaybePromise<{
193
199
  contents: Array<{ text: string; uri: string }>
@@ -221,7 +227,7 @@ export type MCPPluginConfig = {
221
227
  collections?: {
222
228
  [Slug in CollectionSlug]?: MCPPluginCollectionConfig<Slug>
223
229
  }
224
- /** Skip MCP registration. The API key collection is still added (so DB / types stay stable). */
230
+ /** Skip MCP endpoint registration. */
225
231
  disabled?: boolean
226
232
  globals?: {
227
233
  [Slug in GlobalSlug]?: MCPPluginGlobalConfig
@@ -230,25 +236,21 @@ export type MCPPluginConfig = {
230
236
  serverOptions?: MCPServerOptions
231
237
  verboseLogs?: boolean
232
238
  }
233
- overrideApiKeyCollection?: (collection: CollectionConfig) => CollectionConfig
234
- /** Replace the default API-key auth with a custom resolver. */
235
- overrideAuth?: (args: {
236
- getAPIKeyDoc: (overrideApiKey?: string) => Promise<MCPAPIKeysDoc>
237
- getAuthorizedMCP: (args: { apiKeyDoc: MCPAPIKeysDoc }) => AuthorizedMCP
238
- pluginConfig: SanitizedMCPPluginConfig
239
- req: PayloadRequest
240
- }) => MaybePromise<AuthorizedMCP>
239
+ /** Replace the default MCP authorization resolver. */
240
+ overrideGetAuthorizedMCP?: (
241
+ args: {
242
+ pluginConfig: SanitizedMCPPluginConfig
243
+ } & GetAuthorizedMCPArgs,
244
+ ) => MaybePromise<AuthorizedMCP>
241
245
  prompts?: Record<string, Prompt>
242
246
  resources?: Record<string, Resource>
243
247
  /** Cross-cutting tools (not scoped to any collection or global). */
244
248
  tools?: MCPTopLevelToolsMap
245
- userCollection?: CollectionSlug
246
249
  }
247
250
 
248
251
  export type SanitizedMCPPluginConfig = {
249
252
  items: MCPItem[]
250
- userCollection: CollectionSlug
251
- } & Pick<MCPPluginConfig, 'disabled' | 'mcp' | 'overrideApiKeyCollection' | 'overrideAuth'>
253
+ } & Pick<MCPPluginConfig, 'disabled' | 'mcp' | 'overrideGetAuthorizedMCP'>
252
254
 
253
255
  export type MCPServerOptions = {
254
256
  options?: ConstructorParameters<typeof McpServer>[1]
@@ -256,71 +258,32 @@ export type MCPServerOptions = {
256
258
  }
257
259
 
258
260
  /**
259
- * Nested access tree as stored in the collection.
260
- * A `false` leaf disables that tool; missing keys defer to
261
- * defaults (built-in CRUD is on, opt-in tools are off).
262
- */
263
- export type MCPAPIKeysDocAccessTree = {
264
- collections?: {
265
- [CollectionSlug: CollectionSlug]: {
266
- [ToolKey: string]: boolean
267
- }
268
- }
269
- globals?: {
270
- [GlobalSlug: GlobalSlug]: {
271
- [ToolKey: string]: boolean
272
- }
273
- }
274
- prompts?: {
275
- [PromptKey: string]: boolean
276
- }
277
- resources?: {
278
- [ResourceKey: string]: boolean
279
- }
280
- tools?: {
281
- [ToolKey: string]: boolean
282
- }
283
- }
284
-
285
- /**
286
- * Stored on `payload-mcp-api-keys` docs
287
- */
288
- export type MCPAPIKeysDoc = {
289
- access: MCPAPIKeysDocAccessTree
290
- id: DefaultDocumentIDType
291
- overrideAccess?: boolean
292
- user: null | TypedUser
293
- }
294
-
295
- /**
296
- * One MCP primitive — tool, prompt, or resource — paired with the metadata both
297
- * the endpoint and the API key collection need. Built by `sanitizeMCPConfig`,
298
- * filtered by `getAuthorizedMCP`, registered by the MCP endpoint.
261
+ * One MCP primitive plus the metadata needed for config-driven filtering and
262
+ * registration.
299
263
  *
300
- * - `key`: the config identifier (`find`, `echo`). Used for the API-key deny
301
- * lookup and as the admin checkbox field name. For collection/global tools,
302
- * the MCP wire name (`findPosts`) is derived from `key + slug` at
303
- * registration time.
304
- * - `label`: human-readable admin-UI display text for the checkbox.
305
- * - `tool` / `prompt` / `resource`: the live primitive (its own
306
- * `description` is what both MCP clients and the admin UI surface).
264
+ * - `configKey`: the config identifier, e.g. `find` or `echo`.
265
+ * - `mcpName`: the MCP wire name, e.g. `findDocuments` or `echo`.
266
+ * - `label`: human-readable display text.
307
267
  */
308
268
  export type MCPItemBase = {
309
- key: string
269
+ configKey: string
310
270
  label: string
271
+ mcpName: string
311
272
  }
312
273
 
274
+ export type CollectionMCPItem = {
275
+ collectionSlug: CollectionSlug
276
+ tool: CollectionTool
277
+ type: 'collectionTool'
278
+ } & MCPItemBase
279
+
280
+ export type GlobalMCPItem = {
281
+ globalSlug: GlobalSlug
282
+ tool: GlobalTool
283
+ type: 'globalTool'
284
+ } & MCPItemBase
285
+
313
286
  export type MCPItem =
314
- | ({
315
- collectionSlug: CollectionSlug
316
- tool: CollectionTool
317
- type: 'collectionTool'
318
- } & MCPItemBase)
319
- | ({
320
- globalSlug: GlobalSlug
321
- tool: GlobalTool
322
- type: 'globalTool'
323
- } & MCPItemBase)
324
287
  | ({
325
288
  prompt: Prompt
326
289
  type: 'prompt'
@@ -333,12 +296,14 @@ export type MCPItem =
333
296
  tool: Tool
334
297
  type: 'tool'
335
298
  } & MCPItemBase)
299
+ | CollectionMCPItem
300
+ | GlobalMCPItem
336
301
 
337
302
  /**
338
- * The caller's identity + the MCP items they can use for this request. Returned
339
- * by `getAuthorizedMCP`; denied items are simply absent from `items`. Handlers
340
- * receive this via `args.authorizedMCP` so they can spread
341
- * `localAPIDefaults(authorizedMCP)` into every local API call.
303
+ * The caller's identity + the MCP items authorized for this request. Disabled
304
+ * items and items blocked by access callbacks or Payload operation access are
305
+ * absent from `items`. Tool handlers receive this via `args.authorizedMCP` so
306
+ * they can spread `localAPIDefaults(authorizedMCP)` into every local API call.
342
307
  */
343
308
  export type AuthorizedMCP = {
344
309
  items: MCPItem[]
@@ -5,7 +5,7 @@ import type { SanitizedMCPPluginConfig } from '../types.js'
5
5
  /**
6
6
  * Returns the sanitized plugin config — the form produced by
7
7
  * `sanitizeMCPConfig` and stashed back on the plugin's `options` during init.
8
- * Callers downstream of plugin init can rely on `items`, `userCollection`, etc.
8
+ * Callers downstream of plugin init can rely on `items` and other defaults
9
9
  * being fully resolved.
10
10
  */
11
11
  export const getPluginConfig: (args: { config: SanitizedConfig }) => SanitizedMCPPluginConfig = ({
@@ -0,0 +1,78 @@
1
+ import {
2
+ type CollectionSlug,
3
+ entityToStandaloneJSONSchema,
4
+ type GlobalSlug,
5
+ type PayloadRequest,
6
+ type SanitizedCollectionConfig,
7
+ type SanitizedGlobalConfig,
8
+ } from 'payload'
9
+
10
+ import type { JsonSchemaType } from '../../types.js'
11
+
12
+ import {
13
+ getCollectionVirtualFieldNames,
14
+ getGlobalVirtualFieldNames,
15
+ } from '../getVirtualFieldNames.js'
16
+ import { removeVirtualFieldsFromSchema } from './removeVirtualFieldsFromSchema.js'
17
+ import { sanitizeEntitySchema } from './sanitizeEntitySchema.js'
18
+
19
+ export const getCollectionInputSchema = ({
20
+ collectionSlug,
21
+ req,
22
+ }: {
23
+ collectionSlug: CollectionSlug
24
+ req: PayloadRequest
25
+ }): JsonSchemaType | null => {
26
+ const collection = req.payload.collections[collectionSlug]?.config
27
+
28
+ if (!collection) {
29
+ return null
30
+ }
31
+
32
+ return buildEntityInputSchema({
33
+ entity: collection,
34
+ req,
35
+ virtualFieldNames: getCollectionVirtualFieldNames(req.payload.config, collectionSlug),
36
+ })
37
+ }
38
+
39
+ export const getGlobalInputSchema = ({
40
+ globalSlug,
41
+ req,
42
+ }: {
43
+ globalSlug: GlobalSlug
44
+ req: PayloadRequest
45
+ }): JsonSchemaType | null => {
46
+ const global = req.payload.config.globals.find((globalConfig) => globalConfig.slug === globalSlug)
47
+
48
+ if (!global) {
49
+ return null
50
+ }
51
+
52
+ return buildEntityInputSchema({
53
+ entity: global,
54
+ req,
55
+ virtualFieldNames: getGlobalVirtualFieldNames(req.payload.config, globalSlug),
56
+ })
57
+ }
58
+
59
+ const buildEntityInputSchema = ({
60
+ entity,
61
+ req,
62
+ virtualFieldNames,
63
+ }: {
64
+ entity: SanitizedCollectionConfig | SanitizedGlobalConfig
65
+ req: PayloadRequest
66
+ virtualFieldNames: string[]
67
+ }): JsonSchemaType =>
68
+ sanitizeEntitySchema(
69
+ removeVirtualFieldsFromSchema(
70
+ entityToStandaloneJSONSchema({
71
+ config: req.payload.config,
72
+ defaultIDType: req.payload.db.defaultIDType,
73
+ entity,
74
+ i18n: req.i18n,
75
+ }) as unknown as JsonSchemaType,
76
+ virtualFieldNames,
77
+ ),
78
+ )
@@ -0,0 +1,24 @@
1
+ import type { Where } from 'payload'
2
+
3
+ import { validOperators } from 'payload/shared'
4
+ import { z } from 'zod'
5
+
6
+ const whereFieldSchema = z
7
+ .partialRecord(z.enum(validOperators), z.unknown())
8
+ .describe('Field query operators')
9
+
10
+ /**
11
+ * - Validates the `where` input of collection tools against Payload's `Where` shape
12
+ * - Field keys map to operator objects restricted to `validOperators`
13
+ * - `and` / `or` nest recursively
14
+ */
15
+ export const whereSchema: z.ZodType<Where> = z
16
+ .lazy(() =>
17
+ z
18
+ .object({
19
+ and: z.array(whereSchema).optional(),
20
+ or: z.array(whereSchema).optional(),
21
+ })
22
+ .catchall(whereFieldSchema),
23
+ )
24
+ .describe('Where clause using field names with Payload query operators, plus and/or groups')
@@ -1,12 +0,0 @@
1
- import type { JSONField } from 'payload';
2
- import type { SanitizedMCPPluginConfig } from '../types.js';
3
- /**
4
- * Returns the API key collection's `access` field — a JSON field whose value
5
- * is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is
6
- * a custom client component (`AccessField`) which renders a permissions
7
- * matrix; the field's stored shape is just the runtime access tree.
8
- */
9
- export declare const getAccessField: ({ pluginConfig, }: {
10
- pluginConfig: SanitizedMCPPluginConfig;
11
- }) => JSONField;
12
- //# sourceMappingURL=getAccessField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAccessField.d.ts","sourceRoot":"","sources":["../../src/collection/getAccessField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,KAAK,EAAkC,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,mBAE5B;IACD,YAAY,EAAE,wBAAwB,CAAA;CACvC,KAAG,SAqBH,CAAA"}
@@ -1,57 +0,0 @@
1
- /**
2
- * Returns the API key collection's `access` field — a JSON field whose value
3
- * is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is
4
- * a custom client component (`AccessField`) which renders a permissions
5
- * matrix; the field's stored shape is just the runtime access tree.
6
- */ export const getAccessField = ({ pluginConfig })=>{
7
- const clientPluginConfig = sanitizeClientPluginConfig(pluginConfig);
8
- return {
9
- name: 'access',
10
- type: 'json',
11
- admin: {
12
- components: {
13
- Field: {
14
- clientProps: {
15
- pluginConfig: clientPluginConfig
16
- },
17
- path: '@payloadcms/plugin-mcp/client#AccessField'
18
- }
19
- },
20
- // TODO: needs i18n once design is finalized
21
- description: 'Access for this API key — uncheck to revoke individual tools.',
22
- position: 'sidebar'
23
- },
24
- defaultValue: {},
25
- // TODO: needs i18n once design is finalized
26
- label: 'Access'
27
- };
28
- };
29
- /**
30
- * Strips the non-serializable parts of `SanitizedMCPPluginConfig` (handlers,
31
- * input/argsSchema functions, etc.) so the result is safe to thread to a
32
- * client component via `clientProps`.
33
- */ const sanitizeClientPluginConfig = (pluginConfig)=>({
34
- items: pluginConfig.items.map((item)=>({
35
- ...item.type === 'collectionTool' ? {
36
- collectionSlug: item.collectionSlug
37
- } : {},
38
- ...item.type === 'globalTool' ? {
39
- globalSlug: item.globalSlug
40
- } : {},
41
- type: item.type,
42
- description: itemDescription(item),
43
- key: item.key,
44
- label: item.label
45
- }))
46
- });
47
- const itemDescription = (item)=>{
48
- if (item.type === 'prompt') {
49
- return item.prompt.description;
50
- }
51
- if (item.type === 'resource') {
52
- return item.resource.description;
53
- }
54
- return item.tool.description;
55
- };
56
-
57
- //# sourceMappingURL=getAccessField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collection/getAccessField.ts"],"sourcesContent":["import type { JSONField } from 'payload'\n\nimport type { ClientMCPPluginConfig, MCPItem, SanitizedMCPPluginConfig } from '../types.js'\n\n/**\n * Returns the API key collection's `access` field — a JSON field whose value\n * is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is\n * a custom client component (`AccessField`) which renders a permissions\n * matrix; the field's stored shape is just the runtime access tree.\n */\nexport const getAccessField = ({\n pluginConfig,\n}: {\n pluginConfig: SanitizedMCPPluginConfig\n}): JSONField => {\n const clientPluginConfig = sanitizeClientPluginConfig(pluginConfig)\n\n return {\n name: 'access',\n type: 'json',\n admin: {\n components: {\n Field: {\n clientProps: { pluginConfig: clientPluginConfig },\n path: '@payloadcms/plugin-mcp/client#AccessField',\n },\n },\n // TODO: needs i18n once design is finalized\n description: 'Access for this API key — uncheck to revoke individual tools.',\n position: 'sidebar',\n },\n defaultValue: {},\n // TODO: needs i18n once design is finalized\n label: 'Access',\n }\n}\n\n/**\n * Strips the non-serializable parts of `SanitizedMCPPluginConfig` (handlers,\n * input/argsSchema functions, etc.) so the result is safe to thread to a\n * client component via `clientProps`.\n */\nconst sanitizeClientPluginConfig = (\n pluginConfig: SanitizedMCPPluginConfig,\n): ClientMCPPluginConfig => ({\n items: pluginConfig.items.map((item) => ({\n ...(item.type === 'collectionTool' ? { collectionSlug: item.collectionSlug } : {}),\n ...(item.type === 'globalTool' ? { globalSlug: item.globalSlug } : {}),\n type: item.type,\n description: itemDescription(item),\n key: item.key,\n label: item.label,\n })),\n})\n\nconst itemDescription = (item: MCPItem): string => {\n if (item.type === 'prompt') {\n return item.prompt.description\n }\n if (item.type === 'resource') {\n return item.resource.description\n }\n return item.tool.description\n}\n"],"names":["getAccessField","pluginConfig","clientPluginConfig","sanitizeClientPluginConfig","name","type","admin","components","Field","clientProps","path","description","position","defaultValue","label","items","map","item","collectionSlug","globalSlug","itemDescription","key","prompt","resource","tool"],"mappings":"AAIA;;;;;CAKC,GACD,OAAO,MAAMA,iBAAiB,CAAC,EAC7BC,YAAY,EAGb;IACC,MAAMC,qBAAqBC,2BAA2BF;IAEtD,OAAO;QACLG,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;oBACLC,aAAa;wBAAER,cAAcC;oBAAmB;oBAChDQ,MAAM;gBACR;YACF;YACA,4CAA4C;YAC5CC,aAAa;YACbC,UAAU;QACZ;QACAC,cAAc,CAAC;QACf,4CAA4C;QAC5CC,OAAO;IACT;AACF,EAAC;AAED;;;;CAIC,GACD,MAAMX,6BAA6B,CACjCF,eAC2B,CAAA;QAC3Bc,OAAOd,aAAac,KAAK,CAACC,GAAG,CAAC,CAACC,OAAU,CAAA;gBACvC,GAAIA,KAAKZ,IAAI,KAAK,mBAAmB;oBAAEa,gBAAgBD,KAAKC,cAAc;gBAAC,IAAI,CAAC,CAAC;gBACjF,GAAID,KAAKZ,IAAI,KAAK,eAAe;oBAAEc,YAAYF,KAAKE,UAAU;gBAAC,IAAI,CAAC,CAAC;gBACrEd,MAAMY,KAAKZ,IAAI;gBACfM,aAAaS,gBAAgBH;gBAC7BI,KAAKJ,KAAKI,GAAG;gBACbP,OAAOG,KAAKH,KAAK;YACnB,CAAA;IACF,CAAA;AAEA,MAAMM,kBAAkB,CAACH;IACvB,IAAIA,KAAKZ,IAAI,KAAK,UAAU;QAC1B,OAAOY,KAAKK,MAAM,CAACX,WAAW;IAChC;IACA,IAAIM,KAAKZ,IAAI,KAAK,YAAY;QAC5B,OAAOY,KAAKM,QAAQ,CAACZ,WAAW;IAClC;IACA,OAAOM,KAAKO,IAAI,CAACb,WAAW;AAC9B"}
@@ -1,6 +0,0 @@
1
- import type { CollectionConfig } from 'payload';
2
- import type { SanitizedMCPPluginConfig } from '../types.js';
3
- export declare const getAPIKeysCollection: ({ pluginConfig, }: {
4
- pluginConfig: SanitizedMCPPluginConfig;
5
- }) => CollectionConfig;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/collection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAI3D,eAAO,MAAM,oBAAoB,GAAI,mBAElC;IACD,YAAY,EAAE,wBAAwB,CAAA;CACvC,KAAG,gBAqDH,CAAA"}
@@ -1,60 +0,0 @@
1
- import { getAccessField } from './getAccessField.js';
2
- export const getAPIKeysCollection = ({ pluginConfig })=>{
3
- const collection = {
4
- slug: 'payload-mcp-api-keys',
5
- admin: {
6
- description: 'API keys control which collections, resources, tools, and prompts MCP clients can access',
7
- group: 'MCP',
8
- useAsTitle: 'label'
9
- },
10
- auth: {
11
- disableLocalStrategy: true,
12
- useAPIKey: true
13
- },
14
- fields: [
15
- {
16
- name: 'user',
17
- type: 'relationship',
18
- admin: {
19
- description: 'The user that the API key is associated with.'
20
- },
21
- relationTo: pluginConfig.userCollection,
22
- required: true
23
- },
24
- {
25
- name: 'label',
26
- type: 'text',
27
- admin: {
28
- description: 'A useful label for the API key.'
29
- }
30
- },
31
- {
32
- name: 'description',
33
- type: 'text',
34
- admin: {
35
- description: 'The purpose of the API key.'
36
- }
37
- },
38
- {
39
- name: 'overrideAccess',
40
- type: 'checkbox',
41
- admin: {
42
- description: 'When checked, this key bypasses Payload access control on every operation it performs. Leave unchecked unless you have a specific reason.'
43
- },
44
- defaultValue: false,
45
- label: 'Override access control'
46
- },
47
- getAccessField({
48
- pluginConfig
49
- })
50
- ],
51
- labels: {
52
- plural: 'API Keys',
53
- singular: 'API Key'
54
- },
55
- versions: false
56
- };
57
- return pluginConfig.overrideApiKeyCollection ? pluginConfig.overrideApiKeyCollection(collection) : collection;
58
- };
59
-
60
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collection/index.ts"],"sourcesContent":["import type { CollectionConfig } from 'payload'\n\nimport type { SanitizedMCPPluginConfig } from '../types.js'\n\nimport { getAccessField } from './getAccessField.js'\n\nexport const getAPIKeysCollection = ({\n pluginConfig,\n}: {\n pluginConfig: SanitizedMCPPluginConfig\n}): CollectionConfig => {\n const collection: CollectionConfig = {\n slug: 'payload-mcp-api-keys',\n admin: {\n description:\n 'API keys control which collections, resources, tools, and prompts MCP clients can access',\n group: 'MCP',\n useAsTitle: 'label',\n },\n auth: {\n disableLocalStrategy: true,\n useAPIKey: true,\n },\n fields: [\n {\n name: 'user',\n type: 'relationship',\n admin: { description: 'The user that the API key is associated with.' },\n relationTo: pluginConfig.userCollection,\n required: true,\n },\n {\n name: 'label',\n type: 'text',\n admin: { description: 'A useful label for the API key.' },\n },\n {\n name: 'description',\n type: 'text',\n admin: { description: 'The purpose of the API key.' },\n },\n {\n name: 'overrideAccess',\n type: 'checkbox',\n admin: {\n description:\n 'When checked, this key bypasses Payload access control on every operation it performs. Leave unchecked unless you have a specific reason.',\n },\n defaultValue: false,\n label: 'Override access control',\n },\n getAccessField({ pluginConfig }),\n ],\n labels: {\n plural: 'API Keys',\n singular: 'API Key',\n },\n versions: false,\n }\n\n return pluginConfig.overrideApiKeyCollection\n ? pluginConfig.overrideApiKeyCollection(collection)\n : collection\n}\n"],"names":["getAccessField","getAPIKeysCollection","pluginConfig","collection","slug","admin","description","group","useAsTitle","auth","disableLocalStrategy","useAPIKey","fields","name","type","relationTo","userCollection","required","defaultValue","label","labels","plural","singular","versions","overrideApiKeyCollection"],"mappings":"AAIA,SAASA,cAAc,QAAQ,sBAAqB;AAEpD,OAAO,MAAMC,uBAAuB,CAAC,EACnCC,YAAY,EAGb;IACC,MAAMC,aAA+B;QACnCC,MAAM;QACNC,OAAO;YACLC,aACE;YACFC,OAAO;YACPC,YAAY;QACd;QACAC,MAAM;YACJC,sBAAsB;YACtBC,WAAW;QACb;QACAC,QAAQ;YACN;gBACEC,MAAM;gBACNC,MAAM;gBACNT,OAAO;oBAAEC,aAAa;gBAAgD;gBACtES,YAAYb,aAAac,cAAc;gBACvCC,UAAU;YACZ;YACA;gBACEJ,MAAM;gBACNC,MAAM;gBACNT,OAAO;oBAAEC,aAAa;gBAAkC;YAC1D;YACA;gBACEO,MAAM;gBACNC,MAAM;gBACNT,OAAO;oBAAEC,aAAa;gBAA8B;YACtD;YACA;gBACEO,MAAM;gBACNC,MAAM;gBACNT,OAAO;oBACLC,aACE;gBACJ;gBACAY,cAAc;gBACdC,OAAO;YACT;YACAnB,eAAe;gBAAEE;YAAa;SAC/B;QACDkB,QAAQ;YACNC,QAAQ;YACRC,UAAU;QACZ;QACAC,UAAU;IACZ;IAEA,OAAOrB,aAAasB,wBAAwB,GACxCtB,aAAasB,wBAAwB,CAACrB,cACtCA;AACN,EAAC"}
@@ -1,10 +0,0 @@
1
- import type { JSONFieldClientProps } from 'payload';
2
- import React from 'react';
3
- import type { ClientMCPPluginConfig } from '../../types.js';
4
- import './index.css';
5
- type Props = {
6
- pluginConfig: ClientMCPPluginConfig;
7
- } & JSONFieldClientProps;
8
- export declare const AccessField: React.FC<Props>;
9
- export {};
10
- //# sourceMappingURL=index.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../src/components/AccessField/index.client.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,qBAAqB,EAA2B,MAAM,gBAAgB,CAAA;AAEpF,OAAO,aAAa,CAAA;AAQpB,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,qBAAqB,CAAA;CACpC,GAAG,oBAAoB,CAAA;AAoBxB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA0QvC,CAAA"}