From 1b3ad7fa0319da08a340a1bf312333328facdae3 Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Wed, 17 Jun 2026 01:29:56 +0000 Subject: [PATCH 1/5] reviewed changes --- docs/migration-guide/v4.mdx | 14 +- docs/plugins/mcp.mdx | 125 ++++---- packages/plugin-mcp/package.json | 13 +- .../src/collection/getAccessField.ts | 84 ----- packages/plugin-mcp/src/collection/index.ts | 105 ------ .../components/APIKeyField/index.client.tsx | 73 ----- .../src/components/APIKeyField/index.css | 105 ------ .../APIKeysEmptyState/index.client.tsx | 36 --- .../components/AccessField/index.client.tsx | 299 ------------------ .../src/components/AccessField/index.css | 99 ------ .../components/SettingsMenu/index.client.tsx | 34 -- packages/plugin-mcp/src/endpoint/access.ts | 246 ++++++++------ packages/plugin-mcp/src/exports/client.ts | 6 +- packages/plugin-mcp/src/index.ts | 49 +-- packages/plugin-mcp/src/mcp/buildMcpServer.ts | 7 +- packages/plugin-mcp/src/mcp/builtinTools.ts | 44 ++- .../plugin-mcp/src/mcp/sanitizeMCPConfig.ts | 9 +- packages/plugin-mcp/src/stdio.ts | 10 +- packages/plugin-mcp/src/translations/index.ts | 108 ------- .../src/translations/languages/ar.ts | 35 -- .../src/translations/languages/az.ts | 35 -- .../src/translations/languages/bg.ts | 35 -- .../src/translations/languages/bnBd.ts | 35 -- .../src/translations/languages/bnIn.ts | 35 -- .../src/translations/languages/ca.ts | 35 -- .../src/translations/languages/cs.ts | 35 -- .../src/translations/languages/da.ts | 35 -- .../src/translations/languages/de.ts | 35 -- .../src/translations/languages/en.ts | 35 -- .../src/translations/languages/es.ts | 35 -- .../src/translations/languages/et.ts | 35 -- .../src/translations/languages/fa.ts | 35 -- .../src/translations/languages/fr.ts | 35 -- .../src/translations/languages/he.ts | 35 -- .../src/translations/languages/hr.ts | 35 -- .../src/translations/languages/hu.ts | 35 -- .../src/translations/languages/hy.ts | 35 -- .../src/translations/languages/id.ts | 35 -- .../src/translations/languages/is.ts | 35 -- .../src/translations/languages/it.ts | 35 -- .../src/translations/languages/ja.ts | 35 -- .../src/translations/languages/ko.ts | 35 -- .../src/translations/languages/lt.ts | 35 -- .../src/translations/languages/lv.ts | 35 -- .../src/translations/languages/my.ts | 35 -- .../src/translations/languages/nb.ts | 35 -- .../src/translations/languages/nl.ts | 35 -- .../src/translations/languages/pl.ts | 35 -- .../src/translations/languages/pt.ts | 35 -- .../src/translations/languages/ro.ts | 35 -- .../src/translations/languages/rs.ts | 35 -- .../src/translations/languages/rsLatin.ts | 35 -- .../src/translations/languages/ru.ts | 35 -- .../src/translations/languages/sk.ts | 35 -- .../src/translations/languages/sl.ts | 35 -- .../src/translations/languages/sv.ts | 35 -- .../src/translations/languages/ta.ts | 35 -- .../src/translations/languages/th.ts | 35 -- .../src/translations/languages/tr.ts | 35 -- .../src/translations/languages/uk.ts | 35 -- .../src/translations/languages/vi.ts | 35 -- .../src/translations/languages/zh.ts | 35 -- .../src/translations/languages/zhTw.ts | 35 -- packages/plugin-mcp/src/translations/types.ts | 34 -- pnpm-lock.yaml | 12 - .../src/app/(payload)/admin/importMap.js | 2 - templates/blank/src/payload-types.ts | 126 +------- test/_community/payload-types.ts | 48 --- test/a11y/payload-types.ts | 47 --- test/access-control/payload-types.ts | 49 --- test/admin-bar/payload-types.ts | 47 --- test/admin-root/payload-types.ts | 47 --- test/admin/payload-types.ts | 48 --- test/array-update/payload-types.ts | 47 --- test/auth-basic/payload-types.ts | 47 --- test/auth/payload-types.ts | 48 --- test/benchmark-blocks/payload-types.ts | 48 --- test/buildConfigWithDefaults.ts | 4 +- test/bulk-edit/payload-types.ts | 47 --- test/collections-graphql/payload-types.ts | 47 --- test/collections-rest/payload-types.ts | 47 --- test/config/payload-types.ts | 47 --- test/custom-graphql/payload-types.ts | 47 --- test/dashboard/payload-types.ts | 47 --- test/database/payload-types.ts | 48 --- test/dataloader/payload-types.ts | 48 --- test/email-nodemailer/payload-types.ts | 47 --- test/email-resend/payload-types.ts | 47 --- test/email/payload-types.ts | 47 --- test/endpoints/payload-types.ts | 47 --- test/evals/payload-types.ts | 47 --- test/field-error-states/payload-types.ts | 48 --- test/field-paths/payload-types.ts | 47 --- test/field-perf/payload-types.ts | 48 --- test/fields-relationship/payload-types.ts | 47 --- test/fields/payload-types.ts | 49 --- test/folders/payload-types.ts | 47 --- test/form-state/payload-types.ts | 47 --- test/globals/payload-types.ts | 47 --- test/graphql-schema-gen/payload-types.ts | 47 --- test/graphql/payload-types.ts | 47 --- test/group-by/payload-types.ts | 47 --- test/hierarchy/payload-types.ts | 47 --- test/hooks/payload-types.ts | 48 --- test/i18n/payload-types.ts | 47 --- test/joins/payload-types.ts | 47 --- test/kv/payload-types.ts | 47 --- test/lexical-mdx/payload-types.ts | 49 --- test/lexical/payload-types.ts | 68 ---- test/live-preview/payload-types.ts | 50 --- test/localization-rtl/payload-types.ts | 48 --- test/localization/payload-types.ts | 48 --- test/locked-documents/payload-types.ts | 48 --- test/login-with-username/payload-types.ts | 47 --- test/migrations-cli/payload-types.ts | 47 --- test/nested-fields/payload-types.ts | 47 --- test/payload-cloud/payload-types.ts | 47 --- test/plugin-cloud-storage/payload-types.ts | 47 --- test/plugin-ecommerce/payload-types.ts | 47 --- test/plugin-form-builder/payload-types.ts | 48 --- test/plugin-import-export/payload-types.ts | 48 --- test/plugin-mcp/config.ts | 15 +- test/plugin-multi-tenant/payload-types.ts | 48 --- test/plugin-nested-docs/payload-types.ts | 47 --- test/plugin-redirects/payload-types.ts | 47 --- test/plugin-search/payload-types.ts | 47 --- test/plugin-sentry/payload-types.ts | 47 --- test/plugin-seo/payload-types.ts | 48 --- test/plugin-stripe/payload-types.ts | 47 --- test/plugins/payload-types.ts | 47 --- test/query-presets/payload-types.ts | 47 --- test/queues/payload-types.ts | 48 --- test/relationships/payload-types.ts | 47 --- test/sdk/payload-types.ts | 47 --- test/select/payload-types.ts | 48 --- test/server-functions/payload-types.ts | 47 --- test/server-url/payload-types.ts | 47 --- test/sort/payload-types.ts | 47 --- test/storage-azure/payload-types.ts | 47 --- test/storage-gcs/payload-types.ts | 47 --- test/storage-r2/payload-types.ts | 47 --- test/storage-s3/payload-types.ts | 47 --- test/storage-uploadthing/payload-types.ts | 47 --- test/storage-vercel-blob/payload-types.ts | 47 --- test/tags/payload-types.ts | 47 --- test/trash/payload-types.ts | 47 --- test/types/payload-types.ts | 58 +--- test/types/types.spec.ts | 2 - test/uploads/payload-types.ts | 48 --- test/v4/payload-types.ts | 47 --- test/versions/payload-types.ts | 48 --- 151 files changed, 296 insertions(+), 6773 deletions(-) delete mode 100644 packages/plugin-mcp/src/collection/getAccessField.ts delete mode 100644 packages/plugin-mcp/src/collection/index.ts delete mode 100644 packages/plugin-mcp/src/components/APIKeyField/index.client.tsx delete mode 100644 packages/plugin-mcp/src/components/APIKeyField/index.css delete mode 100644 packages/plugin-mcp/src/components/APIKeysEmptyState/index.client.tsx delete mode 100644 packages/plugin-mcp/src/components/AccessField/index.client.tsx delete mode 100644 packages/plugin-mcp/src/components/AccessField/index.css delete mode 100644 packages/plugin-mcp/src/components/SettingsMenu/index.client.tsx delete mode 100644 packages/plugin-mcp/src/translations/index.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ar.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/az.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/bg.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/bnBd.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/bnIn.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ca.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/cs.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/da.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/de.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/en.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/es.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/et.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/fa.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/fr.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/he.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/hr.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/hu.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/hy.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/id.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/is.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/it.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ja.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ko.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/lt.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/lv.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/my.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/nb.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/nl.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/pl.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/pt.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ro.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/rs.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/rsLatin.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ru.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/sk.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/sl.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/sv.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/ta.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/th.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/tr.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/uk.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/vi.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/zh.ts delete mode 100644 packages/plugin-mcp/src/translations/languages/zhTw.ts delete mode 100644 packages/plugin-mcp/src/translations/types.ts diff --git a/docs/migration-guide/v4.mdx b/docs/migration-guide/v4.mdx index 7b9e88b99ce..8a963e06c7d 100644 --- a/docs/migration-guide/v4.mdx +++ b/docs/migration-guide/v4.mdx @@ -887,9 +887,9 @@ createAPIKeyFields({ }) ``` -### `@payloadcms/plugin-mcp` refactored: config API, built-in tool inputs, and API keys +### `@payloadcms/plugin-mcp` refactored: config API, built-in tool inputs, and user API keys -The MCP plugin was refactored. The public config API, the built-in tool inputs, and the API key collection schema all changed. Update your plugin config and delete + recreate any existing API keys. +The MCP plugin was refactored. The public config API, the built-in tool inputs, and API-key authentication changed. Update your plugin config and recreate MCP credentials as user API keys. **Collections and globals are now opt-out.** Drop the `enabled` flag. Every collection and global is exposed by default through the generic built-in tools (`getConfigInfo`, `getCollectionSchema`, `findDocuments`, `createDocument`, `updateDocument`, `deleteDocuments`, plus `getGlobalSchema`, `findGlobal`, and `updateGlobal` for globals). Turn individual operations off via simple config keys like `tools: { create: false }`. @@ -963,17 +963,19 @@ defineCollectionTool({ + mcpPlugin({ collections: { users: { tools: { login: true } } } }) ``` -**`mcp.handlerOptions` is gone.** `verboseLogs` moved to `mcp.verboseLogs`. `onEvent`, `maxDuration`, `disableSse`, `redisUrl` and `basePath` were removed. The `experimental.tools` block (auth, plus the collection / job / config codegen tools) was removed entirely. The unused `GET /api/mcp` route was dropped; only `POST` remains. +**`mcp.handlerOptions` is gone.** `verboseLogs` moved to `mcp.verboseLogs`. `onEvent`, `maxDuration`, `disableSse`, `redisUrl` and `basePath` were removed. The `experimental.tools` block (auth, plus the collection / job / config codegen tools) was removed entirely. The server-push `GET /api/mcp` stream is no longer supported; MCP requests use `POST /api/mcp`. **`overrideAuth` signature changed.** It now receives one argument object and returns an `AuthorizedMCP` instead of the old `MCPAccessSettings` (the type was removed). ```diff mcpPlugin({ - overrideAuth: (req, getDefaultMcpAccessSettings) => { ... }, -+ overrideAuth: ({ req, pluginConfig, getAPIKeyDoc, getAuthorizedMCP }) => { ... }, ++ overrideAuth: ({ req, pluginConfig, getAPIKeyUser, getAuthorizedMCP }) => { ... }, }) ``` -**API keys must be recreated and are managed from a new admin flow.** The `payload-mcp-api-keys` collection keeps its slug, but it is no longer auth-enabled, is hidden from the main nav, and is linked from the user menu under **Settings → Manage API keys**. Its admin shape changed: the API key value is handled by explicit encrypted `apiKey` and hashed `apiKeyIndex` fields behind a custom generate/copy UI, permissions are stored in one `access` JSON field, `label`, `description`, a required `user`, and `overrideAccess` render in the sidebar, and a `lastUsed` field was added for existing keys. Keys still run as their user when `overrideAccess` is enabled; that setting only bypasses Payload access rules for the key's operations. The list view now defaults to title, last used, and user columns, and renders a custom empty state when no API keys exist. Existing keys keep authenticating but lose their permissions (an empty `access` is treated as "allow everything"), so an un-migrated key silently gets full access. Delete your existing MCP API keys after upgrading and create fresh ones. +**MCP now uses user API keys.** The `payload-mcp-api-keys` collection was removed. API keys sent to `/api/mcp` now use Payload's normal `Authorization: API-Key ` header and are looked up against the configured `userCollection` using Payload's normal `auth.useAPIKey` fields. Enable `auth.useAPIKey` on that collection and create API keys on the users that should call MCP. Existing `payload-mcp-api-keys` documents no longer authenticate, and `overrideApiKeyCollection` was removed. -**Dependencies.** The plugin now builds on `@modelcontextprotocol/server` instead of `@modelcontextprotocol/sdk` + `mcp-handler`, and moved to `zod` v4. If your custom tools import `zod` directly, make sure it resolves to v4. `@payloadcms/ui` and `react` 19 are now peer dependencies; any Payload 4 project already provides both. +**MCP tool access is configured in code.** The old per-key permissions UI was removed with the MCP API-key collection. Tools, prompts, and resources can now define an `access` callback; built-in collection/global tools accept `access` in their override object. + +**Dependencies.** The plugin now builds on `@modelcontextprotocol/server` instead of `@modelcontextprotocol/sdk` + `mcp-handler`, and moved to `zod` v4. If your custom tools import `zod` directly, make sure it resolves to v4. diff --git a/docs/plugins/mcp.mdx b/docs/plugins/mcp.mdx index 8babead24f2..796f2dd390a 100644 --- a/docs/plugins/mcp.mdx +++ b/docs/plugins/mcp.mdx @@ -28,7 +28,7 @@ This plugin adds [Model Context Protocol](https://modelcontextprotocol.io/docs/g - Stable discovery and CRUD tools for all collections and globals (`getConfigInfo`, `getCollectionSchema`, `findDocuments`, `createDocument`, `updateDocument`, `deleteDocuments`, `getGlobalSchema`, `findGlobal`, `updateGlobal`) - opt out per operation with simple keys like `tools: { delete: false }` - Auth-enabled collections expose opt-in `login`, `auth`, `forgotPassword`, `resetPassword`, `unlock`, `verify` tools - Define your own `tools`, `prompts`, and `resources` with full TypeScript inference via `defineTool` / `defineCollectionTool` / `defineGlobalTool` / `definePrompt` -- Per-API-key access control through an admin-UI managed collection - toggle any tool, prompt, or resource on/off per key in real time +- Gate tools, prompts, and resources with code-level `access` callbacks while Payload access control still protects the underlying documents - Custom auth strategies via `overrideAuth` ## Installation @@ -74,9 +74,9 @@ inside your project. If your project has an unusual layout (e.g. a monorepo), se The stdio server above is for local development, and works even when the dev server is not running. -For deployed apps and remote clients, use the HTTP transport - `mcpPlugin` already exposes `POST /api/mcp` and a -`payload-mcp-api-keys` collection in the admin UI. [Create an API key](#creating-an-api-key), -then point your client at the endpoint - see [Connecting MCP clients](#http). +For deployed apps and remote clients, use the HTTP transport - `mcpPlugin` exposes `POST /api/mcp`. +[Create a user API key](#creating-an-api-key), then point your client at the endpoint - see +[Connecting MCP clients](#http). ### Configuring per-collection tools @@ -141,10 +141,9 @@ mcpPlugin({ | `tools` | `object` | Cross-cutting custom tools, keyed by tool name. Values are `Tool` objects (use [`defineTool`](#defining-custom-tools-prompts-and-resources)). | | `prompts` | `object` | Custom prompts, keyed by name. Values are `Prompt` objects (use [`definePrompt`](#prompts)). | | `resources` | `object` | Custom resources, keyed by name. Values are `Resource` objects. | -| `disabled` | `boolean` | Skip MCP registration. The API key collection is still added so database schema stays consistent across environments. | -| `userCollection` | `CollectionSlug` | The users collection API keys are associated with. Defaults to `config.admin.user` (typically `users`). | -| `overrideApiKeyCollection` | `function` | Modify the auto-generated `payload-mcp-api-keys` collection (add fields, hooks, etc.). | -| `overrideAuth` | `function` | Replace the default Bearer-token / API-key auth with a fully custom access strategy. See [Custom auth](#custom-auth). | +| `disabled` | `boolean` | Skip MCP endpoint registration. | +| `userCollection` | `CollectionSlug` | Auth collection used for default API-key lookup. Defaults to `config.admin.user` (typically `users`). | +| `overrideAuth` | `function` | Replace the default API-key auth with a fully custom access strategy. See [Custom auth](#custom-auth). | | `mcp.serverOptions.serverInfo.name` | `string` | The MCP server name advertised to clients. Default `'Payload MCP Server'`. | | `mcp.serverOptions.serverInfo.version` | `string` | The MCP server version. Default `'1.0.0'`. | | `mcp.serverOptions.options` | `object` | Raw options passed through to the underlying `McpServer` from `@modelcontextprotocol/server`. | @@ -162,10 +161,10 @@ mcpPlugin({ The `tools` map keys can be: -- A built-in key (`getCollectionSchema`, `find`, `create`, `update`, `delete`, plus auth tool names on auth collections): set to `false` to disable, or to an override object `{ description?, overrideResponse? }`. Auth tools also accept `true` to enable with no overrides. +- A built-in key (`getCollectionSchema`, `find`, `create`, `update`, `delete`, plus auth tool names on auth collections): set to `false` to disable, or to an override object `{ access?, description?, overrideResponse? }`. Auth tools also accept `true` to enable with no overrides. - A custom name: a value produced by `defineCollectionTool(...)`. -`getConfigInfo` is always registered as a top-level tool. It returns the collection and global slugs visible to the current MCP client. API keys can disable it like any other top-level tool. +`getConfigInfo` is always registered as a top-level tool. It returns the collection and global slugs visible to the current MCP client. ### Per-global options @@ -177,14 +176,14 @@ The plugin ships two transports. You can use either or both. ### HTTP transport (`/api/mcp`) -Once `mcpPlugin` is in your `plugins` array, `POST /api/mcp` accepts JSON-RPC 2.0 MCP requests. All requests must include a Bearer API key (see [API key authentication](#api-key-authentication)) - except in development. +Once `mcpPlugin` is in your `plugins` array, `POST /api/mcp` accepts JSON-RPC 2.0 MCP requests. All requests must include Payload's normal API-key header (see [API key authentication](#api-key-authentication)) - except in development. Quick test: ```bash curl -i 'http://localhost:3000/api/mcp' \ -X POST \ - -H 'Authorization: Bearer MCP-USER-API-KEY' \ + -H 'Authorization: users API-Key MCP-USER-API-KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}' @@ -202,7 +201,7 @@ Notes on stdio: - **You don't need `mcpPlugin` in your `plugins` array** for stdio to work. The bin auto-detects the plugin and falls back to default configuration (all collections / globals enabled with default tools) when it isn't registered. Installing the package is enough. - Add `mcpPlugin({ ... })` to your config when you want to customize tools, descriptions, prompts, or resources - the bin will pick up that configuration too. -- stdio runs **full access** (no API key, no per-tool filtering). Whoever can spawn the process is treated as the user. Do not use it in production. +- stdio does not require an API key. It runs local API calls with `overrideAccess: true`, and `access` callbacks receive `user: null`. Do not use it in production. - The bin uses `tsx` to load TypeScript configs directly. Pass `--disable-transpile` if your config is already compiled to JavaScript. ## Connecting MCP clients @@ -225,7 +224,7 @@ Most clients support the streamable-HTTP transport directly. If yours doesn't, t "mcp-remote", "http://127.0.0.1:3000/api/mcp", "--header", - "Authorization: Bearer MCP-USER-API-KEY" + "Authorization: users API-Key MCP-USER-API-KEY" ] } } @@ -244,7 +243,7 @@ Most clients support the streamable-HTTP transport directly. If yours doesn't, t "mcp-remote", "http://localhost:3000/api/mcp", "--header", - "Authorization: Bearer MCP-USER-API-KEY" + "Authorization: users API-Key MCP-USER-API-KEY" ] } } @@ -255,7 +254,7 @@ Most clients support the streamable-HTTP transport directly. If yours doesn't, t ```bash claude mcp add --transport http Payload http://127.0.0.1:3000/api/mcp \ - --header "Authorization: Bearer MCP-USER-API-KEY" + --header "Authorization: users API-Key MCP-USER-API-KEY" ``` #### Native HTTP (no `mcp-remote`) @@ -267,7 +266,7 @@ claude mcp add --transport http Payload http://127.0.0.1:3000/api/mcp \ "type": "http", "url": "http://localhost:3000/api/mcp", "headers": { - "Authorization": "Bearer MCP-USER-API-KEY" + "Authorization": "users API-Key MCP-USER-API-KEY" } } } @@ -323,47 +322,33 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is the fa npx @modelcontextprotocol/inspector ``` -- For HTTP: set the URL to `http://127.0.0.1:3000/api/mcp` and add `Authorization: Bearer MCP-USER-API-KEY` as a header. +- For HTTP: set the URL to `http://127.0.0.1:3000/api/mcp` and add `Authorization: users API-Key MCP-USER-API-KEY` as a header. - For stdio: choose the stdio transport and set the command to `npx payload-mcp`. Run the Inspector from your project directory, or set `PAYLOAD_CONFIG_PATH` (see [locating the config](#locating-the-config)). ## API key authentication -The HTTP endpoint requires a Bearer API key on every request. API keys live in the `payload-mcp-api-keys` collection that the plugin adds to your admin panel. +The HTTP endpoint requires Payload's normal API-key header on every request: -### Creating an API key +```txt +Authorization: API-Key +``` -1. Start your Payload server and open the admin panel -2. Open the user menu (avatar in the header), then **Settings → Manage API keys** -3. Click **Create New**, then click **Generate new key** -4. Pick the user the key represents (its Payload access control rules become the key's ceiling) -5. Under **Permissions**, leave items checked to allow them, uncheck them to deny - the Collections, Globals, and Server tabs list every collection tool, global tool, prompt, resource, and top-level tool -6. Optionally check **Override access control** to make local-API calls performed by this key run with `overrideAccess: true` (use sparingly; this bypasses Payload access rules) -7. Save and copy the key +MCP authenticates those keys against the configured `userCollection` using Payload's normal auth API-key fields. -### Dev-mode session fallback +### Creating an API key -In `NODE_ENV=development`, requests without an `Authorization` header fall back to no user with `overrideAccess: true`. Production builds require the Bearer token. +1. Start your Payload server and open the admin panel +2. Open a user document in the collection configured as `userCollection` +3. Enable API key auth for that user, generate a key, then save and copy it +4. Use that key as `Authorization: users API-Key ` when calling `/api/mcp` (replace `users` with your configured `userCollection`) -### Customizing the API key collection +The user attached to the API key is used for Payload access control. Enable `auth.useAPIKey` on your configured user collection if it is not already enabled. -```ts -mcpPlugin({ - overrideApiKeyCollection: (collection) => { - collection.fields.push({ - name: 'department', - type: 'select', - options: [ - { label: 'Development', value: 'dev' }, - { label: 'Marketing', value: 'marketing' }, - ], - }) +### Dev-mode session fallback - return collection - }, -}) -``` +In `NODE_ENV=development`, requests without an `Authorization` header fall back to no user with `overrideAccess: true`. Production builds require the API-key header. ### Custom auth @@ -374,7 +359,7 @@ import { type AuthorizedMCP, mcpPlugin } from '@payloadcms/plugin-mcp' mcpPlugin({ overrideAuth: async ({ - getAPIKeyDoc, + getAPIKeyUser, getAuthorizedMCP, pluginConfig, req, @@ -395,8 +380,8 @@ mcpPlugin({ } // Option 2: still defer to the built-in API-key lookup when you want to - const apiKeyDoc = await getAPIKeyDoc() - return getAuthorizedMCP({ apiKeyDoc }) + const user = await getAPIKeyUser() + return getAuthorizedMCP({ user }) }, }) ``` @@ -405,8 +390,8 @@ The handler receives: - `req` - the incoming `PayloadRequest` - `pluginConfig` - the fully sanitized plugin config, including the registered `items` -- `getAPIKeyDoc(overrideKey?)` - runs the default Bearer-token lookup (optionally with a key you provide) -- `getAuthorizedMCP({ apiKeyDoc })` - builds an `AuthorizedMCP` from an API key doc the same way the built-in resolver does +- `getAPIKeyUser(overrideKey?)` - runs the default API-key lookup against the configured user collection (optionally with a key you provide) +- `getAuthorizedMCP({ user, overrideAccess? })` - builds an `AuthorizedMCP` with all configured items for the given user ## Defining custom tools, prompts, and resources @@ -448,7 +433,7 @@ mcpPlugin({ ### Collection-scoped tools -A collection tool's wire name is exactly its key. Payload adds a `collectionSlug` string to the MCP input schema automatically; the handler receives the resolved `collectionSlug`. The field is intentionally not enum-restricted so newly-added collections can be used after HMR even if the MCP client cached the previous tool schema. +A collection tool's wire name is exactly its key. Payload adds a `collectionSlug` string to the MCP input schema automatically; the handler receives the resolved `collectionSlug`. The field is intentionally not enum-restricted so newly-added collections can be used after HMR even if the MCP client cached the previous tool schema. Built-in collection tools still validate the requested slug against Payload access control on the server. ```ts import { defineCollectionTool, mcpPlugin } from '@payloadcms/plugin-mcp' @@ -489,7 +474,7 @@ mcpPlugin({ ### Global-scoped tools -`defineGlobalTool` mirrors `defineCollectionTool`. Payload adds a `globalSlug` string to the MCP input schema automatically; the handler receives the resolved `globalSlug`. The field is intentionally not enum-restricted so newly-added globals can be used after HMR even if the MCP client cached the previous tool schema. +`defineGlobalTool` mirrors `defineCollectionTool`. Payload adds a `globalSlug` string to the MCP input schema automatically; the handler receives the resolved `globalSlug`. The field is intentionally not enum-restricted so newly-added globals can be used after HMR even if the MCP client cached the previous tool schema. Built-in global tools still validate the requested slug against Payload access control on the server. ```ts import { defineGlobalTool, mcpPlugin } from '@payloadcms/plugin-mcp' @@ -523,6 +508,34 @@ mcpPlugin({ }) ``` +### Access callbacks + +Tools, prompts, and resources can include an `access` callback. Return `false` to hide that MCP primitive from the current request. Built-in collection and global tools accept the same callback in their override object. + +```ts +mcpPlugin({ + collections: { + posts: { + tools: { + delete: { + access: ({ authorizedMCP }) => Boolean(authorizedMCP.user), + }, + }, + }, + }, + tools: { + adminReport: defineTool({ + description: 'Generate an admin report.', + access: ({ authorizedMCP }) => Boolean(authorizedMCP.user), + }).handler(async () => ({ + content: [{ type: 'text', text: 'Report generated.' }], + })), + }, +}) +``` + +Payload access control also controls built-in collection and global tool availability: for example, `updateDocument` is only registered when the caller has `update` access to at least one collection, and server-side validation rejects collection slugs where the caller lacks `update` access. The `access` callback is an extra MCP-level gate for tools, prompts, and resources. + ### Prompts ```ts @@ -606,7 +619,7 @@ Every handler receives an `authorizedMCP` object describing the caller: ```ts type AuthorizedMCP = { items: MCPItem[] // the items this caller may use - overrideAccess: boolean // mirror of the API key doc's setting + overrideAccess: boolean // true for trusted local transports or custom auth flows user: TypedUser | null // the resolved user (null for stdio) } ``` @@ -624,7 +637,7 @@ await req.payload.create({ }) ``` -Built-in CRUD tools already use this pattern, so they automatically respect the API key's `overrideAccess` setting and run under the key's user. +Built-in CRUD tools already use this pattern, so they automatically run under the resolved user unless a trusted flow opts into `overrideAccess`. ## Reducing token usage with `select` @@ -635,7 +648,7 @@ The built-in `findDocuments`, `findGlobal`, `createDocument`, `updateDocument`, ```bash curl -i 'http://localhost:3000/api/mcp' \ -X POST \ - -H 'Authorization: Bearer MCP-USER-API-KEY' \ + -H 'Authorization: users API-Key MCP-USER-API-KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ @@ -738,7 +751,7 @@ Example - find posts in Spanish with English as fallback: ```bash curl -i 'http://localhost:3000/api/mcp' \ -X POST \ - -H 'Authorization: Bearer MCP-USER-API-KEY' \ + -H 'Authorization: users API-Key MCP-USER-API-KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ diff --git a/packages/plugin-mcp/package.json b/packages/plugin-mcp/package.json index 3cb136a3800..58f8930cb30 100644 --- a/packages/plugin-mcp/package.json +++ b/packages/plugin-mcp/package.json @@ -21,9 +21,6 @@ "url": "https://payloadcms.com" } ], - "sideEffects": [ - "*.css" - ], "type": "module", "exports": { ".": { @@ -66,21 +63,15 @@ "dependencies": { "@cfworker/json-schema": "^4.1.1", "@modelcontextprotocol/server": "2.0.0-alpha.2", - "@payloadcms/translations": "workspace:*", "tsx": "4.22.4", "zod": "^4.0.0" }, "devDependencies": { "@payloadcms/eslint-config": "workspace:*", - "@payloadcms/ui": "workspace:*", - "@types/react": "19.2.14", - "payload": "workspace:*", - "react": "^19.0.1 || ^19.1.2 || ^19.2.1" + "payload": "workspace:*" }, "peerDependencies": { - "@payloadcms/ui": "workspace:*", - "payload": "workspace:*", - "react": "^19.0.1 || ^19.1.2 || ^19.2.1" + "payload": "workspace:*" }, "publishConfig": { "exports": { diff --git a/packages/plugin-mcp/src/collection/getAccessField.ts b/packages/plugin-mcp/src/collection/getAccessField.ts deleted file mode 100644 index 4ae711b50c5..00000000000 --- a/packages/plugin-mcp/src/collection/getAccessField.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { JSONField } from 'payload' - -import type { ClientMCPPluginConfig, MCPItem, SanitizedMCPPluginConfig } from '../types.js' - -import { - COLLECTION_AUTH_BUILTINS, - COLLECTION_BUILTINS, - GLOBAL_BUILTINS, -} from '../mcp/builtinTools.js' - -/** - * Returns the API key collection's `access` field — a JSON field whose value - * is the `MCPAPIKeysDocAccessTree` the endpoint consults. The actual UI is - * a custom client component (`AccessField`) which renders a permissions - * matrix; the field's stored shape is just the runtime access tree. - */ -export const getAccessField = ({ - pluginConfig, -}: { - pluginConfig: SanitizedMCPPluginConfig -}): JSONField => { - const clientPluginConfig = sanitizeClientPluginConfig(pluginConfig) - - return { - name: 'access', - type: 'json', - admin: { - components: { - Field: { - clientProps: { pluginConfig: clientPluginConfig }, - path: '@payloadcms/plugin-mcp/client#AccessField', - }, - }, - }, - defaultValue: {}, - label: false, - } -} - -/** - * Strips the non-serializable parts of `SanitizedMCPPluginConfig` (handlers, - * input/argsSchema functions, etc.) so the result is safe to thread to a - * client component via `clientProps`. - */ -const sanitizeClientPluginConfig = ( - pluginConfig: SanitizedMCPPluginConfig, -): ClientMCPPluginConfig => ({ - items: pluginConfig.items.map((item) => { - const group = itemGroup(item) - - return { - ...(item.type === 'collectionTool' ? { collectionSlug: item.collectionSlug } : {}), - ...(item.type === 'globalTool' ? { globalSlug: item.globalSlug } : {}), - type: item.type, - configKey: item.configKey, - ...(group === 'operations' ? {} : { description: itemDescription(item) }), - group, - label: item.label, - } - }), -}) - -const itemDescription = (item: MCPItem): string => { - if (item.type === 'prompt') { - return item.prompt.description - } - if (item.type === 'resource') { - return item.resource.description - } - return item.tool.description -} - -const itemGroup = (item: MCPItem): 'auth' | 'custom' | 'operations' | undefined => { - if (item.type === 'collectionTool') { - if (item.configKey in COLLECTION_BUILTINS) { - return 'operations' - } - return item.configKey in COLLECTION_AUTH_BUILTINS ? 'auth' : 'custom' - } - if (item.type === 'globalTool') { - return item.configKey in GLOBAL_BUILTINS ? 'operations' : 'custom' - } - return undefined -} diff --git a/packages/plugin-mcp/src/collection/index.ts b/packages/plugin-mcp/src/collection/index.ts deleted file mode 100644 index 52077f8b147..00000000000 --- a/packages/plugin-mcp/src/collection/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { CollectionConfig } from 'payload' - -import { createAPIKeyFields } from 'payload' - -import type { SanitizedMCPPluginConfig } from '../types.js' - -import { getAccessField } from './getAccessField.js' - -const apiKeyStorageFields = createAPIKeyFields({ - apiKeyField: { - admin: { - components: { Field: '@payloadcms/plugin-mcp/client#APIKeyField' }, - }, - required: true, - }, - apiKeyIndexField: { - index: true, - required: true, - }, - includeEnableAPIKey: false, -}) - -export const getAPIKeysCollection = ({ - pluginConfig, -}: { - pluginConfig: SanitizedMCPPluginConfig -}): CollectionConfig => { - const collection: CollectionConfig = { - slug: 'payload-mcp-api-keys', - admin: { - components: { - views: { - list: { - NoResults: '@payloadcms/plugin-mcp/client#APIKeysEmptyState', - }, - }, - }, - defaultColumns: ['label', 'lastUsed', 'user'], - // Kept out of the main nav — reachable through the user menu's settings instead. - group: false, - useAsTitle: 'label', - }, - fields: [ - ...apiKeyStorageFields, - getAccessField({ pluginConfig }), - { - name: 'label', - type: 'text', - admin: { - description: ({ t }) => t('plugin-mcp:titleDescription'), - position: 'sidebar', - }, - label: ({ t }) => t('plugin-mcp:title'), - }, - { - name: 'description', - type: 'text', - admin: { - description: ({ t }) => t('plugin-mcp:descriptionDescription'), - position: 'sidebar', - }, - label: ({ t }) => t('plugin-mcp:description'), - }, - { - name: 'lastUsed', - type: 'date', - admin: { - date: { pickerAppearance: 'dayAndTime' }, - disabled: { field: true }, - }, - label: ({ t }) => t('plugin-mcp:lastUsed'), - }, - { - name: 'user', - type: 'relationship', - admin: { - description: ({ t }) => t('plugin-mcp:userDescription'), - position: 'sidebar', - }, - label: ({ t }) => t('general:user'), - relationTo: pluginConfig.userCollection, - required: true, - }, - { - name: 'overrideAccess', - type: 'checkbox', - admin: { - description: ({ t }) => t('plugin-mcp:overrideAccessDescription'), - position: 'sidebar', - }, - defaultValue: false, - label: ({ t }) => t('plugin-mcp:overrideAccess'), - }, - ], - labels: { - plural: ({ t }) => `${t('plugin-mcp:mcp')} ${t('plugin-mcp:apiKeys')}`, - singular: ({ t }) => `${t('plugin-mcp:mcp')} ${t('authentication:apiKey')}`, - }, - versions: false, - } - - return pluginConfig.overrideApiKeyCollection - ? pluginConfig.overrideApiKeyCollection(collection) - : collection -} diff --git a/packages/plugin-mcp/src/components/APIKeyField/index.client.tsx b/packages/plugin-mcp/src/components/APIKeyField/index.client.tsx deleted file mode 100644 index 478c4782aa0..00000000000 --- a/packages/plugin-mcp/src/components/APIKeyField/index.client.tsx +++ /dev/null @@ -1,73 +0,0 @@ -'use client' - -import { APIKeyInput, Button, useField, useTranslation, WarningTriangleIcon } from '@payloadcms/ui' -import React, { useState } from 'react' - -import type { - PluginMCPTranslationKeys, - PluginMCPTranslations, -} from '../../translations/index.js' - -import './index.css' - -const baseClass = 'mcp-api-key-field' - -/** - * Custom component for the MCP API-keys collection's `apiKey` field: - * - no key yet: a "Generate new key" button - * - key set: a dismissible privacy warning + the shared masked-key input - */ -export const APIKeyField: React.FC = () => { - const { setValue: setApiKey, value: apiKey } = useField({ path: 'apiKey' }) - const { t } = useTranslation() - const [isWarningDismissed, setIsWarningDismissed] = useState(false) - - const generateKey = () => { - setApiKey(crypto.randomUUID()) - setIsWarningDismissed(false) - } - - return ( -
-

- {t('plugin-mcp:apiKeyDescription')} -

-
-
- {t('authentication:apiKey')} - {!apiKey && ( - - )} -
- {Boolean(apiKey) && ( -
- {!isWarningDismissed && ( -
- -

- {t('plugin-mcp:keepKeyPrivate')} - {` ${t('plugin-mcp:keyPrivateDescription')}`} -

- -
- )} - -
- )} -
-
- ) -} diff --git a/packages/plugin-mcp/src/components/APIKeyField/index.css b/packages/plugin-mcp/src/components/APIKeyField/index.css deleted file mode 100644 index f4525fd9bdc..00000000000 --- a/packages/plugin-mcp/src/components/APIKeyField/index.css +++ /dev/null @@ -1,105 +0,0 @@ -@layer payload-default { - /* Section wrapper: description + panel, closed off by a full-bleed divider - that spans the fields column past its horizontal gutter. */ - .mcp-api-key-field { - display: flex; - flex-direction: column; - gap: var(--base); - margin-inline: calc(-1 * var(--gutter-h)); - padding-inline: var(--gutter-h); - padding-block-end: var(--spacer-4); - border-block-end: var(--stroke-width-small) solid var(--color-border); - } - - .mcp-api-key-field__description { - margin: 0; - color: var(--color-text); - font-family: var(--text-body-medium-font-family); - font-size: var(--text-body-medium-font-size); - font-weight: var(--text-body-medium-font-weight); - line-height: var(--text-body-medium-line-height); - letter-spacing: var(--text-body-medium-letter-spacing); - } - - .mcp-api-key-field__panel { - overflow: hidden; - background: var(--color-bg); - border: var(--stroke-width-small) solid var(--color-border); - border-radius: var(--button-radius); - } - - .mcp-api-key-field__header { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--spacer-2); - min-height: var(--spacer-5); - padding: var(--spacer-2) var(--spacer-3); - background: var(--color-bg-secondary); - } - - /* Holds the warning + key row; its top border is the full-width divider - under the header. Only rendered once a key exists. */ - .mcp-api-key-field__body { - display: flex; - flex-direction: column; - gap: var(--spacer-2); - padding: var(--spacer-3); - border-block-start: var(--stroke-width-small) solid var(--color-border); - } - - .mcp-api-key-field__title { - color: var(--color-text); - font-family: var(--text-body-medium-strong-font-family); - font-size: var(--text-body-medium-strong-font-size); - font-weight: var(--text-body-medium-strong-font-weight); - line-height: var(--text-body-medium-strong-line-height); - } - - .mcp-api-key-field__generate { - margin: 0; - } - - /* Matches the core Banner's warning treatment: theme-adaptive warning-tertiary - bg with regular --color-text (NOT --color-text-onwarning, which is only - defined for light mode and reads as muddy dark-on-dark in dark mode). */ - .mcp-api-key-field__warning { - display: flex; - align-items: center; - gap: calc(var(--base) / 2); - padding: calc(var(--spacer-2) + (var(--spacer-1) / 2)) calc(var(--base) / 2); - background: var(--color-bg-warning-tertiary); - border: none; - border-radius: var(--radius-medium); - color: var(--color-text); - } - - .mcp-api-key-field__warning-icon { - flex-shrink: 0; - width: 15px; - height: 13px; - } - - .mcp-api-key-field__warning-text { - flex-grow: 1; - margin: 0; - font-family: var(--text-body-medium-font-family); - font-size: var(--text-body-medium-font-size); - line-height: var(--text-body-medium-line-height); - } - - .mcp-api-key-field__warning-text strong { - font-weight: var(--text-body-medium-strong-font-weight); - } - - .mcp-api-key-field__warning-dismiss { - appearance: none; - background: none; - border: none; - cursor: pointer; - color: inherit; - font-size: 1rem; - line-height: 1; - padding: 0; - } -} diff --git a/packages/plugin-mcp/src/components/APIKeysEmptyState/index.client.tsx b/packages/plugin-mcp/src/components/APIKeysEmptyState/index.client.tsx deleted file mode 100644 index a269dbd0433..00000000000 --- a/packages/plugin-mcp/src/components/APIKeysEmptyState/index.client.tsx +++ /dev/null @@ -1,36 +0,0 @@ -'use client' - -import type { NoResultsClientProps } from 'payload' - -import { Button, NoListResults, useTranslation } from '@payloadcms/ui' -import React from 'react' - -import type { - PluginMCPTranslationKeys, - PluginMCPTranslations, -} from '../../translations/index.js' - -export const APIKeysEmptyState: React.FC = ({ - hasCreatePermission, - newDocumentURL, - viewType, -}) => { - const { t } = useTranslation() - - return ( - - {t('authentication:generateNewAPIKey')} - , - ] - : [] - } - description={t('plugin-mcp:apiKeyDescription')} - title={t('plugin-mcp:noAPIKeys')} - withMargin - /> - ) -} diff --git a/packages/plugin-mcp/src/components/AccessField/index.client.tsx b/packages/plugin-mcp/src/components/AccessField/index.client.tsx deleted file mode 100644 index 702831caa02..00000000000 --- a/packages/plugin-mcp/src/components/AccessField/index.client.tsx +++ /dev/null @@ -1,299 +0,0 @@ -'use client' - -import type { JSONFieldClientProps } from 'payload' - -import { CheckboxInput, Collapsible, Tabs, useField, useTranslation } from '@payloadcms/ui' -import React, { useState } from 'react' - -import type { - PluginMCPTranslationKeys, - PluginMCPTranslations, -} from '../../translations/index.js' -import type { ClientMCPPluginConfig, MCPAPIKeysDocAccessTree } from '../../types.js' - -import './index.css' - -const baseClass = 'mcp-access-field' - -type ClientItem = ClientMCPPluginConfig['items'][number] -type ScopeKey = 'collections' | 'globals' -type FlatKey = 'prompts' | 'resources' | 'tools' -type TabKey = 'collections' | 'globals' | 'server' - -const LEAF_GROUP_KEYS = ['operations', 'auth', 'custom'] as const - -type LeafGroupKey = (typeof LEAF_GROUP_KEYS)[number] - -type Props = { - pluginConfig: ClientMCPPluginConfig -} & JSONFieldClientProps - -/** Drop a key from an object and return a new object — or `undefined` if it'd be empty. */ -const without = >( - obj: T | undefined, - key: string, -): T | undefined => { - if (!obj || !(key in obj)) { - return obj - } - const { [key]: _omitted, ...rest } = obj - return Object.keys(rest).length === 0 ? undefined : (rest as T) -} - -const setKey = >( - obj: T | undefined, - key: string, - value: unknown, -): T => ({ ...(obj ?? {}), [key]: value }) as T - -export const AccessField: React.FC = ({ path, pluginConfig }) => { - const { setValue, value } = useField({ path }) - const { t } = useTranslation() - const [activeTab, setActiveTab] = useState(null) - const access = value ?? {} - const leafGroupLabels: Record = { - auth: t('plugin-mcp:authentication'), - custom: t('general:custom'), - operations: t('plugin-mcp:operations'), - } - - const collectionsBySlug: Record = {} - const globalsBySlug: Record = {} - const prompts: ClientItem[] = [] - const resources: ClientItem[] = [] - const tools: ClientItem[] = [] - - for (const item of pluginConfig.items) { - switch (item.type) { - case 'collectionTool': - ;(collectionsBySlug[item.collectionSlug!] ??= []).push(item) - break - case 'globalTool': - ;(globalsBySlug[item.globalSlug!] ??= []).push(item) - break - case 'prompt': - prompts.push(item) - break - case 'resource': - resources.push(item) - break - case 'tool': - tools.push(item) - break - } - } - - const isScopedAllowed = (scope: ScopeKey, slug: string, configKey: string): boolean => - access[scope]?.[slug]?.[configKey] !== false - - const isFlatAllowed = (scope: FlatKey, configKey: string): boolean => - access[scope]?.[configKey] !== false - - const toggleScoped = (scope: ScopeKey, slug: string, configKey: string, allow: boolean) => { - if (allow) { - const slugBucket = without(access[scope]?.[slug], configKey) - const scopeBucket = slugBucket - ? setKey(access[scope], slug, slugBucket) - : without(access[scope], slug) - setValue(scopeBucket ? setKey(access, scope, scopeBucket) : (without(access, scope) ?? {})) - } else { - setValue( - setKey( - access, - scope, - setKey(access[scope], slug, setKey(access[scope]?.[slug], configKey, false)), - ), - ) - } - } - - const toggleFlat = (scope: FlatKey, configKey: string, allow: boolean) => { - if (allow) { - const bucket = without(access[scope], configKey) - setValue(bucket ? setKey(access, scope, bucket) : (without(access, scope) ?? {})) - } else { - setValue(setKey(access, scope, setKey(access[scope], configKey, false))) - } - } - - const setAllScoped = (scope: ScopeKey, slug: string, leaves: ClientItem[], allow: boolean) => { - if (allow) { - const scopeBucket = without(access[scope], slug) - setValue(scopeBucket ? setKey(access, scope, scopeBucket) : (without(access, scope) ?? {})) - } else { - const slugBucket = leaves.reduce>( - (acc, leaf) => ({ ...acc, [leaf.configKey]: false }), - {}, - ) - setValue(setKey(access, scope, setKey(access[scope], slug, slugBucket))) - } - } - - const setAllFlat = (scope: FlatKey, leaves: ClientItem[], allow: boolean) => { - if (allow) { - setValue(without(access, scope) ?? {}) - } else { - const bucket = leaves.reduce>( - (acc, leaf) => ({ ...acc, [leaf.configKey]: false }), - {}, - ) - setValue(setKey(access, scope, bucket)) - } - } - - const renderLeaf = ( - leaf: ClientItem, - id: string, - checked: boolean, - onToggle: (allow: boolean) => void, - ) => ( -
  • - onToggle(e.target.checked)} - /> - {leaf.description &&

    {leaf.description}

    } -
  • - ) - - const renderCard = ({ - id, - isLeafAllowed, - label, - leaves, - onSetAll, - onToggleLeaf, - }: { - id: string - isLeafAllowed: (leaf: ClientItem) => boolean - label: string - leaves: ClientItem[] - onSetAll: (allow: boolean) => void - onToggleLeaf: (leaf: ClientItem, allow: boolean) => void - }) => { - const allowedCount = leaves.filter(isLeafAllowed).length - const groups = LEAF_GROUP_KEYS.map((key) => ({ - key, - label: leafGroupLabels[key], - leaves: leaves.filter((leaf) => (leaf.group ?? 'custom') === key), - })).filter((group) => group.leaves.length > 0) - const hasGroupLabels = groups.length > 1 - - return ( - e.stopPropagation()} - role="presentation" - > - onSetAll(allowedCount < leaves.length)} - partialChecked={allowedCount > 0 && allowedCount < leaves.length} - /> - - } - initCollapsed - key={id} - > -
    - {groups.map((group) => ( -
    - {hasGroupLabels &&

    {group.label}

    } -
      - {group.leaves.map((leaf) => - renderLeaf(leaf, `${id}.${leaf.configKey}`, isLeafAllowed(leaf), (allow) => - onToggleLeaf(leaf, allow), - ), - )} -
    -
    - ))} -
    -
    - ) - } - - const renderScope = (scope: ScopeKey, bySlug: Record) => - Object.entries(bySlug).map(([slug, leaves]) => - renderCard({ - id: `${path}.${scope}.${slug}`, - isLeafAllowed: (leaf) => isScopedAllowed(scope, slug, leaf.configKey), - label: titleCase(slug), - leaves, - onSetAll: (allow) => setAllScoped(scope, slug, leaves, allow), - onToggleLeaf: (leaf, allow) => toggleScoped(scope, slug, leaf.configKey, allow), - }), - ) - - const renderFlat = (scope: FlatKey, label: string, leaves: ClientItem[]) => - leaves.length > 0 && - renderCard({ - id: `${path}.${scope}`, - isLeafAllowed: (leaf) => isFlatAllowed(scope, leaf.configKey), - label, - leaves, - onSetAll: (allow) => setAllFlat(scope, leaves, allow), - onToggleLeaf: (leaf, allow) => toggleFlat(scope, leaf.configKey, allow), - }) - - const tabs: Array<{ key: TabKey; label: string }> = [ - ...(Object.keys(collectionsBySlug).length > 0 - ? [{ key: 'collections' as const, label: t('general:collections') }] - : []), - ...(Object.keys(globalsBySlug).length > 0 - ? [{ key: 'globals' as const, label: t('general:globals') }] - : []), - ...(prompts.length > 0 || resources.length > 0 || tools.length > 0 - ? [{ key: 'server' as const, label: t('plugin-mcp:server') }] - : []), - ] - if (tabs.length === 0) { - return null - } - - const currentTab = activeTab ?? tabs[0]!.key - - return ( -
    -
    -

    {t('plugin-mcp:permissions')}

    -

    {t('plugin-mcp:permissionsDescription')}

    -
    -
    - ({ - label: tab.label, - value: tab.key, - }))} - value={currentTab} - /> -
    - {currentTab === 'collections' && renderScope('collections', collectionsBySlug)} - {currentTab === 'globals' && renderScope('globals', globalsBySlug)} - {currentTab === 'server' && ( - <> - {renderFlat('prompts', t('plugin-mcp:prompts'), prompts)} - {renderFlat('resources', t('plugin-mcp:resources'), resources)} - {renderFlat('tools', t('plugin-mcp:tools'), tools)} - - )} -
    -
    -
    - ) -} - -const titleCase = (slug: string): string => - slug.replace(/(^|[-_])(.)/g, (_, sep: string, ch: string) => - sep ? ` ${ch.toUpperCase()}` : ch.toUpperCase(), - ) diff --git a/packages/plugin-mcp/src/components/AccessField/index.css b/packages/plugin-mcp/src/components/AccessField/index.css deleted file mode 100644 index 4fe08dec483..00000000000 --- a/packages/plugin-mcp/src/components/AccessField/index.css +++ /dev/null @@ -1,99 +0,0 @@ -@layer payload-default { - .mcp-access-field { - display: flex; - flex-direction: column; - gap: var(--base); - /* Breathing room below the API-key section's divider - the fields - container itself adds no gap between these two fields. */ - padding-block-start: var(--spacer-4); - /* This custom field renders straight into `render-fields` (no `.field-type` - wrapper), so it must carry the standard inter-field margin itself - - otherwise the next field (e.g. an overrideApiKeyCollection field) butts - against the last card. */ - margin-block-end: var(--spacer-3); - } - - .mcp-access-field__header { - display: flex; - flex-direction: column; - } - - .mcp-access-field__header h4 { - margin: 0; - color: var(--color-text); - font-family: var(--text-heading-small-font-family); - font-size: var(--text-heading-small-font-size); - font-weight: var(--text-heading-small-font-weight); - line-height: var(--text-heading-small-line-height); - letter-spacing: var(--text-heading-small-letter-spacing); - } - - .mcp-access-field__header p { - margin: 0; - color: var(--color-text-secondary); - font-family: var(--text-body-medium-font-family); - font-size: var(--text-body-medium-font-size); - font-weight: var(--text-body-medium-font-weight); - line-height: var(--text-body-medium-line-height); - letter-spacing: var(--text-body-medium-letter-spacing); - } - - .mcp-access-field__tabbed-content { - display: flex; - flex-direction: column; - } - - .mcp-access-field__cards { - display: flex; - flex-direction: column; - gap: calc(var(--base) / 2); - } - - /* The collapsible header is pointer-events: none so clicks reach the toggle - overlay; re-enable events on the checkbox and lift it above the toggle. */ - .mcp-access-field__card-checkbox { - position: relative; - z-index: 1; - display: inline-flex; - pointer-events: auto; - } - - .mcp-access-field__leaf-group { - padding-block: calc(var(--base) / 2); - border-block-end: 1px solid var(--theme-elevation-100); - } - - .mcp-access-field__leaf-group:first-child { - padding-block-start: 0; - } - - .mcp-access-field__leaf-group:last-child { - border-block-end: none; - padding-block-end: 0; - } - - .mcp-access-field__leaf-group-label { - margin: 0 0 calc(var(--base) / 2); - color: var(--color-text-secondary); - font-family: var(--text-body-medium-font-family); - font-size: var(--text-body-medium-font-size); - line-height: var(--text-body-medium-line-height); - } - - .mcp-access-field__list { - list-style: none; - margin: 0; - padding: 0; - display: flex; - flex-direction: column; - gap: calc(var(--base) / 2); - } - - .mcp-access-field__leaf-description { - margin: calc(var(--base) / 6) 0 0; - color: var(--color-text-secondary); - font-family: var(--text-body-medium-font-family); - font-size: var(--text-body-medium-font-size); - line-height: var(--text-body-medium-line-height); - } -} diff --git a/packages/plugin-mcp/src/components/SettingsMenu/index.client.tsx b/packages/plugin-mcp/src/components/SettingsMenu/index.client.tsx deleted file mode 100644 index 4999398defb..00000000000 --- a/packages/plugin-mcp/src/components/SettingsMenu/index.client.tsx +++ /dev/null @@ -1,34 +0,0 @@ -'use client' - -import { PopupList, useConfig, useTranslation } from '@payloadcms/ui' -import { formatAdminURL } from 'payload/shared' -import React from 'react' - -import type { - PluginMCPTranslationKeys, - PluginMCPTranslations, -} from '../../translations/index.js' - -/** - * Entry in the user menu's Settings sub-popup linking to the API keys - * collection. The collection is excluded from the main nav - * (`admin.group: false`) and managed from here instead. - */ -export const MCPSettingsMenu: React.FC = () => { - const { config } = useConfig() - const { t } = useTranslation() - - return ( - - - - {t('plugin-mcp:manageAPIKeys')} - - - ) -} diff --git a/packages/plugin-mcp/src/endpoint/access.ts b/packages/plugin-mcp/src/endpoint/access.ts index 9278c15128d..3c4dfa5d69b 100644 --- a/packages/plugin-mcp/src/endpoint/access.ts +++ b/packages/plugin-mcp/src/endpoint/access.ts @@ -1,144 +1,194 @@ -import type { DefaultDocumentIDType, PayloadRequest, TypedUser } from 'payload' +import type { PayloadRequest, SanitizedPermissions, TypedUser } from 'payload' -import crypto from 'crypto' -import { UnauthorizedError } from 'payload' +import { getAccessResults, UnauthorizedError } from 'payload' -import type { AuthorizedMCP, MCPAPIKeysDoc } from '../types.js' +import type { AuthorizedMCP } from '../types.js' +import { + COLLECTION_BUILTINS, + GLOBAL_BUILTINS, + type MCPCollectionBuiltinName, + type MCPGlobalBuiltinName, +} from '../mcp/builtinTools.js' import { getLogger } from '../utils/getLogger.js' import { getPluginConfig } from '../utils/getPluginConfig.js' /** - * Resolves the API key (or dev-mode session) and returns the items the caller - * may use. Denied items are dropped from the array. + * Resolves the MCP caller and returns the MCP surface authorized for that request. + * + * Authorization has two layers: + * 1. Payload collection/global permissions determine whether built-in operation tools are shown. + * 2. MCP `access` callbacks can further hide any configured tool, prompt, or resource. */ -export const getAuthorizedMCP: (args: { req: PayloadRequest }) => Promise = async ({ - req, -}) => { +export const getAuthorizedMCP: (args: { + req: PayloadRequest + skipAuth?: boolean +}) => Promise = async ({ req, skipAuth = false }) => { const logger = getLogger({ payload: req.payload }) const pluginConfig = getPluginConfig({ config: req.payload.config }) - const authHeader = req.headers.get('Authorization') - const hasBearerToken = authHeader?.startsWith('Bearer ') - - const buildAuthorized = (apiKeyDoc: MCPAPIKeysDoc): AuthorizedMCP => ({ - items: pluginConfig.items.filter((item) => { - switch (item.type) { - case 'collectionTool': - return apiKeyDoc.access.collections?.[item.collectionSlug]?.[item.configKey] !== false - case 'globalTool': - return apiKeyDoc.access.globals?.[item.globalSlug]?.[item.configKey] !== false - case 'prompt': - return apiKeyDoc.access.prompts?.[item.configKey] !== false - case 'resource': - return apiKeyDoc.access.resources?.[item.configKey] !== false - case 'tool': - return apiKeyDoc.access.tools?.[item.configKey] !== false - } - }), - overrideAccess: - typeof apiKeyDoc.overrideAccess === 'boolean' ? apiKeyDoc.overrideAccess : false, - user: apiKeyDoc.user, + const getAuthorizedMCPForUser = ({ + overrideAccess = false, + user, + }: { + overrideAccess?: boolean + user: null | TypedUser + }): AuthorizedMCP => ({ + items: pluginConfig.items, + overrideAccess, + user, }) + if (skipAuth) { + return await filterAuthorizedMCPItems({ + authorizedMCP: getAuthorizedMCPForUser({ + overrideAccess: true, + user: req.user ?? null, + }), + req, + }) + } + if (pluginConfig.overrideAuth) { - return await pluginConfig.overrideAuth({ - getAPIKeyDoc: (overrideApiKey) => getAPIKeyDoc({ logger, overrideApiKey, pluginConfig, req }), - getAuthorizedMCP: ({ apiKeyDoc }) => buildAuthorized(apiKeyDoc), - pluginConfig, + return await filterAuthorizedMCPItems({ + authorizedMCP: await pluginConfig.overrideAuth({ + getAPIKeyUser: (overrideApiKey) => + getAPIKeyUser({ overrideApiKey, pluginConfig, req }), + getAuthorizedMCP: getAuthorizedMCPForUser, + pluginConfig, + req, + }), req, }) } - if (process.env.NODE_ENV === 'development' && !hasBearerToken) { + if (process.env.NODE_ENV === 'development' && !req.headers.get('Authorization')) { logger.info('Dev mode: skipping API key check, using session user') - return buildAuthorized({ - id: -1, - access: {}, - overrideAccess: true, - user: req.user ?? null, + return await filterAuthorizedMCPItems({ + authorizedMCP: getAuthorizedMCPForUser({ + overrideAccess: true, + user: req.user ?? null, + }), + req, }) } - return buildAuthorized(await getAPIKeyDoc({ logger, pluginConfig, req })) + return await filterAuthorizedMCPItems({ + authorizedMCP: getAuthorizedMCPForUser({ user: await getAPIKeyUser({ pluginConfig, req }) }), + req, + }) } -const getAPIKeyDoc = async ({ - logger, +const getAPIKeyUser = async ({ overrideApiKey, pluginConfig, req, }: { - logger: ReturnType overrideApiKey?: string pluginConfig: ReturnType req: PayloadRequest -}): Promise => { - const authHeader = req.headers.get('Authorization') - const hasBearerToken = authHeader?.startsWith('Bearer ') - - const apiKey = - overrideApiKey ?? (hasBearerToken ? authHeader?.replace('Bearer ', '').trim() || null : null) - - if (!apiKey) { - throw new UnauthorizedError() +}): Promise => { + const headers = new Headers(req.headers) + if (overrideApiKey) { + headers.set('Authorization', `${pluginConfig.userCollection} API-Key ${overrideApiKey}`) } - const sha256APIKeyIndex = crypto - .createHmac('sha256', req.payload.secret) - .update(apiKey) - .digest('hex') - - const doc = await req.payload.db.findOne({ - collection: 'payload-mcp-api-keys', - req, - where: { - apiKeyIndex: { equals: sha256APIKeyIndex }, - }, - }) + const user = overrideApiKey + ? (await req.payload.auth({ headers })).user + : req.user - if (!doc || !doc.user) { + if (user?._strategy !== 'api-key' || user.collection !== pluginConfig.userCollection) { throw new UnauthorizedError() } - logger.info('API Key is valid') + return user +} - const userRef = doc.user - const userID = - typeof userRef === 'object' && userRef !== null && 'id' in userRef - ? userRef.id - : (userRef as unknown as DefaultDocumentIDType) +const filterAuthorizedMCPItems = async ({ + authorizedMCP, + req, +}: { + authorizedMCP: AuthorizedMCP + req: PayloadRequest +}): Promise => { + const items: AuthorizedMCP['items'] = [] + // Layer 1: use Payload access results to hide built-in collection/global + // operation tools the caller cannot run. `overrideAccess` skips this layer. + const permissions = authorizedMCP.overrideAccess + ? null + : await getAccessResults({ req: { ...req, user: authorizedMCP.user } }) + + for (const item of authorizedMCP.items) { + if (item.type === 'collectionTool') { + // Built-in collection tools map to Payload collection operations. + // Custom collection tools have no operation gate here. + const operation = + COLLECTION_BUILTINS[item.configKey as MCPCollectionBuiltinName]?.accessOperation + + if ( + operation && + permissions && + !permissions.collections?.[item.collectionSlug]?.[operation] + ) { + continue + } - const user = (await req.payload.findByID({ - id: userID, - collection: pluginConfig.userCollection, - depth: 0, - disableErrors: true, - req, - })) as null | TypedUser + // Layer 2: per-tool access callbacks can further hide the item. + if ( + item.tool.access && + !(await item.tool.access({ + authorizedMCP, + collectionSlug: item.collectionSlug, + req, + })) + ) { + continue + } + items.push(item) + continue + } - if (!user) { - throw new UnauthorizedError() - } + if (item.type === 'globalTool') { + // Built-in global tools map to Payload global operations. + // Custom global tools have no operation gate here. + const operation = GLOBAL_BUILTINS[item.configKey as MCPGlobalBuiltinName]?.accessOperation - try { - await req.payload.db.updateOne({ - id: doc.id, - collection: 'payload-mcp-api-keys', - data: { lastUsed: new Date().toISOString() }, - req, - returning: false, - }) - } catch (err) { - logger.warn({ err, msg: 'Failed to update MCP API key last-used timestamp' }) + if (operation && permissions && !permissions.globals?.[item.globalSlug]?.[operation]) { + continue + } + + // Layer 2: per-tool access callbacks can further hide the item. + if ( + item.tool.access && + !(await item.tool.access({ + authorizedMCP, + globalSlug: item.globalSlug, + req, + })) + ) { + continue + } + items.push(item) + continue + } + + const access = + item.type === 'prompt' + ? item.prompt.access + : item.type === 'resource' + ? item.resource.access + : item.tool.access + + // Prompts, resources, and top-level tools only have the MCP access-callback layer. + if (access && !(await access({ authorizedMCP, req }))) { + continue + } + + items.push(item) } return { - ...doc, - user: { - ...user, - _strategy: 'mcp-api-key' as const, - collection: pluginConfig.userCollection, - }, + ...authorizedMCP, + items, } } diff --git a/packages/plugin-mcp/src/exports/client.ts b/packages/plugin-mcp/src/exports/client.ts index f2c618be7bd..8f12a1f31b6 100644 --- a/packages/plugin-mcp/src/exports/client.ts +++ b/packages/plugin-mcp/src/exports/client.ts @@ -1,5 +1,3 @@ 'use client' -export { AccessField } from '../components/AccessField/index.client.js' -export { APIKeyField } from '../components/APIKeyField/index.client.js' -export { APIKeysEmptyState } from '../components/APIKeysEmptyState/index.client.js' -export { MCPSettingsMenu } from '../components/SettingsMenu/index.client.js' + +export {} diff --git a/packages/plugin-mcp/src/index.ts b/packages/plugin-mcp/src/index.ts index c10ca66fc8b..362354abc7e 100644 --- a/packages/plugin-mcp/src/index.ts +++ b/packages/plugin-mcp/src/index.ts @@ -1,14 +1,9 @@ -import type { AcceptedLanguages } from '@payloadcms/translations' - import { defaultUserCollection, definePlugin } from 'payload' -import type { PluginDefaultTranslationsObject } from './translations/types.js' import type { AuthorizedMCP, MCPPluginConfig, SanitizedMCPPluginConfig } from './types.js' -import { getAPIKeysCollection } from './collection/index.js' import { mcpEndpoint } from './endpoint/index.js' import { sanitizeMCPConfig } from './mcp/sanitizeMCPConfig.js' -import { translations } from './translations/index.js' declare module 'payload' { export interface PayloadRequest { @@ -29,8 +24,8 @@ export const mcpPlugin = definePlugin({ order: 10, plugin: ({ config, plugins, ...rawConfig }) => { // If a project has no auth collection yet, add the default users collection - // so the relationship target and default `userCollection` exist. - if (!config.admin?.user) { + // so the default `userCollection` exists for API-key authentication. + if (!rawConfig.disabled && !config.admin?.user) { const firstCollectionWithAuth = (config.collections ?? []).find(({ auth }) => Boolean(auth)) if (!firstCollectionWithAuth) { ;(config.collections ??= []).push(defaultUserCollection) @@ -46,52 +41,12 @@ export const mcpPlugin = definePlugin({ registered.sanitizedOptions = pluginConfig as unknown as typeof registered.options } - ;(config.collections ??= []).push(getAPIKeysCollection({ pluginConfig })) - - if (!config.i18n) { - config.i18n = {} - } - - if (!config.i18n.translations) { - config.i18n.translations = {} - } - - const supportedLanguageKeys = config.i18n.supportedLanguages - ? Object.keys(config.i18n.supportedLanguages) - : ['en'] - - for (const lang of supportedLanguageKeys) { - const pluginEntry = translations[lang as keyof typeof translations] - if (!pluginEntry) { - continue - } - - const typedLocale = lang as AcceptedLanguages - const existing = (config.i18n.translations[typedLocale] ?? {}) as Record - config.i18n.translations[typedLocale] = { - ...existing, - 'plugin-mcp': pluginEntry.translations['plugin-mcp'], - } as PluginDefaultTranslationsObject - } - - // Keep the API-keys collection registered even when disabled, so DB schema - // and generated types don't drift between enabled/disabled environments. if (pluginConfig.disabled) { return config } return { ...config, - admin: { - ...config.admin, - components: { - ...config.admin?.components, - userMenuSettingsItems: [ - ...(config.admin?.components?.userMenuSettingsItems ?? []), - '@payloadcms/plugin-mcp/client#MCPSettingsMenu', - ], - }, - }, endpoints: [ ...(config.endpoints ?? []), // Payload prefixes /api, so the full path is /api/mcp. diff --git a/packages/plugin-mcp/src/mcp/buildMcpServer.ts b/packages/plugin-mcp/src/mcp/buildMcpServer.ts index 587ceae48cd..d0279a46ad9 100644 --- a/packages/plugin-mcp/src/mcp/buildMcpServer.ts +++ b/packages/plugin-mcp/src/mcp/buildMcpServer.ts @@ -109,7 +109,12 @@ export const buildMcpServer = ({ } } - const handlerArgs = { authorizedMCP, input: toolInput, req, serverContext } + const handlerArgs = { + authorizedMCP, + input: toolInput, + req, + serverContext, + } const response = await (match.type === 'collectionTool' ? match.tool.handler({ ...handlerArgs, collectionSlug: slug }) : match.tool.handler({ ...handlerArgs, globalSlug: slug })) diff --git a/packages/plugin-mcp/src/mcp/builtinTools.ts b/packages/plugin-mcp/src/mcp/builtinTools.ts index 1751640f0c2..300528457ba 100644 --- a/packages/plugin-mcp/src/mcp/builtinTools.ts +++ b/packages/plugin-mcp/src/mcp/builtinTools.ts @@ -28,12 +28,29 @@ export const TOOL_BUILTINS = { * automatically. */ export const COLLECTION_BUILTINS = { - create: { mcpName: 'createDocument', tool: createDocumentTool }, - delete: { mcpName: 'deleteDocuments', tool: deleteDocumentsTool }, - find: { mcpName: 'findDocuments', tool: findDocumentsTool }, - getCollectionSchema: { mcpName: 'getCollectionSchema', tool: getCollectionSchemaTool }, - update: { mcpName: 'updateDocument', tool: updateDocumentTool }, -} satisfies Record + create: { accessOperation: 'create', mcpName: 'createDocument', tool: createDocumentTool }, + delete: { accessOperation: 'delete', mcpName: 'deleteDocuments', tool: deleteDocumentsTool }, + find: { accessOperation: 'read', mcpName: 'findDocuments', tool: findDocumentsTool }, + getCollectionSchema: { + accessOperation: 'read', + mcpName: 'getCollectionSchema', + tool: getCollectionSchemaTool, + }, + update: { accessOperation: 'update', mcpName: 'updateDocument', tool: updateDocumentTool }, +} satisfies Record< + string, + { + /** + * What payload access operation this maps to. Used for determining + * whether to show this tool or not based on payload access results, + * smilar to how the UI determines whether to show a collection + * in the sidebar + */ + accessOperation: 'create' | 'delete' | 'read' | 'update' + mcpName: string + tool: CollectionTool + } +> /** * The static auth tools surfaced under auth-enabled collections. Each entry @@ -62,10 +79,17 @@ export const COLLECTION_AUTH_BUILTINS = { * `MCPGlobalBuiltinName`. */ export const GLOBAL_BUILTINS = { - find: { mcpName: 'findGlobal', tool: findGlobalTool }, - getGlobalSchema: { mcpName: 'getGlobalSchema', tool: getGlobalSchemaTool }, - update: { mcpName: 'updateGlobal', tool: updateGlobalTool }, -} satisfies Record + find: { accessOperation: 'read', mcpName: 'findGlobal', tool: findGlobalTool }, + getGlobalSchema: { + accessOperation: 'read', + mcpName: 'getGlobalSchema', + tool: getGlobalSchemaTool, + }, + update: { accessOperation: 'update', mcpName: 'updateGlobal', tool: updateGlobalTool }, +} satisfies Record< + string, + { accessOperation: 'read' | 'update'; mcpName: string; tool: GlobalTool } +> export type MCPCollectionBuiltinName = keyof typeof COLLECTION_BUILTINS diff --git a/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts b/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts index 6d302ba9235..4b6ec5fa121 100644 --- a/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts +++ b/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts @@ -99,13 +99,12 @@ export const sanitizeMCPConfig = ({ } // Mirror Payload's own admin.user detection (sanitize.ts) since plugins run first. - const firstCollectionWithAuth = config.collections!.find(({ auth }) => Boolean(auth)) + const firstCollectionWithAuth = config.collections?.find(({ auth }) => Boolean(auth)) return { disabled: pluginConfig.disabled, items, mcp: pluginConfig.mcp, - overrideApiKeyCollection: pluginConfig.overrideApiKeyCollection, overrideAuth: pluginConfig.overrideAuth, userCollection: pluginConfig.userCollection ?? config.admin?.user ?? firstCollectionWithAuth?.slug ?? 'users', @@ -119,9 +118,6 @@ const sanitizeCollectionConfig = ({ collection: CollectionConfig | SanitizedCollectionConfig pluginConfig: MCPPluginConfig }): CollectionMCPItem[] => { - if (collection.slug === 'payload-mcp-api-keys') { - return [] - } const slug = collection.slug const collectionPluginConfig = pluginConfig.collections?.[slug] const items: CollectionMCPItem[] = [] @@ -140,6 +136,7 @@ const sanitizeCollectionConfig = ({ mcpName, tool: { ...tool, + access: override?.access, description: override?.description ?? tool.description, overrideResponse: override?.overrideResponse ?? @@ -165,6 +162,7 @@ const sanitizeCollectionConfig = ({ mcpName, tool: { ...tool, + access: override?.access, description: override?.description ?? tool.description, overrideResponse: override?.overrideResponse ?? @@ -225,6 +223,7 @@ const sanitizeGlobalConfig = ({ mcpName, tool: { ...tool, + access: override?.access, description: override?.description ?? tool.description, overrideResponse: override?.overrideResponse ?? diff --git a/packages/plugin-mcp/src/stdio.ts b/packages/plugin-mcp/src/stdio.ts index 487633bfa9a..216b8ebef5f 100644 --- a/packages/plugin-mcp/src/stdio.ts +++ b/packages/plugin-mcp/src/stdio.ts @@ -6,8 +6,9 @@ import { fileURLToPath, pathToFileURL } from 'node:url' import { createLocalReq, getPayload } from 'payload' import { findConfig } from 'payload/node' -import type { AuthorizedMCP, SanitizedMCPPluginConfig } from './types.js' +import type { SanitizedMCPPluginConfig } from './types.js' +import { getAuthorizedMCP } from './endpoint/access.js' import { buildMcpServer } from './mcp/buildMcpServer.js' import { sanitizeMCPConfig } from './mcp/sanitizeMCPConfig.js' import { getPluginConfig } from './utils/getPluginConfig.js' @@ -62,14 +63,9 @@ export const runMcpStdio = async (): Promise => { ;(payload.config.plugins ??= []).push(fakePluginFn) } - const authorizedMCP: AuthorizedMCP = { - items: pluginConfig.items, - overrideAccess: true, - user: null, - } - const req = await createLocalReq({}, payload) req.payloadAPI = 'MCP' as const + const authorizedMCP = await getAuthorizedMCP({ req, skipAuth: true }) const server = buildMcpServer({ authorizedMCP, pluginConfig, req }) diff --git a/packages/plugin-mcp/src/translations/index.ts b/packages/plugin-mcp/src/translations/index.ts deleted file mode 100644 index 86ae49d04c0..00000000000 --- a/packages/plugin-mcp/src/translations/index.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { - NestedKeysStripped, - SupportedLanguages, -} from '@payloadcms/translations' - -import type { PluginDefaultTranslationsObject } from './types.js' - -import { ar } from './languages/ar.js' -import { az } from './languages/az.js' -import { bg } from './languages/bg.js' -import { bnBd } from './languages/bnBd.js' -import { bnIn } from './languages/bnIn.js' -import { ca } from './languages/ca.js' -import { cs } from './languages/cs.js' -import { da } from './languages/da.js' -import { de } from './languages/de.js' -import { en } from './languages/en.js' -import { es } from './languages/es.js' -import { et } from './languages/et.js' -import { fa } from './languages/fa.js' -import { fr } from './languages/fr.js' -import { he } from './languages/he.js' -import { hr } from './languages/hr.js' -import { hu } from './languages/hu.js' -import { hy } from './languages/hy.js' -import { id } from './languages/id.js' -import { is } from './languages/is.js' -import { it } from './languages/it.js' -import { ja } from './languages/ja.js' -import { ko } from './languages/ko.js' -import { lt } from './languages/lt.js' -import { lv } from './languages/lv.js' -import { my } from './languages/my.js' -import { nb } from './languages/nb.js' -import { nl } from './languages/nl.js' -import { pl } from './languages/pl.js' -import { pt } from './languages/pt.js' -import { ro } from './languages/ro.js' -import { rs } from './languages/rs.js' -import { rsLatin } from './languages/rsLatin.js' -import { ru } from './languages/ru.js' -import { sk } from './languages/sk.js' -import { sl } from './languages/sl.js' -import { sv } from './languages/sv.js' -import { ta } from './languages/ta.js' -import { th } from './languages/th.js' -import { tr } from './languages/tr.js' -import { uk } from './languages/uk.js' -import { vi } from './languages/vi.js' -import { zh } from './languages/zh.js' -import { zhTw } from './languages/zhTw.js' - -export const translations = { - id, - ar, - az, - bg, - 'bn-BD': bnBd, - 'bn-IN': bnIn, - ca, - cs, - da, - de, - en, - es, - et, - fa, - fr, - he, - hr, - hu, - hy, - is, - it, - ja, - ko, - lt, - lv, - my, - nb, - nl, - pl, - pt, - ro, - rs, - 'rs-latin': rsLatin, - ru, - sk, - sl, - sv, - ta, - th, - tr, - uk, - vi, - zh, - 'zh-TW': zhTw, -} as SupportedLanguages - -export type PluginMCPTranslations = PluginDefaultTranslationsObject - -export type PluginMCPTranslationKeys = NestedKeysStripped - -declare module '@payloadcms/translations' { - interface CustomTranslationKeys { - 'plugin-mcp': PluginMCPTranslationKeys - } -} diff --git a/packages/plugin-mcp/src/translations/languages/ar.ts b/packages/plugin-mcp/src/translations/languages/ar.ts deleted file mode 100644 index 03fc0124f61..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ar.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const arTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'تتحكم مفاتيح API في المجموعات والموارد والأدوات والمطالبات التي يمكن لعملاء MCP الوصول إليها.', - apiKeys: 'مفاتيح API', - authentication: 'المصادقة', - description: 'الوصف', - descriptionDescription: 'صف الغرض من مفتاح API.', - dismiss: 'إغلاق', - keepKeyPrivate: 'حافظ على سرية مفتاحك.', - keyPrivateDescription: 'هذا المفتاح يمنح MCP إمكانية الوصول إلى محتواك. لا تشاركه مع الآخرين!', - lastUsed: 'آخر استخدام', - manageAPIKeys: 'إدارة مفاتيح API', - mcp: 'MCP', - noAPIKeys: 'لا توجد مفاتيح API', - operations: 'العمليات', - overrideAccess: 'تجاوز التحكم في الوصول', - overrideAccessDescription: 'عند تفعيله، يتجاوز هذا المفتاح تحكم Payload في الوصول لكل عملية ينفذها. اتركه غير مفعل ما لم يكن لديك سبب محدد.', - permissions: 'الأذونات', - permissionsDescription: 'اسمح لعملاء MCP بالوصول إلى المجموعات والأدوات والموارد والمطالبات التالية.', - prompts: 'المطالبات', - resources: 'الموارد', - server: 'الخادم', - title: 'العنوان', - titleDescription: 'اسم مستعار مفيد لمفتاح API.', - tools: 'الأدوات', - userDescription: 'المستخدم الذي سيعمل MCP بصفته.', - }, -} - -export const ar: PluginLanguage = { - dateFNSKey: 'ar', - translations: arTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/az.ts b/packages/plugin-mcp/src/translations/languages/az.ts deleted file mode 100644 index 08803e6cd54..00000000000 --- a/packages/plugin-mcp/src/translations/languages/az.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const azTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API açarları MCP müştərilərinin hansı kolleksiyalara, resurslara, alətlərə və promptlara daxil ola biləcəyini idarə edir.', - apiKeys: 'API açarları', - authentication: 'Autentifikasiya', - description: 'Təsvir', - descriptionDescription: 'API açarının məqsədini təsvir edin.', - dismiss: 'Bağla', - keepKeyPrivate: 'Açarınızı məxfi saxlayın.', - keyPrivateDescription: 'Bu açar MCP-yə məzmununuza giriş verir. Onu başqaları ilə paylaşmayın!', - lastUsed: 'Son istifadə', - manageAPIKeys: 'API açarlarını idarə et', - mcp: 'MCP', - noAPIKeys: 'API açarı yoxdur', - operations: 'Əməliyyatlar', - overrideAccess: 'Giriş nəzarətini keç', - overrideAccessDescription: 'İşarələndikdə bu açar icra etdiyi hər əməliyyatda Payload giriş qaydalarını keçir. Xüsusi səbəbiniz yoxdursa işarələməyin.', - permissions: 'İcazələr', - permissionsDescription: 'MCP müştərilərinə aşağıdakı kolleksiyalara, alətlərə, resurslara və promptlara giriş icazəsi verin.', - prompts: 'Promptlar', - resources: 'Resurslar', - server: 'Server', - title: 'Başlıq', - titleDescription: 'API açarı üçün faydalı qısa ad.', - tools: 'Alətlər', - userDescription: 'MCP-nin adından işləyəcəyi istifadəçi.', - }, -} - -export const az: PluginLanguage = { - dateFNSKey: 'az', - translations: azTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/bg.ts b/packages/plugin-mcp/src/translations/languages/bg.ts deleted file mode 100644 index e8bed5af444..00000000000 --- a/packages/plugin-mcp/src/translations/languages/bg.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const bgTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API ключовете контролират до кои колекции, ресурси, инструменти и подкани имат достъп MCP клиентите.', - apiKeys: 'API ключове', - authentication: 'Удостоверяване', - description: 'Описание', - descriptionDescription: 'Опишете предназначението на API ключа.', - dismiss: 'Затвори', - keepKeyPrivate: 'Пазете ключа си поверителен.', - keyPrivateDescription: 'Този ключ дава на MCP достъп до съдържанието ви. Не го споделяйте с други!', - lastUsed: 'Последно използван', - manageAPIKeys: 'Управление на API ключове', - mcp: 'MCP', - noAPIKeys: 'Няма API ключове', - operations: 'Операции', - overrideAccess: 'Заобикаляне на контрола за достъп', - overrideAccessDescription: 'Когато е отметнато, този ключ заобикаля контрола за достъп на Payload при всяка операция. Оставете изключено, освен ако нямате конкретна причина.', - permissions: 'Разрешения', - permissionsDescription: 'Разрешете на MCP клиентите достъп до следните колекции, инструменти, ресурси и подкани.', - prompts: 'Подкани', - resources: 'Ресурси', - server: 'Сървър', - title: 'Заглавие', - titleDescription: 'Полезно име за API ключа.', - tools: 'Инструменти', - userDescription: 'Потребителят, от чието име ще действа MCP.', - }, -} - -export const bg: PluginLanguage = { - dateFNSKey: 'bg', - translations: bgTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/bnBd.ts b/packages/plugin-mcp/src/translations/languages/bnBd.ts deleted file mode 100644 index 4e861771929..00000000000 --- a/packages/plugin-mcp/src/translations/languages/bnBd.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const bnBdTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API কী নির্ধারণ করে MCP ক্লায়েন্ট কোন সংগ্রহ, রিসোর্স, টুল এবং প্রম্পটে প্রবেশ করতে পারবে।', - apiKeys: 'API কীসমূহ', - authentication: 'প্রমাণীকরণ', - description: 'বিবরণ', - descriptionDescription: 'API কী-এর উদ্দেশ্য লিখুন।', - dismiss: 'বন্ধ করুন', - keepKeyPrivate: 'আপনার কী ব্যক্তিগত রাখুন।', - keyPrivateDescription: 'এই কী MCP-কে আপনার কনটেন্টে প্রবেশাধিকার দেয়। এটি অন্যদের সাথে শেয়ার করবেন না!', - lastUsed: 'সর্বশেষ ব্যবহৃত', - manageAPIKeys: 'API কী পরিচালনা করুন', - mcp: 'MCP', - noAPIKeys: 'কোনো API কী নেই', - operations: 'অপারেশনসমূহ', - overrideAccess: 'অ্যাক্সেস নিয়ন্ত্রণ অগ্রাহ্য করুন', - overrideAccessDescription: 'চালু থাকলে, এই কী প্রতিটি অপারেশনে Payload অ্যাক্সেস নিয়ম অগ্রাহ্য করবে। নির্দিষ্ট কারণ না থাকলে বন্ধ রাখুন।', - permissions: 'অনুমতিসমূহ', - permissionsDescription: 'MCP ক্লায়েন্টকে নিচের সংগ্রহ, টুল, রিসোর্স এবং প্রম্পটে প্রবেশের অনুমতি দিন।', - prompts: 'প্রম্পটসমূহ', - resources: 'রিসোর্সসমূহ', - server: 'সার্ভার', - title: 'শিরোনাম', - titleDescription: 'API কী-এর জন্য একটি সহায়ক ডাকনাম।', - tools: 'টুলসমূহ', - userDescription: 'MCP যে ব্যবহারকারীর পক্ষ থেকে কাজ করবে।', - }, -} - -export const bnBd: PluginLanguage = { - dateFNSKey: 'bn-BD', - translations: bnBdTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/bnIn.ts b/packages/plugin-mcp/src/translations/languages/bnIn.ts deleted file mode 100644 index 9b6ad5413de..00000000000 --- a/packages/plugin-mcp/src/translations/languages/bnIn.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const bnInTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API কী নির্ধারণ করে MCP ক্লায়েন্ট কোন সংগ্রহ, রিসোর্স, টুল এবং প্রম্পটে প্রবেশ করতে পারবে।', - apiKeys: 'API কীসমূহ', - authentication: 'প্রমাণীকরণ', - description: 'বিবরণ', - descriptionDescription: 'API কী-এর উদ্দেশ্য লিখুন।', - dismiss: 'বন্ধ করুন', - keepKeyPrivate: 'আপনার কী ব্যক্তিগত রাখুন।', - keyPrivateDescription: 'এই কী MCP-কে আপনার কনটেন্টে প্রবেশাধিকার দেয়। এটি অন্যদের সাথে শেয়ার করবেন না!', - lastUsed: 'সর্বশেষ ব্যবহৃত', - manageAPIKeys: 'API কী পরিচালনা করুন', - mcp: 'MCP', - noAPIKeys: 'কোনো API কী নেই', - operations: 'অপারেশনসমূহ', - overrideAccess: 'অ্যাক্সেস নিয়ন্ত্রণ অগ্রাহ্য করুন', - overrideAccessDescription: 'চালু থাকলে, এই কী প্রতিটি অপারেশনে Payload অ্যাক্সেস নিয়ম অগ্রাহ্য করবে। নির্দিষ্ট কারণ না থাকলে বন্ধ রাখুন।', - permissions: 'অনুমতিসমূহ', - permissionsDescription: 'MCP ক্লায়েন্টকে নিচের সংগ্রহ, টুল, রিসোর্স এবং প্রম্পটে প্রবেশের অনুমতি দিন।', - prompts: 'প্রম্পটসমূহ', - resources: 'রিসোর্সসমূহ', - server: 'সার্ভার', - title: 'শিরোনাম', - titleDescription: 'API কী-এর জন্য একটি সহায়ক ডাকনাম।', - tools: 'টুলসমূহ', - userDescription: 'MCP যে ব্যবহারকারীর পক্ষ থেকে কাজ করবে।', - }, -} - -export const bnIn: PluginLanguage = { - dateFNSKey: 'bn-IN', - translations: bnInTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ca.ts b/packages/plugin-mcp/src/translations/languages/ca.ts deleted file mode 100644 index 907bc318ac1..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ca.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const caTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Les claus API controlen a quines col·leccions, recursos, eines i prompts poden accedir els clients MCP.', - apiKeys: 'Claus API', - authentication: 'Autenticació', - description: 'Descripció', - descriptionDescription: 'Descriu el propòsit de la clau API.', - dismiss: 'Tanca', - keepKeyPrivate: 'Mantén la clau privada.', - keyPrivateDescription: 'Aquesta clau dona a MCP accés al teu contingut. No la comparteixis amb ningú!', - lastUsed: 'Darrer ús', - manageAPIKeys: 'Gestiona les claus API', - mcp: 'MCP', - noAPIKeys: 'No hi ha claus API', - operations: 'Operacions', - overrideAccess: 'Omet el control d’accés', - overrideAccessDescription: 'Quan està activat, aquesta clau omet el control d’accés de Payload en cada operació. Deixa-ho desactivat si no tens un motiu concret.', - permissions: 'Permisos', - permissionsDescription: 'Permet que els clients MCP accedeixin a les col·leccions, eines, recursos i prompts següents.', - prompts: 'Prompts', - resources: 'Recursos', - server: 'Servidor', - title: 'Títol', - titleDescription: 'Un sobrenom útil per a la clau API.', - tools: 'Eines', - userDescription: 'L’usuari en nom del qual actuarà MCP.', - }, -} - -export const ca: PluginLanguage = { - dateFNSKey: 'ca', - translations: caTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/cs.ts b/packages/plugin-mcp/src/translations/languages/cs.ts deleted file mode 100644 index ba7715aacff..00000000000 --- a/packages/plugin-mcp/src/translations/languages/cs.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const csTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Klíče API určují, ke kterým kolekcím, zdrojům, nástrojům a promptům mají klienti MCP přístup.', - apiKeys: 'Klíče API', - authentication: 'Ověření', - description: 'Popis', - descriptionDescription: 'Popište účel klíče API.', - dismiss: 'Zavřít', - keepKeyPrivate: 'Udržujte svůj klíč v soukromí.', - keyPrivateDescription: 'Tento klíč dává MCP přístup k vašemu obsahu. Nesdílejte ho s ostatními!', - lastUsed: 'Naposledy použito', - manageAPIKeys: 'Spravovat klíče API', - mcp: 'MCP', - noAPIKeys: 'Žádné klíče API', - operations: 'Operace', - overrideAccess: 'Přepsat řízení přístupu', - overrideAccessDescription: 'Je-li zaškrtnuto, tento klíč obejde řízení přístupu Payload při každé operaci. Nechte nezaškrtnuté, pokud k tomu nemáte konkrétní důvod.', - permissions: 'Oprávnění', - permissionsDescription: 'Povolte klientům MCP přístup k následujícím kolekcím, nástrojům, zdrojům a promptům.', - prompts: 'Prompty', - resources: 'Zdroje', - server: 'Server', - title: 'Název', - titleDescription: 'Užitečná přezdívka pro klíč API.', - tools: 'Nástroje', - userDescription: 'Uživatel, za kterého bude MCP jednat.', - }, -} - -export const cs: PluginLanguage = { - dateFNSKey: 'cs', - translations: csTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/da.ts b/packages/plugin-mcp/src/translations/languages/da.ts deleted file mode 100644 index ea59b364989..00000000000 --- a/packages/plugin-mcp/src/translations/languages/da.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const daTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-nøgler styrer, hvilke samlinger, ressourcer, værktøjer og prompts MCP-klienter kan få adgang til.', - apiKeys: 'API-nøgler', - authentication: 'Godkendelse', - description: 'Beskrivelse', - descriptionDescription: 'Beskriv formålet med API-nøglen.', - dismiss: 'Luk', - keepKeyPrivate: 'Hold din nøgle privat.', - keyPrivateDescription: 'Denne nøgle giver MCP adgang til dit indhold. Del den ikke med andre!', - lastUsed: 'Sidst brugt', - manageAPIKeys: 'Administrer API-nøgler', - mcp: 'MCP', - noAPIKeys: 'Ingen API-nøgler', - operations: 'Handlinger', - overrideAccess: 'Tilsidesæt adgangskontrol', - overrideAccessDescription: 'Når dette er markeret, omgår nøglen Payloads adgangskontrol for hver handling. Lad det være umarkeret, medmindre du har en specifik grund.', - permissions: 'Tilladelser', - permissionsDescription: 'Tillad MCP-klienter adgang til følgende samlinger, værktøjer, ressourcer og prompts.', - prompts: 'Prompts', - resources: 'Ressourcer', - server: 'Server', - title: 'Titel', - titleDescription: 'Et nyttigt kaldenavn til API-nøglen.', - tools: 'Værktøjer', - userDescription: 'Brugeren som MCP handler som.', - }, -} - -export const da: PluginLanguage = { - dateFNSKey: 'da', - translations: daTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/de.ts b/packages/plugin-mcp/src/translations/languages/de.ts deleted file mode 100644 index ffb955bef37..00000000000 --- a/packages/plugin-mcp/src/translations/languages/de.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const deTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-Schlüssel steuern, auf welche Collections, Ressourcen, Tools und Prompts MCP-Clients zugreifen können.', - apiKeys: 'API-Schlüssel', - authentication: 'Authentifizierung', - description: 'Beschreibung', - descriptionDescription: 'Beschreibe den Zweck des API-Schlüssels.', - dismiss: 'Schließen', - keepKeyPrivate: 'Halte deinen Schlüssel geheim.', - keyPrivateDescription: 'Dieser Schlüssel gibt MCP Zugriff auf deine Inhalte. Teile ihn nicht mit anderen!', - lastUsed: 'Zuletzt verwendet', - manageAPIKeys: 'API-Schlüssel verwalten', - mcp: 'MCP', - noAPIKeys: 'Keine API-Schlüssel', - operations: 'Operationen', - overrideAccess: 'Zugriffskontrolle überschreiben', - overrideAccessDescription: 'Wenn aktiviert, umgeht dieser Schlüssel bei jeder ausgeführten Operation die Payload-Zugriffsregeln. Nur aktivieren, wenn es einen konkreten Grund gibt.', - permissions: 'Berechtigungen', - permissionsDescription: 'Erlaube MCP-Clients Zugriff auf die folgenden Collections, Tools, Ressourcen und Prompts.', - prompts: 'Prompts', - resources: 'Ressourcen', - server: 'Server', - title: 'Titel', - titleDescription: 'Ein hilfreicher Anzeigename für den API-Schlüssel.', - tools: 'Tools', - userDescription: 'Der Benutzer, als den MCP handeln wird.', - }, -} - -export const de: PluginLanguage = { - dateFNSKey: 'de', - translations: deTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/en.ts b/packages/plugin-mcp/src/translations/languages/en.ts deleted file mode 100644 index 56dfabda23a..00000000000 --- a/packages/plugin-mcp/src/translations/languages/en.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const enTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API keys control which collections, resources, tools, and prompts MCP clients can access.', - apiKeys: 'API Keys', - authentication: 'Authentication', - description: 'Description', - descriptionDescription: 'Describe the purpose of the API key.', - dismiss: 'Dismiss', - keepKeyPrivate: 'Keep your key private.', - keyPrivateDescription: 'This key is what gives MCP access to your content. Don’t share it with others!', - lastUsed: 'Last used', - manageAPIKeys: 'Manage API keys', - mcp: 'MCP', - noAPIKeys: 'No API Keys', - operations: 'Operations', - overrideAccess: 'Override access control', - overrideAccessDescription: 'When checked, this key bypasses Payload access control on every operation it performs. Leave unchecked unless you have a specific reason.', - permissions: 'Permissions', - permissionsDescription: 'Allow MCP clients to access the following collections, tools, resources, and prompts.', - prompts: 'Prompts', - resources: 'Resources', - server: 'Server', - title: 'Title', - titleDescription: 'A useful nickname for the API key.', - tools: 'Tools', - userDescription: 'The user the MCP will act as.', - }, -} - -export const en: PluginLanguage = { - dateFNSKey: 'en-US', - translations: enTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/es.ts b/packages/plugin-mcp/src/translations/languages/es.ts deleted file mode 100644 index b183dc989b3..00000000000 --- a/packages/plugin-mcp/src/translations/languages/es.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const esTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Las claves API controlan a qué colecciones, recursos, herramientas y prompts pueden acceder los clientes MCP.', - apiKeys: 'Claves API', - authentication: 'Autenticación', - description: 'Descripción', - descriptionDescription: 'Describe el propósito de la clave API.', - dismiss: 'Cerrar', - keepKeyPrivate: 'Mantén tu clave privada.', - keyPrivateDescription: 'Esta clave da a MCP acceso a tu contenido. ¡No la compartas con otras personas!', - lastUsed: 'Último uso', - manageAPIKeys: 'Administrar claves API', - mcp: 'MCP', - noAPIKeys: 'No hay claves API', - operations: 'Operaciones', - overrideAccess: 'Omitir control de acceso', - overrideAccessDescription: 'Cuando está activado, esta clave omite el control de acceso de Payload en cada operación que realiza. Déjalo desactivado salvo que tengas un motivo específico.', - permissions: 'Permisos', - permissionsDescription: 'Permite que los clientes MCP accedan a las siguientes colecciones, herramientas, recursos y prompts.', - prompts: 'Prompts', - resources: 'Recursos', - server: 'Servidor', - title: 'Título', - titleDescription: 'Un nombre útil para la clave API.', - tools: 'Herramientas', - userDescription: 'El usuario en cuyo nombre actuará MCP.', - }, -} - -export const es: PluginLanguage = { - dateFNSKey: 'es', - translations: esTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/et.ts b/packages/plugin-mcp/src/translations/languages/et.ts deleted file mode 100644 index 401d3c63665..00000000000 --- a/packages/plugin-mcp/src/translations/languages/et.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const etTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API võtmed määravad, millistele kogudele, ressurssidele, tööriistadele ja promptidele MCP kliendid ligi pääsevad.', - apiKeys: 'API võtmed', - authentication: 'Autentimine', - description: 'Kirjeldus', - descriptionDescription: 'Kirjelda API võtme eesmärki.', - dismiss: 'Sulge', - keepKeyPrivate: 'Hoia oma võti privaatsena.', - keyPrivateDescription: 'See võti annab MCP-le juurdepääsu sinu sisule. Ära jaga seda teistega!', - lastUsed: 'Viimati kasutatud', - manageAPIKeys: 'Halda API võtmeid', - mcp: 'MCP', - noAPIKeys: 'API võtmeid pole', - operations: 'Toimingud', - overrideAccess: 'Tühista juurdepääsukontroll', - overrideAccessDescription: 'Kui see on märgitud, möödub võti igas toimingus Payloadi juurdepääsureeglitest. Jäta märkimata, kui sul pole konkreetset põhjust.', - permissions: 'Õigused', - permissionsDescription: 'Luba MCP klientidel pääseda ligi järgmistele kogudele, tööriistadele, ressurssidele ja promptidele.', - prompts: 'Promptid', - resources: 'Ressursid', - server: 'Server', - title: 'Pealkiri', - titleDescription: 'Kasulik hüüdnimi API võtmele.', - tools: 'Tööriistad', - userDescription: 'Kasutaja, kelle nimel MCP tegutseb.', - }, -} - -export const et: PluginLanguage = { - dateFNSKey: 'et', - translations: etTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/fa.ts b/packages/plugin-mcp/src/translations/languages/fa.ts deleted file mode 100644 index b63e173e10e..00000000000 --- a/packages/plugin-mcp/src/translations/languages/fa.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const faTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'کلیدهای API کنترل می‌کنند کلاینت‌های MCP به کدام مجموعه‌ها، منابع، ابزارها و پرامپت‌ها دسترسی داشته باشند.', - apiKeys: 'کلیدهای API', - authentication: 'احراز هویت', - description: 'توضیح', - descriptionDescription: 'هدف کلید API را توضیح دهید.', - dismiss: 'بستن', - keepKeyPrivate: 'کلید خود را محرمانه نگه دارید.', - keyPrivateDescription: 'این کلید به MCP دسترسی به محتوای شما می‌دهد. آن را با دیگران به اشتراک نگذارید!', - lastUsed: 'آخرین استفاده', - manageAPIKeys: 'مدیریت کلیدهای API', - mcp: 'MCP', - noAPIKeys: 'هیچ کلید API وجود ندارد', - operations: 'عملیات', - overrideAccess: 'نادیده گرفتن کنترل دسترسی', - overrideAccessDescription: 'در صورت فعال بودن، این کلید در هر عملیاتی کنترل دسترسی Payload را دور می‌زند. مگر با دلیل مشخص، آن را غیرفعال نگه دارید.', - permissions: 'مجوزها', - permissionsDescription: 'به کلاینت‌های MCP اجازه دهید به مجموعه‌ها، ابزارها، منابع و پرامپت‌های زیر دسترسی داشته باشند.', - prompts: 'پرامپت‌ها', - resources: 'منابع', - server: 'سرور', - title: 'عنوان', - titleDescription: 'یک نام مستعار مفید برای کلید API.', - tools: 'ابزارها', - userDescription: 'کاربری که MCP به نمایندگی از او عمل می‌کند.', - }, -} - -export const fa: PluginLanguage = { - dateFNSKey: 'fa-IR', - translations: faTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/fr.ts b/packages/plugin-mcp/src/translations/languages/fr.ts deleted file mode 100644 index ea09b601f92..00000000000 --- a/packages/plugin-mcp/src/translations/languages/fr.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const frTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Les clés API contrôlent les collections, ressources, outils et prompts auxquels les clients MCP peuvent accéder.', - apiKeys: 'Clés API', - authentication: 'Authentification', - description: 'Description', - descriptionDescription: 'Décrivez l’objectif de la clé API.', - dismiss: 'Fermer', - keepKeyPrivate: 'Gardez votre clé privée.', - keyPrivateDescription: 'Cette clé donne à MCP accès à votre contenu. Ne la partagez pas avec d’autres personnes !', - lastUsed: 'Dernière utilisation', - manageAPIKeys: 'Gérer les clés API', - mcp: 'MCP', - noAPIKeys: 'Aucune clé API', - operations: 'Opérations', - overrideAccess: 'Ignorer le contrôle d’accès', - overrideAccessDescription: 'Lorsque cette option est activée, cette clé ignore le contrôle d’accès de Payload pour chaque opération. Laissez-la désactivée sauf raison précise.', - permissions: 'Autorisations', - permissionsDescription: 'Autorisez les clients MCP à accéder aux collections, outils, ressources et prompts suivants.', - prompts: 'Prompts', - resources: 'Ressources', - server: 'Serveur', - title: 'Titre', - titleDescription: 'Un surnom utile pour la clé API.', - tools: 'Outils', - userDescription: 'L’utilisateur au nom duquel MCP agira.', - }, -} - -export const fr: PluginLanguage = { - dateFNSKey: 'fr', - translations: frTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/he.ts b/packages/plugin-mcp/src/translations/languages/he.ts deleted file mode 100644 index d5297466e58..00000000000 --- a/packages/plugin-mcp/src/translations/languages/he.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const heTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'מפתחות API קובעים לאילו אוספים, משאבים, כלים והנחיות לקוחות MCP יכולים לגשת.', - apiKeys: 'מפתחות API', - authentication: 'אימות', - description: 'תיאור', - descriptionDescription: 'תאר את מטרת מפתח ה-API.', - dismiss: 'סגור', - keepKeyPrivate: 'שמור את המפתח שלך פרטי.', - keyPrivateDescription: 'מפתח זה נותן ל-MCP גישה לתוכן שלך. אל תשתף אותו עם אחרים!', - lastUsed: 'שימוש אחרון', - manageAPIKeys: 'נהל מפתחות API', - mcp: 'MCP', - noAPIKeys: 'אין מפתחות API', - operations: 'פעולות', - overrideAccess: 'עקוף בקרת גישה', - overrideAccessDescription: 'כאשר מסומן, מפתח זה עוקף את בקרת הגישה של Payload בכל פעולה שהוא מבצע. השאר לא מסומן אלא אם יש סיבה ספציפית.', - permissions: 'הרשאות', - permissionsDescription: 'אפשר ללקוחות MCP לגשת לאוספים, לכלים, למשאבים ולהנחיות הבאים.', - prompts: 'הנחיות', - resources: 'משאבים', - server: 'שרת', - title: 'כותרת', - titleDescription: 'כינוי שימושי למפתח ה-API.', - tools: 'כלים', - userDescription: 'המשתמש ש-MCP יפעל בשמו.', - }, -} - -export const he: PluginLanguage = { - dateFNSKey: 'he', - translations: heTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/hr.ts b/packages/plugin-mcp/src/translations/languages/hr.ts deleted file mode 100644 index 01c5d25012e..00000000000 --- a/packages/plugin-mcp/src/translations/languages/hr.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const hrTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API ključevi određuju kojim kolekcijama, resursima, alatima i promptovima MCP klijenti mogu pristupiti.', - apiKeys: 'API ključevi', - authentication: 'Autentikacija', - description: 'Opis', - descriptionDescription: 'Opišite svrhu API ključa.', - dismiss: 'Zatvori', - keepKeyPrivate: 'Čuvajte svoj ključ privatnim.', - keyPrivateDescription: 'Ovaj ključ daje MCP-u pristup vašem sadržaju. Nemojte ga dijeliti s drugima!', - lastUsed: 'Zadnje korišteno', - manageAPIKeys: 'Upravljanje API ključevima', - mcp: 'MCP', - noAPIKeys: 'Nema API ključeva', - operations: 'Operacije', - overrideAccess: 'Zaobiđi kontrolu pristupa', - overrideAccessDescription: 'Kada je označeno, ovaj ključ zaobilazi Payload kontrolu pristupa pri svakoj operaciji. Ostavite neoznačeno osim ako imate konkretan razlog.', - permissions: 'Dozvole', - permissionsDescription: 'Dopustite MCP klijentima pristup sljedećim kolekcijama, alatima, resursima i promptovima.', - prompts: 'Promptovi', - resources: 'Resursi', - server: 'Poslužitelj', - title: 'Naslov', - titleDescription: 'Koristan nadimak za API ključ.', - tools: 'Alati', - userDescription: 'Korisnik u čije će ime MCP djelovati.', - }, -} - -export const hr: PluginLanguage = { - dateFNSKey: 'hr', - translations: hrTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/hu.ts b/packages/plugin-mcp/src/translations/languages/hu.ts deleted file mode 100644 index 3891782899e..00000000000 --- a/packages/plugin-mcp/src/translations/languages/hu.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const huTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Az API-kulcsok szabályozzák, hogy az MCP-kliensek mely gyűjteményekhez, erőforrásokhoz, eszközökhöz és promptokhoz férhetnek hozzá.', - apiKeys: 'API-kulcsok', - authentication: 'Hitelesítés', - description: 'Leírás', - descriptionDescription: 'Írd le az API-kulcs célját.', - dismiss: 'Bezárás', - keepKeyPrivate: 'Tartsd titokban a kulcsodat.', - keyPrivateDescription: 'Ez a kulcs hozzáférést ad az MCP-nek a tartalmadhoz. Ne oszd meg másokkal!', - lastUsed: 'Utoljára használva', - manageAPIKeys: 'API-kulcsok kezelése', - mcp: 'MCP', - noAPIKeys: 'Nincsenek API-kulcsok', - operations: 'Műveletek', - overrideAccess: 'Hozzáférés-vezérlés felülírása', - overrideAccessDescription: 'Ha be van jelölve, ez a kulcs minden műveletnél megkerüli a Payload hozzáférési szabályait. Hagyd kikapcsolva, hacsak nincs konkrét okod.', - permissions: 'Jogosultságok', - permissionsDescription: 'Engedélyezd az MCP-klienseknek az alábbi gyűjtemények, eszközök, erőforrások és promptok elérését.', - prompts: 'Promptok', - resources: 'Erőforrások', - server: 'Szerver', - title: 'Cím', - titleDescription: 'Hasznos becenév az API-kulcshoz.', - tools: 'Eszközök', - userDescription: 'A felhasználó, akinek a nevében az MCP eljár.', - }, -} - -export const hu: PluginLanguage = { - dateFNSKey: 'hu', - translations: huTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/hy.ts b/packages/plugin-mcp/src/translations/languages/hy.ts deleted file mode 100644 index b9b4d8daddd..00000000000 --- a/packages/plugin-mcp/src/translations/languages/hy.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const hyTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API բանալիները կառավարում են, թե MCP հաճախորդները որ հավաքածուներին, ռեսուրսներին, գործիքներին և prompt-երին կարող են մուտք ունենալ։', - apiKeys: 'API բանալիներ', - authentication: 'Նույնականացում', - description: 'Նկարագրություն', - descriptionDescription: 'Նկարագրեք API բանալիի նպատակը։', - dismiss: 'Փակել', - keepKeyPrivate: 'Ձեր բանալին պահեք գաղտնի։', - keyPrivateDescription: 'Այս բանալին MCP-ին հասանելիություն է տալիս ձեր բովանդակությանը։ Մի՛ կիսվեք այն ուրիշների հետ։', - lastUsed: 'Վերջին օգտագործում', - manageAPIKeys: 'Կառավարել API բանալիները', - mcp: 'MCP', - noAPIKeys: 'API բանալիներ չկան', - operations: 'Գործողություններ', - overrideAccess: 'Շրջանցել հասանելիության վերահսկումը', - overrideAccessDescription: 'Միացված լինելու դեպքում այս բանալին շրջանցում է Payload-ի հասանելիության կանոնները յուրաքանչյուր գործողության ժամանակ։ Թողեք անջատված, եթե հատուկ պատճառ չունեք։', - permissions: 'Թույլտվություններ', - permissionsDescription: 'Թույլ տվեք MCP հաճախորդներին մուտք ունենալ հետևյալ հավաքածուներին, գործիքներին, ռեսուրսներին և prompt-երին։', - prompts: 'Prompt-եր', - resources: 'Ռեսուրսներ', - server: 'Սերվեր', - title: 'Վերնագիր', - titleDescription: 'Օգտակար մականուն API բանալիի համար։', - tools: 'Գործիքներ', - userDescription: 'Օգտատերը, որի անունից գործելու է MCP-ն։', - }, -} - -export const hy: PluginLanguage = { - dateFNSKey: 'hy-AM', - translations: hyTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/id.ts b/packages/plugin-mcp/src/translations/languages/id.ts deleted file mode 100644 index 0641a02ce5b..00000000000 --- a/packages/plugin-mcp/src/translations/languages/id.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const idTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Kunci API mengontrol koleksi, resource, alat, dan prompt yang dapat diakses klien MCP.', - apiKeys: 'Kunci API', - authentication: 'Autentikasi', - description: 'Deskripsi', - descriptionDescription: 'Jelaskan tujuan kunci API.', - dismiss: 'Tutup', - keepKeyPrivate: 'Jaga kunci Anda tetap rahasia.', - keyPrivateDescription: 'Kunci ini memberi MCP akses ke konten Anda. Jangan bagikan dengan orang lain!', - lastUsed: 'Terakhir digunakan', - manageAPIKeys: 'Kelola kunci API', - mcp: 'MCP', - noAPIKeys: 'Tidak ada kunci API', - operations: 'Operasi', - overrideAccess: 'Abaikan kontrol akses', - overrideAccessDescription: 'Jika dicentang, kunci ini melewati kontrol akses Payload pada setiap operasi. Biarkan tidak dicentang kecuali Anda memiliki alasan khusus.', - permissions: 'Izin', - permissionsDescription: 'Izinkan klien MCP mengakses koleksi, alat, resource, dan prompt berikut.', - prompts: 'Prompt', - resources: 'Resource', - server: 'Server', - title: 'Judul', - titleDescription: 'Nama panggilan yang berguna untuk kunci API.', - tools: 'Alat', - userDescription: 'Pengguna yang akan digunakan MCP untuk bertindak.', - }, -} - -export const id: PluginLanguage = { - dateFNSKey: 'id', - translations: idTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/is.ts b/packages/plugin-mcp/src/translations/languages/is.ts deleted file mode 100644 index 16a91816baa..00000000000 --- a/packages/plugin-mcp/src/translations/languages/is.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const isTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-lyklar stjórna hvaða söfnum, tilföngum, verkfærum og promptum MCP-biðlarar geta fengið aðgang að.', - apiKeys: 'API-lyklar', - authentication: 'Auðkenning', - description: 'Lýsing', - descriptionDescription: 'Lýstu tilgangi API-lykilsins.', - dismiss: 'Loka', - keepKeyPrivate: 'Haltu lyklinum þínum leyndum.', - keyPrivateDescription: 'Þessi lykill veitir MCP aðgang að efninu þínu. Ekki deila honum með öðrum!', - lastUsed: 'Síðast notað', - manageAPIKeys: 'Stjórna API-lyklum', - mcp: 'MCP', - noAPIKeys: 'Engir API-lyklar', - operations: 'Aðgerðir', - overrideAccess: 'Hunsa aðgangsstýringu', - overrideAccessDescription: 'Þegar þetta er valið fer lykillinn fram hjá aðgangsstýringu Payload í hverri aðgerð. Láttu þetta vera óvalið nema sérstök ástæða sé fyrir hendi.', - permissions: 'Heimildir', - permissionsDescription: 'Leyfðu MCP-biðlurum aðgang að eftirfarandi söfnum, verkfærum, tilföngum og promptum.', - prompts: 'Promptar', - resources: 'Tilföng', - server: 'Þjónn', - title: 'Titill', - titleDescription: 'Gagnlegt viðurnefni fyrir API-lykilinn.', - tools: 'Verkfæri', - userDescription: 'Notandinn sem MCP mun starfa sem.', - }, -} - -export const is: PluginLanguage = { - dateFNSKey: 'is', - translations: isTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/it.ts b/packages/plugin-mcp/src/translations/languages/it.ts deleted file mode 100644 index dd2b85bbf79..00000000000 --- a/packages/plugin-mcp/src/translations/languages/it.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const itTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Le chiavi API controllano a quali raccolte, risorse, strumenti e prompt possono accedere i client MCP.', - apiKeys: 'Chiavi API', - authentication: 'Autenticazione', - description: 'Descrizione', - descriptionDescription: 'Descrivi lo scopo della chiave API.', - dismiss: 'Chiudi', - keepKeyPrivate: 'Mantieni privata la tua chiave.', - keyPrivateDescription: 'Questa chiave dà a MCP accesso ai tuoi contenuti. Non condividerla con altri!', - lastUsed: 'Ultimo utilizzo', - manageAPIKeys: 'Gestisci chiavi API', - mcp: 'MCP', - noAPIKeys: 'Nessuna chiave API', - operations: 'Operazioni', - overrideAccess: 'Ignora controllo accessi', - overrideAccessDescription: 'Quando selezionato, questa chiave ignora il controllo accessi di Payload in ogni operazione. Lascialo deselezionato salvo un motivo specifico.', - permissions: 'Permessi', - permissionsDescription: 'Consenti ai client MCP di accedere alle seguenti raccolte, strumenti, risorse e prompt.', - prompts: 'Prompt', - resources: 'Risorse', - server: 'Server', - title: 'Titolo', - titleDescription: 'Un nome utile per la chiave API.', - tools: 'Strumenti', - userDescription: 'L’utente per conto del quale agirà MCP.', - }, -} - -export const it: PluginLanguage = { - dateFNSKey: 'it', - translations: itTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ja.ts b/packages/plugin-mcp/src/translations/languages/ja.ts deleted file mode 100644 index 18172a2ff66..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ja.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const jaTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'APIキーは、MCPクライアントがアクセスできるコレクション、リソース、ツール、プロンプトを制御します。', - apiKeys: 'APIキー', - authentication: '認証', - description: '説明', - descriptionDescription: 'APIキーの目的を説明してください。', - dismiss: '閉じる', - keepKeyPrivate: 'キーは非公開にしてください。', - keyPrivateDescription: 'このキーにより、MCPはあなたのコンテンツへアクセスできます。他の人と共有しないでください。', - lastUsed: '最終使用', - manageAPIKeys: 'APIキーを管理', - mcp: 'MCP', - noAPIKeys: 'APIキーがありません', - operations: '操作', - overrideAccess: 'アクセス制御を上書き', - overrideAccessDescription: '有効にすると、このキーが実行するすべての操作でPayloadのアクセス制御をバイパスします。明確な理由がない限り無効のままにしてください。', - permissions: '権限', - permissionsDescription: 'MCPクライアントに次のコレクション、ツール、リソース、プロンプトへのアクセスを許可します。', - prompts: 'プロンプト', - resources: 'リソース', - server: 'サーバー', - title: 'タイトル', - titleDescription: 'APIキーのわかりやすい名前。', - tools: 'ツール', - userDescription: 'MCPが代理で操作するユーザー。', - }, -} - -export const ja: PluginLanguage = { - dateFNSKey: 'ja', - translations: jaTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ko.ts b/packages/plugin-mcp/src/translations/languages/ko.ts deleted file mode 100644 index 9e041cd959c..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ko.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const koTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API 키는 MCP 클라이언트가 접근할 수 있는 컬렉션, 리소스, 도구, 프롬프트를 제어합니다.', - apiKeys: 'API 키', - authentication: '인증', - description: '설명', - descriptionDescription: 'API 키의 목적을 설명하세요.', - dismiss: '닫기', - keepKeyPrivate: '키를 비공개로 유지하세요.', - keyPrivateDescription: '이 키는 MCP에 콘텐츠 접근 권한을 부여합니다. 다른 사람과 공유하지 마세요!', - lastUsed: '마지막 사용', - manageAPIKeys: 'API 키 관리', - mcp: 'MCP', - noAPIKeys: 'API 키 없음', - operations: '작업', - overrideAccess: '접근 제어 재정의', - overrideAccessDescription: '선택하면 이 키가 수행하는 모든 작업에서 Payload 접근 제어를 우회합니다. 특별한 이유가 없다면 선택하지 마세요.', - permissions: '권한', - permissionsDescription: 'MCP 클라이언트가 다음 컬렉션, 도구, 리소스, 프롬프트에 접근하도록 허용합니다.', - prompts: '프롬프트', - resources: '리소스', - server: '서버', - title: '제목', - titleDescription: 'API 키에 사용할 유용한 별칭입니다.', - tools: '도구', - userDescription: 'MCP가 대신 작업할 사용자입니다.', - }, -} - -export const ko: PluginLanguage = { - dateFNSKey: 'ko', - translations: koTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/lt.ts b/packages/plugin-mcp/src/translations/languages/lt.ts deleted file mode 100644 index d5468e4a02e..00000000000 --- a/packages/plugin-mcp/src/translations/languages/lt.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const ltTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API raktai valdo, prie kurių kolekcijų, išteklių, įrankių ir promptų gali prisijungti MCP klientai.', - apiKeys: 'API raktai', - authentication: 'Autentifikavimas', - description: 'Aprašymas', - descriptionDescription: 'Aprašykite API rakto paskirtį.', - dismiss: 'Uždaryti', - keepKeyPrivate: 'Laikykite savo raktą privačiai.', - keyPrivateDescription: 'Šis raktas suteikia MCP prieigą prie jūsų turinio. Nesidalykite juo su kitais!', - lastUsed: 'Paskutinį kartą naudota', - manageAPIKeys: 'Tvarkyti API raktus', - mcp: 'MCP', - noAPIKeys: 'Nėra API raktų', - operations: 'Operacijos', - overrideAccess: 'Apeiti prieigos kontrolę', - overrideAccessDescription: 'Pažymėjus, šis raktas apeina Payload prieigos kontrolę kiekvienoje operacijoje. Palikite nepažymėta, nebent turite konkrečią priežastį.', - permissions: 'Leidimai', - permissionsDescription: 'Leiskite MCP klientams pasiekti šias kolekcijas, įrankius, išteklius ir promptus.', - prompts: 'Promptai', - resources: 'Ištekliai', - server: 'Serveris', - title: 'Pavadinimas', - titleDescription: 'Naudingas API rakto slapyvardis.', - tools: 'Įrankiai', - userDescription: 'Naudotojas, kurio vardu veiks MCP.', - }, -} - -export const lt: PluginLanguage = { - dateFNSKey: 'lt', - translations: ltTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/lv.ts b/packages/plugin-mcp/src/translations/languages/lv.ts deleted file mode 100644 index 3c4a0ff9214..00000000000 --- a/packages/plugin-mcp/src/translations/languages/lv.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const lvTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API atslēgas nosaka, kurām kolekcijām, resursiem, rīkiem un promptiem MCP klienti var piekļūt.', - apiKeys: 'API atslēgas', - authentication: 'Autentifikācija', - description: 'Apraksts', - descriptionDescription: 'Aprakstiet API atslēgas mērķi.', - dismiss: 'Aizvērt', - keepKeyPrivate: 'Glabājiet savu atslēgu privāti.', - keyPrivateDescription: 'Šī atslēga dod MCP piekļuvi jūsu saturam. Nekopīgojiet to ar citiem!', - lastUsed: 'Pēdējo reizi lietots', - manageAPIKeys: 'Pārvaldīt API atslēgas', - mcp: 'MCP', - noAPIKeys: 'Nav API atslēgu', - operations: 'Darbības', - overrideAccess: 'Apiet piekļuves kontroli', - overrideAccessDescription: 'Ja atzīmēts, šī atslēga apiet Payload piekļuves kontroli katrā darbībā. Atstājiet neatzīmētu, ja nav konkrēta iemesla.', - permissions: 'Atļaujas', - permissionsDescription: 'Atļaujiet MCP klientiem piekļūt šādām kolekcijām, rīkiem, resursiem un promptiem.', - prompts: 'Prompti', - resources: 'Resursi', - server: 'Serveris', - title: 'Nosaukums', - titleDescription: 'Noderīgs API atslēgas segvārds.', - tools: 'Rīki', - userDescription: 'Lietotājs, kura vārdā MCP darbosies.', - }, -} - -export const lv: PluginLanguage = { - dateFNSKey: 'lv', - translations: lvTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/my.ts b/packages/plugin-mcp/src/translations/languages/my.ts deleted file mode 100644 index b667bb503b7..00000000000 --- a/packages/plugin-mcp/src/translations/languages/my.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const myTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API key များသည် MCP client များ ဝင်ရောက်နိုင်သော collection, resource, tool နှင့် prompt များကို ထိန်းချုပ်သည်။', - apiKeys: 'API key များ', - authentication: 'အထောက်အထားစစ်ဆေးခြင်း', - description: 'ဖော်ပြချက်', - descriptionDescription: 'API key ၏ ရည်ရွယ်ချက်ကို ဖော်ပြပါ။', - dismiss: 'ပိတ်ရန်', - keepKeyPrivate: 'သင့် key ကို လျှို့ဝှက်ထားပါ။', - keyPrivateDescription: 'ဤ key သည် MCP ကို သင့် content သို့ ဝင်ရောက်ခွင့်ပေးသည်။ အခြားသူများနှင့် မမျှဝေပါနှင့်!', - lastUsed: 'နောက်ဆုံးအသုံးပြုခဲ့သည်', - manageAPIKeys: 'API key များကို စီမံရန်', - mcp: 'MCP', - noAPIKeys: 'API key မရှိပါ', - operations: 'လုပ်ဆောင်ချက်များ', - overrideAccess: 'Access control ကို ကျော်လွန်ရန်', - overrideAccessDescription: 'ဖွင့်ထားပါက ဤ key သည် ပြုလုပ်သော လုပ်ဆောင်ချက်တိုင်းတွင် Payload access control ကို ကျော်လွန်မည်။ အကြောင်းပြချက်တိကျ မရှိပါက မဖွင့်ပါနှင့်။', - permissions: 'ခွင့်ပြုချက်များ', - permissionsDescription: 'MCP client များအား အောက်ပါ collection, tool, resource နှင့် prompt များကို ဝင်ရောက်ခွင့်ပြုပါ။', - prompts: 'Prompt များ', - resources: 'Resource များ', - server: 'Server', - title: 'ခေါင်းစဉ်', - titleDescription: 'API key အတွက် အသုံးဝင်သော အမည်တို။', - tools: 'Tool များ', - userDescription: 'MCP က ကိုယ်စားပြုလုပ်ဆောင်မည့် user။', - }, -} - -export const my: PluginLanguage = { - dateFNSKey: 'en-US', - translations: myTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/nb.ts b/packages/plugin-mcp/src/translations/languages/nb.ts deleted file mode 100644 index e0a253a11c5..00000000000 --- a/packages/plugin-mcp/src/translations/languages/nb.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const nbTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-nøkler styrer hvilke samlinger, ressurser, verktøy og prompter MCP-klienter kan få tilgang til.', - apiKeys: 'API-nøkler', - authentication: 'Autentisering', - description: 'Beskrivelse', - descriptionDescription: 'Beskriv formålet med API-nøkkelen.', - dismiss: 'Lukk', - keepKeyPrivate: 'Hold nøkkelen din privat.', - keyPrivateDescription: 'Denne nøkkelen gir MCP tilgang til innholdet ditt. Ikke del den med andre!', - lastUsed: 'Sist brukt', - manageAPIKeys: 'Administrer API-nøkler', - mcp: 'MCP', - noAPIKeys: 'Ingen API-nøkler', - operations: 'Operasjoner', - overrideAccess: 'Overstyr tilgangskontroll', - overrideAccessDescription: 'Når dette er valgt, omgår nøkkelen Payloads tilgangskontroll for hver operasjon. La være av med mindre du har en konkret grunn.', - permissions: 'Tillatelser', - permissionsDescription: 'Tillat MCP-klienter tilgang til følgende samlinger, verktøy, ressurser og prompter.', - prompts: 'Prompter', - resources: 'Ressurser', - server: 'Server', - title: 'Tittel', - titleDescription: 'Et nyttig kallenavn for API-nøkkelen.', - tools: 'Verktøy', - userDescription: 'Brukeren MCP vil opptre som.', - }, -} - -export const nb: PluginLanguage = { - dateFNSKey: 'nb', - translations: nbTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/nl.ts b/packages/plugin-mcp/src/translations/languages/nl.ts deleted file mode 100644 index b3b98f7bea8..00000000000 --- a/packages/plugin-mcp/src/translations/languages/nl.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const nlTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-sleutels bepalen tot welke collecties, resources, tools en prompts MCP-clients toegang hebben.', - apiKeys: 'API-sleutels', - authentication: 'Authenticatie', - description: 'Beschrijving', - descriptionDescription: 'Beschrijf het doel van de API-sleutel.', - dismiss: 'Sluiten', - keepKeyPrivate: 'Houd je sleutel privé.', - keyPrivateDescription: 'Deze sleutel geeft MCP toegang tot je content. Deel hem niet met anderen!', - lastUsed: 'Laatst gebruikt', - manageAPIKeys: 'API-sleutels beheren', - mcp: 'MCP', - noAPIKeys: 'Geen API-sleutels', - operations: 'Bewerkingen', - overrideAccess: 'Toegangscontrole overschrijven', - overrideAccessDescription: 'Wanneer ingeschakeld omzeilt deze sleutel Payload-toegangscontrole bij elke bewerking. Laat uitgeschakeld tenzij je een specifieke reden hebt.', - permissions: 'Machtigingen', - permissionsDescription: 'Sta MCP-clients toe toegang te krijgen tot de volgende collecties, tools, resources en prompts.', - prompts: 'Prompts', - resources: 'Resources', - server: 'Server', - title: 'Titel', - titleDescription: 'Een handige bijnaam voor de API-sleutel.', - tools: 'Tools', - userDescription: 'De gebruiker namens wie MCP zal handelen.', - }, -} - -export const nl: PluginLanguage = { - dateFNSKey: 'nl', - translations: nlTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/pl.ts b/packages/plugin-mcp/src/translations/languages/pl.ts deleted file mode 100644 index f3c0bf19305..00000000000 --- a/packages/plugin-mcp/src/translations/languages/pl.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const plTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Klucze API kontrolują, do których kolekcji, zasobów, narzędzi i promptów klienci MCP mają dostęp.', - apiKeys: 'Klucze API', - authentication: 'Uwierzytelnianie', - description: 'Opis', - descriptionDescription: 'Opisz przeznaczenie klucza API.', - dismiss: 'Zamknij', - keepKeyPrivate: 'Zachowaj swój klucz w tajemnicy.', - keyPrivateDescription: 'Ten klucz daje MCP dostęp do Twoich treści. Nie udostępniaj go innym!', - lastUsed: 'Ostatnio użyty', - manageAPIKeys: 'Zarządzaj kluczami API', - mcp: 'MCP', - noAPIKeys: 'Brak kluczy API', - operations: 'Operacje', - overrideAccess: 'Pomiń kontrolę dostępu', - overrideAccessDescription: 'Po zaznaczeniu ten klucz omija kontrolę dostępu Payload przy każdej operacji. Pozostaw niezaznaczone, chyba że masz konkretny powód.', - permissions: 'Uprawnienia', - permissionsDescription: 'Zezwól klientom MCP na dostęp do następujących kolekcji, narzędzi, zasobów i promptów.', - prompts: 'Prompty', - resources: 'Zasoby', - server: 'Serwer', - title: 'Tytuł', - titleDescription: 'Przydatna nazwa klucza API.', - tools: 'Narzędzia', - userDescription: 'Użytkownik, w imieniu którego będzie działać MCP.', - }, -} - -export const pl: PluginLanguage = { - dateFNSKey: 'pl', - translations: plTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/pt.ts b/packages/plugin-mcp/src/translations/languages/pt.ts deleted file mode 100644 index 42079b6b78e..00000000000 --- a/packages/plugin-mcp/src/translations/languages/pt.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const ptTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'As chaves de API controlam quais coleções, recursos, ferramentas e prompts os clientes MCP podem acessar.', - apiKeys: 'Chaves de API', - authentication: 'Autenticação', - description: 'Descrição', - descriptionDescription: 'Descreva o propósito da chave de API.', - dismiss: 'Fechar', - keepKeyPrivate: 'Mantenha sua chave privada.', - keyPrivateDescription: 'Esta chave dá ao MCP acesso ao seu conteúdo. Não a compartilhe com outras pessoas!', - lastUsed: 'Último uso', - manageAPIKeys: 'Gerenciar chaves de API', - mcp: 'MCP', - noAPIKeys: 'Nenhuma chave de API', - operations: 'Operações', - overrideAccess: 'Substituir controle de acesso', - overrideAccessDescription: 'Quando marcado, esta chave ignora o controle de acesso do Payload em todas as operações. Deixe desmarcado a menos que você tenha um motivo específico.', - permissions: 'Permissões', - permissionsDescription: 'Permita que clientes MCP acessem as seguintes coleções, ferramentas, recursos e prompts.', - prompts: 'Prompts', - resources: 'Recursos', - server: 'Servidor', - title: 'Título', - titleDescription: 'Um apelido útil para a chave de API.', - tools: 'Ferramentas', - userDescription: 'O usuário como quem o MCP atuará.', - }, -} - -export const pt: PluginLanguage = { - dateFNSKey: 'pt', - translations: ptTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ro.ts b/packages/plugin-mcp/src/translations/languages/ro.ts deleted file mode 100644 index d58de022c6d..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ro.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const roTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Cheile API controlează la ce colecții, resurse, instrumente și prompturi pot accesa clienții MCP.', - apiKeys: 'Chei API', - authentication: 'Autentificare', - description: 'Descriere', - descriptionDescription: 'Descrie scopul cheii API.', - dismiss: 'Închide', - keepKeyPrivate: 'Păstrează cheia privată.', - keyPrivateDescription: 'Această cheie oferă MCP acces la conținutul tău. Nu o partaja cu alții!', - lastUsed: 'Ultima utilizare', - manageAPIKeys: 'Gestionează cheile API', - mcp: 'MCP', - noAPIKeys: 'Nu există chei API', - operations: 'Operațiuni', - overrideAccess: 'Suprascrie controlul accesului', - overrideAccessDescription: 'Când este bifat, această cheie ocolește controlul accesului Payload la fiecare operațiune. Lasă nebifat dacă nu ai un motiv specific.', - permissions: 'Permisiuni', - permissionsDescription: 'Permite clienților MCP să acceseze următoarele colecții, instrumente, resurse și prompturi.', - prompts: 'Prompturi', - resources: 'Resurse', - server: 'Server', - title: 'Titlu', - titleDescription: 'O poreclă utilă pentru cheia API.', - tools: 'Instrumente', - userDescription: 'Utilizatorul în numele căruia va acționa MCP.', - }, -} - -export const ro: PluginLanguage = { - dateFNSKey: 'ro', - translations: roTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/rs.ts b/packages/plugin-mcp/src/translations/languages/rs.ts deleted file mode 100644 index f7e177158aa..00000000000 --- a/packages/plugin-mcp/src/translations/languages/rs.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const rsTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API кључеви контролишу којим колекцијама, ресурсима, алатима и промптовима MCP клијенти могу да приступе.', - apiKeys: 'API кључеви', - authentication: 'Аутентификација', - description: 'Опис', - descriptionDescription: 'Опишите сврху API кључа.', - dismiss: 'Затвори', - keepKeyPrivate: 'Чувајте кључ приватним.', - keyPrivateDescription: 'Овај кључ даје MCP-у приступ вашем садржају. Не делите га са другима!', - lastUsed: 'Последњи пут коришћено', - manageAPIKeys: 'Управљај API кључевима', - mcp: 'MCP', - noAPIKeys: 'Нема API кључева', - operations: 'Операције', - overrideAccess: 'Заобиђи контролу приступа', - overrideAccessDescription: 'Када је означено, овај кључ заобилази Payload контролу приступа при свакој операцији. Оставите неозначено осим ако имате конкретан разлог.', - permissions: 'Дозволе', - permissionsDescription: 'Дозволите MCP клијентима приступ следећим колекцијама, алатима, ресурсима и промптовима.', - prompts: 'Промптови', - resources: 'Ресурси', - server: 'Сервер', - title: 'Наслов', - titleDescription: 'Користан надимак за API кључ.', - tools: 'Алати', - userDescription: 'Корисник у чије име ће MCP деловати.', - }, -} - -export const rs: PluginLanguage = { - dateFNSKey: 'rs', - translations: rsTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/rsLatin.ts b/packages/plugin-mcp/src/translations/languages/rsLatin.ts deleted file mode 100644 index 785d1ce8b7a..00000000000 --- a/packages/plugin-mcp/src/translations/languages/rsLatin.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const rsLatinTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API ključevi kontrolišu kojim kolekcijama, resursima, alatima i promptovima MCP klijenti mogu da pristupe.', - apiKeys: 'API ključevi', - authentication: 'Autentifikacija', - description: 'Opis', - descriptionDescription: 'Opišite svrhu API ključa.', - dismiss: 'Zatvori', - keepKeyPrivate: 'Čuvajte ključ privatnim.', - keyPrivateDescription: 'Ovaj ključ daje MCP-u pristup vašem sadržaju. Ne delite ga sa drugima!', - lastUsed: 'Poslednji put korišćeno', - manageAPIKeys: 'Upravljaj API ključevima', - mcp: 'MCP', - noAPIKeys: 'Nema API ključeva', - operations: 'Operacije', - overrideAccess: 'Zaobiđi kontrolu pristupa', - overrideAccessDescription: 'Kada je označeno, ovaj ključ zaobilazi Payload kontrolu pristupa pri svakoj operaciji. Ostavite neoznačeno osim ako imate konkretan razlog.', - permissions: 'Dozvole', - permissionsDescription: 'Dozvolite MCP klijentima pristup sledećim kolekcijama, alatima, resursima i promptovima.', - prompts: 'Promptovi', - resources: 'Resursi', - server: 'Server', - title: 'Naslov', - titleDescription: 'Koristan nadimak za API ključ.', - tools: 'Alati', - userDescription: 'Korisnik u čije ime će MCP delovati.', - }, -} - -export const rsLatin: PluginLanguage = { - dateFNSKey: 'rs-Latin', - translations: rsLatinTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ru.ts b/packages/plugin-mcp/src/translations/languages/ru.ts deleted file mode 100644 index 166fc3fb7cd..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ru.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const ruTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-ключи управляют тем, к каким коллекциям, ресурсам, инструментам и промптам могут получать доступ MCP-клиенты.', - apiKeys: 'API-ключи', - authentication: 'Аутентификация', - description: 'Описание', - descriptionDescription: 'Опишите назначение API-ключа.', - dismiss: 'Закрыть', - keepKeyPrivate: 'Храните ключ в секрете.', - keyPrivateDescription: 'Этот ключ дает MCP доступ к вашему контенту. Не передавайте его другим!', - lastUsed: 'Последнее использование', - manageAPIKeys: 'Управлять API-ключами', - mcp: 'MCP', - noAPIKeys: 'Нет API-ключей', - operations: 'Операции', - overrideAccess: 'Переопределить контроль доступа', - overrideAccessDescription: 'Если включено, этот ключ обходит контроль доступа Payload при каждой операции. Оставьте выключенным, если нет конкретной причины.', - permissions: 'Разрешения', - permissionsDescription: 'Разрешите MCP-клиентам доступ к следующим коллекциям, инструментам, ресурсам и промптам.', - prompts: 'Промпты', - resources: 'Ресурсы', - server: 'Сервер', - title: 'Заголовок', - titleDescription: 'Удобное имя для API-ключа.', - tools: 'Инструменты', - userDescription: 'Пользователь, от имени которого будет действовать MCP.', - }, -} - -export const ru: PluginLanguage = { - dateFNSKey: 'ru', - translations: ruTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/sk.ts b/packages/plugin-mcp/src/translations/languages/sk.ts deleted file mode 100644 index 1d2b9429332..00000000000 --- a/packages/plugin-mcp/src/translations/languages/sk.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const skTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Kľúče API určujú, ku ktorým kolekciám, zdrojom, nástrojom a promptom majú klienti MCP prístup.', - apiKeys: 'Kľúče API', - authentication: 'Overenie', - description: 'Popis', - descriptionDescription: 'Opíšte účel kľúča API.', - dismiss: 'Zavrieť', - keepKeyPrivate: 'Udržujte svoj kľúč v súkromí.', - keyPrivateDescription: 'Tento kľúč dáva MCP prístup k vášmu obsahu. Nezdieľajte ho s ostatnými!', - lastUsed: 'Naposledy použité', - manageAPIKeys: 'Spravovať kľúče API', - mcp: 'MCP', - noAPIKeys: 'Žiadne kľúče API', - operations: 'Operácie', - overrideAccess: 'Prepísať riadenie prístupu', - overrideAccessDescription: 'Ak je zaškrtnuté, tento kľúč obíde riadenie prístupu Payload pri každej operácii. Nechajte nezaškrtnuté, pokiaľ nemáte konkrétny dôvod.', - permissions: 'Oprávnenia', - permissionsDescription: 'Povoľte klientom MCP prístup k nasledujúcim kolekciám, nástrojom, zdrojom a promptom.', - prompts: 'Prompty', - resources: 'Zdroje', - server: 'Server', - title: 'Názov', - titleDescription: 'Užitočná prezývka pre kľúč API.', - tools: 'Nástroje', - userDescription: 'Používateľ, za ktorého bude MCP konať.', - }, -} - -export const sk: PluginLanguage = { - dateFNSKey: 'sk', - translations: skTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/sl.ts b/packages/plugin-mcp/src/translations/languages/sl.ts deleted file mode 100644 index bab9077e372..00000000000 --- a/packages/plugin-mcp/src/translations/languages/sl.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const slTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API ključi nadzorujejo, do katerih zbirk, virov, orodij in promptov lahko dostopajo odjemalci MCP.', - apiKeys: 'API ključi', - authentication: 'Preverjanje pristnosti', - description: 'Opis', - descriptionDescription: 'Opišite namen API ključa.', - dismiss: 'Zapri', - keepKeyPrivate: 'Ključ naj ostane zaseben.', - keyPrivateDescription: 'Ta ključ daje MCP dostop do vaše vsebine. Ne delite ga z drugimi!', - lastUsed: 'Nazadnje uporabljeno', - manageAPIKeys: 'Upravljaj API ključe', - mcp: 'MCP', - noAPIKeys: 'Ni API ključev', - operations: 'Operacije', - overrideAccess: 'Prepiši nadzor dostopa', - overrideAccessDescription: 'Ko je označeno, ta ključ obide Payloadov nadzor dostopa pri vsaki operaciji. Pustite neoznačeno, razen če imate poseben razlog.', - permissions: 'Dovoljenja', - permissionsDescription: 'Dovolite odjemalcem MCP dostop do naslednjih zbirk, orodij, virov in promptov.', - prompts: 'Prompti', - resources: 'Viri', - server: 'Strežnik', - title: 'Naslov', - titleDescription: 'Uporaben vzdevek za API ključ.', - tools: 'Orodja', - userDescription: 'Uporabnik, v imenu katerega bo MCP deloval.', - }, -} - -export const sl: PluginLanguage = { - dateFNSKey: 'sl-SI', - translations: slTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/sv.ts b/packages/plugin-mcp/src/translations/languages/sv.ts deleted file mode 100644 index 450752767f2..00000000000 --- a/packages/plugin-mcp/src/translations/languages/sv.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const svTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-nycklar styr vilka samlingar, resurser, verktyg och prompter MCP-klienter kan komma åt.', - apiKeys: 'API-nycklar', - authentication: 'Autentisering', - description: 'Beskrivning', - descriptionDescription: 'Beskriv syftet med API-nyckeln.', - dismiss: 'Stäng', - keepKeyPrivate: 'Håll din nyckel privat.', - keyPrivateDescription: 'Den här nyckeln ger MCP åtkomst till ditt innehåll. Dela den inte med andra!', - lastUsed: 'Senast använd', - manageAPIKeys: 'Hantera API-nycklar', - mcp: 'MCP', - noAPIKeys: 'Inga API-nycklar', - operations: 'Åtgärder', - overrideAccess: 'Åsidosätt åtkomstkontroll', - overrideAccessDescription: 'När detta är markerat kringgår nyckeln Payloads åtkomstkontroll för varje åtgärd. Lämna avmarkerat om du inte har en specifik anledning.', - permissions: 'Behörigheter', - permissionsDescription: 'Tillåt MCP-klienter att komma åt följande samlingar, verktyg, resurser och prompter.', - prompts: 'Prompter', - resources: 'Resurser', - server: 'Server', - title: 'Titel', - titleDescription: 'Ett användbart smeknamn för API-nyckeln.', - tools: 'Verktyg', - userDescription: 'Användaren som MCP kommer att agera som.', - }, -} - -export const sv: PluginLanguage = { - dateFNSKey: 'sv', - translations: svTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/ta.ts b/packages/plugin-mcp/src/translations/languages/ta.ts deleted file mode 100644 index 0c696676a2c..00000000000 --- a/packages/plugin-mcp/src/translations/languages/ta.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const taTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'MCP கிளையன்ட்கள் எந்த collections, resources, tools மற்றும் prompts-ஐ அணுகலாம் என்பதை API விசைகள் கட்டுப்படுத்துகின்றன.', - apiKeys: 'API விசைகள்', - authentication: 'அங்கீகாரம்', - description: 'விளக்கம்', - descriptionDescription: 'API விசையின் நோக்கத்தை விளக்குங்கள்.', - dismiss: 'மூடு', - keepKeyPrivate: 'உங்கள் விசையை தனிப்பட்டதாக வைத்திருங்கள்.', - keyPrivateDescription: 'இந்த விசை MCP-க்கு உங்கள் உள்ளடக்கத்தை அணுக அனுமதிக்கிறது. இதை பிறருடன் பகிர வேண்டாம்!', - lastUsed: 'கடைசியாக பயன்படுத்தியது', - manageAPIKeys: 'API விசைகளை நிர்வகி', - mcp: 'MCP', - noAPIKeys: 'API விசைகள் இல்லை', - operations: 'செயல்பாடுகள்', - overrideAccess: 'அணுகல் கட்டுப்பாட்டை மீறு', - overrideAccessDescription: 'இது தேர்ந்தெடுக்கப்பட்டால், இந்த விசை மேற்கொள்ளும் ஒவ்வொரு செயல்பாட்டிலும் Payload அணுகல் கட்டுப்பாட்டை மீறும். குறிப்பிட்ட காரணம் இல்லையெனில் தேர்வு செய்ய வேண்டாம்.', - permissions: 'அனுமதிகள்', - permissionsDescription: 'MCP கிளையன்ட்களுக்கு பின்வரும் collections, tools, resources மற்றும் prompts-ஐ அணுக அனுமதிக்கவும்.', - prompts: 'Prompts', - resources: 'Resources', - server: 'சேவையகம்', - title: 'தலைப்பு', - titleDescription: 'API விசைக்கு உதவும் ஒரு குறுநாமம்.', - tools: 'Tools', - userDescription: 'MCP செயல்படும் பயனர்.', - }, -} - -export const ta: PluginLanguage = { - dateFNSKey: 'ta', - translations: taTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/th.ts b/packages/plugin-mcp/src/translations/languages/th.ts deleted file mode 100644 index a4a286a138a..00000000000 --- a/packages/plugin-mcp/src/translations/languages/th.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const thTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'คีย์ API ควบคุมว่าลูกค้า MCP สามารถเข้าถึงคอลเลกชัน ทรัพยากร เครื่องมือ และพรอมป์ใดได้บ้าง', - apiKeys: 'คีย์ API', - authentication: 'การยืนยันตัวตน', - description: 'คำอธิบาย', - descriptionDescription: 'อธิบายวัตถุประสงค์ของคีย์ API', - dismiss: 'ปิด', - keepKeyPrivate: 'เก็บคีย์ของคุณไว้เป็นความลับ', - keyPrivateDescription: 'คีย์นี้ให้ MCP เข้าถึงเนื้อหาของคุณ อย่าแชร์กับผู้อื่น!', - lastUsed: 'ใช้ล่าสุด', - manageAPIKeys: 'จัดการคีย์ API', - mcp: 'MCP', - noAPIKeys: 'ไม่มีคีย์ API', - operations: 'การดำเนินการ', - overrideAccess: 'ข้ามการควบคุมการเข้าถึง', - overrideAccessDescription: 'เมื่อเลือก คีย์นี้จะข้ามการควบคุมการเข้าถึงของ Payload ในทุกการดำเนินการ เว้นไว้หากไม่มีเหตุผลเฉพาะ', - permissions: 'สิทธิ์', - permissionsDescription: 'อนุญาตให้ลูกค้า MCP เข้าถึงคอลเลกชัน เครื่องมือ ทรัพยากร และพรอมป์ต่อไปนี้', - prompts: 'พรอมป์', - resources: 'ทรัพยากร', - server: 'เซิร์ฟเวอร์', - title: 'ชื่อ', - titleDescription: 'ชื่อเล่นที่ช่วยจำสำหรับคีย์ API', - tools: 'เครื่องมือ', - userDescription: 'ผู้ใช้ที่ MCP จะดำเนินการแทน', - }, -} - -export const th: PluginLanguage = { - dateFNSKey: 'th', - translations: thTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/tr.ts b/packages/plugin-mcp/src/translations/languages/tr.ts deleted file mode 100644 index 2796948f858..00000000000 --- a/packages/plugin-mcp/src/translations/languages/tr.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const trTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API anahtarları, MCP istemcilerinin hangi koleksiyonlara, kaynaklara, araçlara ve promptlara erişebileceğini kontrol eder.', - apiKeys: 'API anahtarları', - authentication: 'Kimlik doğrulama', - description: 'Açıklama', - descriptionDescription: 'API anahtarının amacını açıklayın.', - dismiss: 'Kapat', - keepKeyPrivate: 'Anahtarınızı gizli tutun.', - keyPrivateDescription: 'Bu anahtar MCP’ye içeriğinize erişim verir. Başkalarıyla paylaşmayın!', - lastUsed: 'Son kullanım', - manageAPIKeys: 'API anahtarlarını yönet', - mcp: 'MCP', - noAPIKeys: 'API anahtarı yok', - operations: 'İşlemler', - overrideAccess: 'Erişim kontrolünü geçersiz kıl', - overrideAccessDescription: 'İşaretlendiğinde bu anahtar, gerçekleştirdiği her işlemde Payload erişim kontrolünü atlar. Belirli bir nedeniniz yoksa işaretlemeyin.', - permissions: 'İzinler', - permissionsDescription: 'MCP istemcilerinin aşağıdaki koleksiyonlara, araçlara, kaynaklara ve promptlara erişmesine izin verin.', - prompts: 'Promptlar', - resources: 'Kaynaklar', - server: 'Sunucu', - title: 'Başlık', - titleDescription: 'API anahtarı için kullanışlı bir takma ad.', - tools: 'Araçlar', - userDescription: 'MCP’nin adına işlem yapacağı kullanıcı.', - }, -} - -export const tr: PluginLanguage = { - dateFNSKey: 'tr', - translations: trTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/uk.ts b/packages/plugin-mcp/src/translations/languages/uk.ts deleted file mode 100644 index 2e02c1066b1..00000000000 --- a/packages/plugin-mcp/src/translations/languages/uk.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const ukTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API-ключі керують тим, до яких колекцій, ресурсів, інструментів і промптів можуть мати доступ MCP-клієнти.', - apiKeys: 'API-ключі', - authentication: 'Автентифікація', - description: 'Опис', - descriptionDescription: 'Опишіть призначення API-ключа.', - dismiss: 'Закрити', - keepKeyPrivate: 'Зберігайте ключ приватним.', - keyPrivateDescription: 'Цей ключ надає MCP доступ до вашого контенту. Не діліться ним з іншими!', - lastUsed: 'Останнє використання', - manageAPIKeys: 'Керувати API-ключами', - mcp: 'MCP', - noAPIKeys: 'Немає API-ключів', - operations: 'Операції', - overrideAccess: 'Перевизначити контроль доступу', - overrideAccessDescription: 'Якщо увімкнено, цей ключ обходить контроль доступу Payload під час кожної операції. Залиште вимкненим, якщо немає конкретної причини.', - permissions: 'Дозволи', - permissionsDescription: 'Дозвольте MCP-клієнтам доступ до таких колекцій, інструментів, ресурсів і промптів.', - prompts: 'Промпти', - resources: 'Ресурси', - server: 'Сервер', - title: 'Назва', - titleDescription: 'Зручна назва для API-ключа.', - tools: 'Інструменти', - userDescription: 'Користувач, від імені якого діятиме MCP.', - }, -} - -export const uk: PluginLanguage = { - dateFNSKey: 'uk', - translations: ukTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/vi.ts b/packages/plugin-mcp/src/translations/languages/vi.ts deleted file mode 100644 index fed0fd4766f..00000000000 --- a/packages/plugin-mcp/src/translations/languages/vi.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const viTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'Khóa API kiểm soát các bộ sưu tập, tài nguyên, công cụ và prompt mà client MCP có thể truy cập.', - apiKeys: 'Khóa API', - authentication: 'Xác thực', - description: 'Mô tả', - descriptionDescription: 'Mô tả mục đích của khóa API.', - dismiss: 'Đóng', - keepKeyPrivate: 'Giữ khóa của bạn riêng tư.', - keyPrivateDescription: 'Khóa này cấp cho MCP quyền truy cập nội dung của bạn. Đừng chia sẻ với người khác!', - lastUsed: 'Lần dùng cuối', - manageAPIKeys: 'Quản lý khóa API', - mcp: 'MCP', - noAPIKeys: 'Không có khóa API', - operations: 'Thao tác', - overrideAccess: 'Ghi đè kiểm soát truy cập', - overrideAccessDescription: 'Khi bật, khóa này bỏ qua kiểm soát truy cập của Payload trong mọi thao tác. Hãy để tắt trừ khi bạn có lý do cụ thể.', - permissions: 'Quyền', - permissionsDescription: 'Cho phép client MCP truy cập các bộ sưu tập, công cụ, tài nguyên và prompt sau.', - prompts: 'Prompt', - resources: 'Tài nguyên', - server: 'Máy chủ', - title: 'Tiêu đề', - titleDescription: 'Tên gợi nhớ hữu ích cho khóa API.', - tools: 'Công cụ', - userDescription: 'Người dùng mà MCP sẽ đại diện để hành động.', - }, -} - -export const vi: PluginLanguage = { - dateFNSKey: 'vi', - translations: viTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/zh.ts b/packages/plugin-mcp/src/translations/languages/zh.ts deleted file mode 100644 index 5013e98af33..00000000000 --- a/packages/plugin-mcp/src/translations/languages/zh.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const zhTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API 密钥控制 MCP 客户端可以访问哪些集合、资源、工具和提示词。', - apiKeys: 'API 密钥', - authentication: '身份验证', - description: '描述', - descriptionDescription: '描述 API 密钥的用途。', - dismiss: '关闭', - keepKeyPrivate: '请妥善保管你的密钥。', - keyPrivateDescription: '此密钥会让 MCP 访问你的内容。不要与他人共享!', - lastUsed: '上次使用', - manageAPIKeys: '管理 API 密钥', - mcp: 'MCP', - noAPIKeys: '没有 API 密钥', - operations: '操作', - overrideAccess: '覆盖访问控制', - overrideAccessDescription: '启用后,此密钥执行的每个操作都会绕过 Payload 访问控制。除非有明确原因,否则请保持关闭。', - permissions: '权限', - permissionsDescription: '允许 MCP 客户端访问以下集合、工具、资源和提示词。', - prompts: '提示词', - resources: '资源', - server: '服务器', - title: '标题', - titleDescription: 'API 密钥的易识别名称。', - tools: '工具', - userDescription: 'MCP 将代表其操作的用户。', - }, -} - -export const zh: PluginLanguage = { - dateFNSKey: 'zh-CN', - translations: zhTranslations, -} diff --git a/packages/plugin-mcp/src/translations/languages/zhTw.ts b/packages/plugin-mcp/src/translations/languages/zhTw.ts deleted file mode 100644 index 5ca1a673eb3..00000000000 --- a/packages/plugin-mcp/src/translations/languages/zhTw.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { PluginLanguage } from '../types.js' - -export const zhTwTranslations = { - 'plugin-mcp': { - apiKeyDescription: 'API 金鑰控制 MCP 用戶端可以存取哪些集合、資源、工具和提示詞。', - apiKeys: 'API 金鑰', - authentication: '驗證', - description: '描述', - descriptionDescription: '描述 API 金鑰的用途。', - dismiss: '關閉', - keepKeyPrivate: '請妥善保管你的金鑰。', - keyPrivateDescription: '此金鑰會讓 MCP 存取你的內容。不要與他人分享!', - lastUsed: '上次使用', - manageAPIKeys: '管理 API 金鑰', - mcp: 'MCP', - noAPIKeys: '沒有 API 金鑰', - operations: '操作', - overrideAccess: '覆寫存取控制', - overrideAccessDescription: '啟用後,此金鑰執行的每個操作都會略過 Payload 存取控制。除非有明確原因,否則請保持關閉。', - permissions: '權限', - permissionsDescription: '允許 MCP 用戶端存取以下集合、工具、資源和提示詞。', - prompts: '提示詞', - resources: '資源', - server: '伺服器', - title: '標題', - titleDescription: 'API 金鑰的易識別名稱。', - tools: '工具', - userDescription: 'MCP 將代表其操作的使用者。', - }, -} - -export const zhTw: PluginLanguage = { - dateFNSKey: 'zh-TW', - translations: zhTwTranslations, -} diff --git a/packages/plugin-mcp/src/translations/types.ts b/packages/plugin-mcp/src/translations/types.ts deleted file mode 100644 index 41a2e1a304d..00000000000 --- a/packages/plugin-mcp/src/translations/types.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { Language } from '@payloadcms/translations' - -import type { enTranslations } from './languages/en.js' - -export type PluginLanguage = Language<{ - 'plugin-mcp': { - apiKeyDescription: string - apiKeys: string - authentication: string - description: string - descriptionDescription: string - dismiss: string - keepKeyPrivate: string - keyPrivateDescription: string - lastUsed: string - manageAPIKeys: string - mcp: string - noAPIKeys: string - operations: string - overrideAccess: string - overrideAccessDescription: string - permissions: string - permissionsDescription: string - prompts: string - resources: string - server: string - title: string - titleDescription: string - tools: string - userDescription: string - } -}> - -export type PluginDefaultTranslationsObject = typeof enTranslations diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a3609c2d43e..d0ef88bd2ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1214,9 +1214,6 @@ importers: '@modelcontextprotocol/server': specifier: 2.0.0-alpha.2 version: 2.0.0-alpha.2(@cfworker/json-schema@4.1.1) - '@payloadcms/translations': - specifier: workspace:* - version: link:../translations tsx: specifier: 4.22.4 version: 4.22.4 @@ -1227,18 +1224,9 @@ importers: '@payloadcms/eslint-config': specifier: workspace:* version: link:../eslint-config - '@payloadcms/ui': - specifier: workspace:* - version: link:../ui - '@types/react': - specifier: 19.2.14 - version: 19.2.14 payload: specifier: workspace:* version: link:../payload - react: - specifier: 19.2.6 - version: 19.2.6 packages/plugin-multi-tenant: devDependencies: diff --git a/templates/blank/src/app/(payload)/admin/importMap.js b/templates/blank/src/app/(payload)/admin/importMap.js index 3faa7e5611d..5bc799b2014 100644 --- a/templates/blank/src/app/(payload)/admin/importMap.js +++ b/templates/blank/src/app/(payload)/admin/importMap.js @@ -1,7 +1,6 @@ import { NullField as NullField_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui' import { HierarchyField as HierarchyField_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc' import { HierarchyButton as HierarchyButton_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc' -import { AccessField as AccessField_210e1789eef737e0b4d9f054258f19bb } from '@payloadcms/plugin-mcp/client' import { FolderIcon as FolderIcon_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui' import { HierarchySidebarTabServer as HierarchySidebarTabServer_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc' import { TagIcon as TagIcon_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui' @@ -12,7 +11,6 @@ export const importMap = { '@payloadcms/ui#NullField': NullField_3817bf644402e67bfe6577f60ef982de, '@payloadcms/ui/rsc#HierarchyField': HierarchyField_ab83ff7e88da8d3530831f296ec4756a, '@payloadcms/ui/rsc#HierarchyButton': HierarchyButton_ab83ff7e88da8d3530831f296ec4756a, - '@payloadcms/plugin-mcp/client#AccessField': AccessField_210e1789eef737e0b4d9f054258f19bb, '@payloadcms/ui#FolderIcon': FolderIcon_3817bf644402e67bfe6577f60ef982de, '@payloadcms/ui/rsc#HierarchySidebarTabServer': HierarchySidebarTabServer_ab83ff7e88da8d3530831f296ec4756a, diff --git a/templates/blank/src/payload-types.ts b/templates/blank/src/payload-types.ts index 74cfee6bea4..6ae9d4b34f2 100644 --- a/templates/blank/src/payload-types.ts +++ b/templates/blank/src/payload-types.ts @@ -64,7 +64,6 @@ export type SupportedTimezones = export interface Config { auth: { users: UserAuthOperations; - 'payload-mcp-api-keys': PayloadMcpApiKeyAuthOperations; }; blocks: {}; collections: { @@ -72,7 +71,6 @@ export interface Config { media: Media; folders: Folder; tags: Tag; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -84,7 +82,6 @@ export interface Config { media: MediaSelect | MediaSelect; folders: FoldersSelect | FoldersSelect; tags: TagsSelect | TagsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -100,7 +97,7 @@ export interface Config { widgets: { collections: CollectionsWidget; }; - user: User | PayloadMcpApiKey; + user: User; jobs: { tasks: unknown; workflows: unknown; @@ -124,28 +121,6 @@ export interface UserAuthOperations { password: string; }; } -export interface PayloadMcpApiKeyAuthOperations { - forgotPassword: { - email: string; - password: string; - }; - login: { - email: string; - password: string; - }; - registerFirstUser: { - email: string; - password: string; - }; - unlock: { - email: string; - password: string; - }; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "users". - */ export interface User { id: string; updatedAt: string; @@ -214,53 +189,6 @@ export interface Tag { _h_slugPath?: string | null; _h_titlePath?: string | null; } -/** - * API keys control which collections, resources, tools, and prompts MCP clients can access - * - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - /** - * The user that the API key is associated with. - */ - user: string | User; - /** - * A useful label for the API key. - */ - label?: string | null; - /** - * The purpose of the API key. - */ - description?: string | null; - /** - * When checked, this key bypasses Payload access control on every operation it performs. Leave unchecked unless you have a specific reason. - */ - overrideAccess?: boolean | null; - /** - * Access for this API key — uncheck to revoke individual tools. - */ - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - updatedAt: string; - createdAt: string; - enableAPIKey?: boolean | null; - apiKey?: string | null; - apiKeyIndex?: string | null; - collection: 'payload-mcp-api-keys'; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv". - */ export interface PayloadKv { id: string; key: string; @@ -296,21 +224,12 @@ export interface PayloadLockedDocument { | ({ relationTo: 'tags'; value: string | Tag; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; - user: - | { - relationTo: 'users'; - value: string | User; - } - | { - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; - }; + user: { + relationTo: 'users'; + value: string | User; + }; updatedAt: string; createdAt: string; } @@ -320,15 +239,10 @@ export interface PayloadLockedDocument { */ export interface PayloadPreference { id: string; - user: - | { - relationTo: 'users'; - value: string | User; - } - | { - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; - }; + user: { + relationTo: 'users'; + value: string | User; + }; key?: string | null; value?: | { @@ -419,26 +333,6 @@ export interface TagsSelect { _h_slugPath?: T; _h_titlePath?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - user?: T; - label?: T; - description?: T; - overrideAccess?: T; - access?: T; - updatedAt?: T; - createdAt?: T; - enableAPIKey?: T; - apiKey?: T; - apiKeyIndex?: T; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv_select". - */ export interface PayloadKvSelect { key?: T; data?: T; @@ -496,4 +390,4 @@ export interface Auth { declare module 'payload' { export interface GeneratedTypes extends Config {} -} \ No newline at end of file +} diff --git a/test/_community/payload-types.ts b/test/_community/payload-types.ts index 035924b4ffd..f9d28be00b8 100644 --- a/test/_community/payload-types.ts +++ b/test/_community/payload-types.ts @@ -75,7 +75,6 @@ export type LexicalNodes_00871687 = | SerializedRelationshipNode< | 'posts' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -96,7 +95,6 @@ export interface Config { posts: Post; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -107,7 +105,6 @@ export interface Config { posts: PostsSelect | PostsSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -231,31 +228,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -291,10 +263,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -421,22 +389,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/a11y/payload-types.ts b/test/a11y/payload-types.ts index 2f0105351aa..ee8ecc31490 100644 --- a/test/a11y/payload-types.ts +++ b/test/a11y/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { posts: Post; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { posts: PostsSelect | PostsSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -208,31 +206,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -268,10 +241,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -398,22 +367,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/access-control/payload-types.ts b/test/access-control/payload-types.ts index 85c40adfda1..f17bbcf9503 100644 --- a/test/access-control/payload-types.ts +++ b/test/access-control/payload-types.ts @@ -117,7 +117,6 @@ export type LexicalNodes_74BE97BC = | 'where-cache-same' | 'where-cache-unique' | 'async-parent' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -175,7 +174,6 @@ export type LexicalNodes_3CC4B7D0 = | 'where-cache-same' | 'where-cache-unique' | 'async-parent' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -229,7 +227,6 @@ export interface Config { 'where-cache-same': WhereCacheSame; 'where-cache-unique': WhereCacheUnique; 'async-parent': AsyncParent; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -269,7 +266,6 @@ export interface Config { 'where-cache-same': WhereCacheSameSelect | WhereCacheSameSelect; 'where-cache-unique': WhereCacheUniqueSelect | WhereCacheUniqueSelect; 'async-parent': AsyncParentSelect | AsyncParentSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -968,31 +964,6 @@ export interface AsyncParent { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -1144,10 +1115,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'async-parent'; value: string | AsyncParent; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: @@ -1807,22 +1774,6 @@ export interface AsyncParentSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/admin-bar/payload-types.ts b/test/admin-bar/payload-types.ts index 1b2b57fe0d9..32b7c23e2ed 100644 --- a/test/admin-bar/payload-types.ts +++ b/test/admin-bar/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { posts: Post; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { posts: PostsSelect | PostsSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -201,31 +199,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -261,10 +234,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -391,22 +360,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/admin-root/payload-types.ts b/test/admin-root/payload-types.ts index 8d2aa6019f0..4a98d6a2872 100644 --- a/test/admin-root/payload-types.ts +++ b/test/admin-root/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { posts: Post; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { posts: PostsSelect | PostsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -159,31 +157,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -215,10 +188,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -294,22 +263,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/admin/payload-types.ts b/test/admin/payload-types.ts index 4728224ab8f..9498bc7fd6e 100644 --- a/test/admin/payload-types.ts +++ b/test/admin/payload-types.ts @@ -102,7 +102,6 @@ export type LexicalNodes_7DB35FFD = | 'virtuals' | 'no-timestamps' | 'localized' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -149,7 +148,6 @@ export interface Config { virtuals: Virtual; 'no-timestamps': NoTimestamp; localized: Localized; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -191,7 +189,6 @@ export interface Config { virtuals: VirtualsSelect | VirtualsSelect; 'no-timestamps': NoTimestampsSelect | NoTimestampsSelect; localized: LocalizedSelect | LocalizedSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -732,31 +729,6 @@ export interface Localized { createdAt: string; _status?: ('draft' | 'published') | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -916,10 +888,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'localized'; value: string | Localized; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1410,22 +1378,6 @@ export interface LocalizedSelect { createdAt?: T; _status?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/array-update/payload-types.ts b/test/array-update/payload-types.ts index fa210d2277b..b45c0d31d13 100644 --- a/test/array-update/payload-types.ts +++ b/test/array-update/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { arrays: Array; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { arrays: ArraysSelect | ArraysSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -167,31 +165,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -223,10 +196,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -314,22 +283,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/auth-basic/payload-types.ts b/test/auth-basic/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/auth-basic/payload-types.ts +++ b/test/auth-basic/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/auth/payload-types.ts b/test/auth/payload-types.ts index 10b664b540e..c43c6a19255 100644 --- a/test/auth/payload-types.ts +++ b/test/auth/payload-types.ts @@ -92,7 +92,6 @@ export type LexicalNodes_AAE6FCC0 = | 'public-users' | 'relationsCollection' | 'api-keys-with-field-read-access' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -117,7 +116,6 @@ export interface Config { 'public-users': PublicUser; relationsCollection: RelationsCollection; 'api-keys-with-field-read-access': ApiKeysWithFieldReadAccess; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -132,7 +130,6 @@ export interface Config { 'public-users': PublicUsersSelect | PublicUsersSelect; relationsCollection: RelationsCollectionSelect | RelationsCollectionSelect; 'api-keys-with-field-read-access': ApiKeysWithFieldReadAccessSelect | ApiKeysWithFieldReadAccessSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -424,31 +421,6 @@ export interface ApiKeysWithFieldReadAccess { apiKeyIndex?: string | null; collection: 'api-keys-with-field-read-access'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -500,10 +472,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'api-keys-with-field-read-access'; value: string | ApiKeysWithFieldReadAccess; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: @@ -737,22 +705,6 @@ export interface ApiKeysWithFieldReadAccessSelect { apiKey?: T; apiKeyIndex?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/benchmark-blocks/payload-types.ts b/test/benchmark-blocks/payload-types.ts index f6940f69138..ff3effa1685 100644 --- a/test/benchmark-blocks/payload-types.ts +++ b/test/benchmark-blocks/payload-types.ts @@ -76,7 +76,6 @@ export type LexicalNodes_9626C4EE = | 'posts' | 'pages' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -699,7 +698,6 @@ export interface Config { pages: Page; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -711,7 +709,6 @@ export interface Config { pages: PagesSelect | PagesSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -35041,31 +35038,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -35105,10 +35077,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -35844,22 +35812,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/buildConfigWithDefaults.ts b/test/buildConfigWithDefaults.ts index 2b5418f1ad1..a85ea58b496 100644 --- a/test/buildConfigWithDefaults.ts +++ b/test/buildConfigWithDefaults.ts @@ -175,9 +175,7 @@ export async function buildConfigWithDefaults( } // Auto-add the MCP plugin so every test suite exercises it. Suites that need - // to configure it explicitly add their own `mcpPlugin({...})` call. The - // plugin itself adds a default `users` collection when needed so its own - // auth-enabled `payload-mcp-api-keys` doesn't end up as `admin.user`. + // to configure it explicitly add their own `mcpPlugin({...})` call. const hasMcpPlugin = (config.plugins ?? []).some((p) => p.slug === '@payloadcms/plugin-mcp') if (!hasMcpPlugin) { config.plugins = [...(config.plugins ?? []), mcpPlugin({})] diff --git a/test/bulk-edit/payload-types.ts b/test/bulk-edit/payload-types.ts index 8749e73a261..82df88f2084 100644 --- a/test/bulk-edit/payload-types.ts +++ b/test/bulk-edit/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { posts: Post; tabs: Tab; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { posts: PostsSelect | PostsSelect; tabs: TabsSelect | TabsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -215,31 +213,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -275,10 +248,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -417,22 +386,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/collections-graphql/payload-types.ts b/test/collections-graphql/payload-types.ts index 402061d7cc3..e6899a2a4f2 100644 --- a/test/collections-graphql/payload-types.ts +++ b/test/collections-graphql/payload-types.ts @@ -80,7 +80,6 @@ export interface Config { 'cyclical-relationship': CyclicalRelationship; media: Media; sort: Sort; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -101,7 +100,6 @@ export interface Config { 'cyclical-relationship': CyclicalRelationshipSelect | CyclicalRelationshipSelect; media: MediaSelect | MediaSelect; sort: SortSelect | SortSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -353,31 +351,6 @@ export interface Sort { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -453,10 +426,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'sort'; value: string | Sort; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -689,22 +658,6 @@ export interface SortSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/collections-rest/payload-types.ts b/test/collections-rest/payload-types.ts index 3f18e0192a4..5db3336daa5 100644 --- a/test/collections-rest/payload-types.ts +++ b/test/collections-rest/payload-types.ts @@ -79,7 +79,6 @@ export interface Config { 'disabled-bulk-delete-docs': DisabledBulkDeleteDoc; 'large-documents': LargeDocument; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -99,7 +98,6 @@ export interface Config { 'disabled-bulk-delete-docs': DisabledBulkDeleteDocsSelect | DisabledBulkDeleteDocsSelect; 'large-documents': LargeDocumentsSelect | LargeDocumentsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -319,31 +317,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -415,10 +388,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -613,22 +582,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/config/payload-types.ts b/test/config/payload-types.ts index 19a56ac68e1..94b1e68a6cb 100644 --- a/test/config/payload-types.ts +++ b/test/config/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { pages: Page; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { pages: PagesSelect | PagesSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -170,31 +168,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -226,10 +199,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -316,22 +285,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/custom-graphql/payload-types.ts b/test/custom-graphql/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/custom-graphql/payload-types.ts +++ b/test/custom-graphql/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/dashboard/payload-types.ts b/test/dashboard/payload-types.ts index 34876dbf8f4..f1555b450e4 100644 --- a/test/dashboard/payload-types.ts +++ b/test/dashboard/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { revenue: Revenue; events: Event; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -83,7 +82,6 @@ export interface Config { revenue: RevenueSelect | RevenueSelect; events: EventsSelect | EventsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -198,31 +196,6 @@ export interface Event { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +235,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -373,22 +342,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/database/payload-types.ts b/test/database/payload-types.ts index 32e52ce348a..13b0bc6834d 100644 --- a/test/database/payload-types.ts +++ b/test/database/payload-types.ts @@ -112,7 +112,6 @@ export type LexicalNodes_680F881F = | 'virtual-linked-roles' | 'virtual-linked-projects' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -152,7 +151,6 @@ export interface Config { 'virtual-linked-roles': VirtualLinkedRole; 'virtual-linked-projects': VirtualLinkedProject; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -191,7 +189,6 @@ export interface Config { 'virtual-linked-roles': VirtualLinkedRolesSelect | VirtualLinkedRolesSelect; 'virtual-linked-projects': VirtualLinkedProjectsSelect | VirtualLinkedProjectsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -837,31 +834,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -993,10 +965,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1567,22 +1535,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/dataloader/payload-types.ts b/test/dataloader/payload-types.ts index e7c90733dd7..ef63e9d6637 100644 --- a/test/dataloader/payload-types.ts +++ b/test/dataloader/payload-types.ts @@ -87,7 +87,6 @@ export type LexicalNodes_5AC9F469 = | 'items' | 'itemTags' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -112,7 +111,6 @@ export interface Config { items: Item; itemTags: ItemTag; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -127,7 +125,6 @@ export interface Config { items: ItemsSelect | ItemsSelect; itemTags: ItemTagsSelect | ItemTagsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -257,31 +254,6 @@ export interface ItemTag { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -333,10 +305,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -461,22 +429,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/email-nodemailer/payload-types.ts b/test/email-nodemailer/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/email-nodemailer/payload-types.ts +++ b/test/email-nodemailer/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/email-resend/payload-types.ts b/test/email-resend/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/email-resend/payload-types.ts +++ b/test/email-resend/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/email/payload-types.ts b/test/email/payload-types.ts index 28f5014651b..e735d40c129 100644 --- a/test/email/payload-types.ts +++ b/test/email/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { posts: Post; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { posts: PostsSelect | PostsSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -206,31 +204,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -266,10 +239,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -397,22 +366,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/endpoints/payload-types.ts b/test/endpoints/payload-types.ts index a533c771d1c..55793f1bc96 100644 --- a/test/endpoints/payload-types.ts +++ b/test/endpoints/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { endpoints: Endpoint; 'no-endpoints': NoEndpoint; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { endpoints: EndpointsSelect | EndpointsSelect; 'no-endpoints': NoEndpointsSelect | NoEndpointsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -172,31 +170,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -232,10 +205,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -319,22 +288,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/evals/payload-types.ts b/test/evals/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/evals/payload-types.ts +++ b/test/evals/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/field-error-states/payload-types.ts b/test/field-error-states/payload-types.ts index fa192dde29e..fd95b4bce57 100644 --- a/test/field-error-states/payload-types.ts +++ b/test/field-error-states/payload-types.ts @@ -85,7 +85,6 @@ export type LexicalNodes_9326F794 = | 'prev-value' | 'prev-value-relation' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -106,7 +105,6 @@ export interface Config { 'prev-value': PrevValue; 'prev-value-relation': PrevValueRelation; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -122,7 +120,6 @@ export interface Config { 'prev-value': PrevValueSelect | PrevValueSelect; 'prev-value-relation': PrevValueRelationSelect | PrevValueRelationSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -447,31 +444,6 @@ export interface PrevValueRelation { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -527,10 +499,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -809,22 +777,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/field-paths/payload-types.ts b/test/field-paths/payload-types.ts index 25880ecfb6d..ec46b77d1ab 100644 --- a/test/field-paths/payload-types.ts +++ b/test/field-paths/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { 'field-paths': FieldPath; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { 'field-paths': FieldPathsSelect | FieldPathsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -622,31 +620,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -678,10 +651,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -844,22 +813,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/field-perf/payload-types.ts b/test/field-perf/payload-types.ts index 44ace3a2d0c..876df30db45 100644 --- a/test/field-perf/payload-types.ts +++ b/test/field-perf/payload-types.ts @@ -87,7 +87,6 @@ export type LexicalNodes_F8A02B48 = | SerializedRelationshipNode< | 'blocks-collection' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -102,7 +101,6 @@ export interface Config { collections: { 'blocks-collection': BlocksCollection; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -112,7 +110,6 @@ export interface Config { collectionsSelect: { 'blocks-collection': BlocksCollectionSelect | BlocksCollectionSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -206,31 +203,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +234,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -359,22 +327,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/fields-relationship/payload-types.ts b/test/fields-relationship/payload-types.ts index 08ec3946884..bf9a904b6ba 100644 --- a/test/fields-relationship/payload-types.ts +++ b/test/fields-relationship/payload-types.ts @@ -82,7 +82,6 @@ export interface Config { 'mixed-media': MixedMedia; 'versioned-relationship-field': VersionedRelationshipField; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -105,7 +104,6 @@ export interface Config { 'mixed-media': MixedMediaSelect | MixedMediaSelect; 'versioned-relationship-field': VersionedRelationshipFieldSelect | VersionedRelationshipFieldSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -414,31 +412,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -522,10 +495,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -748,22 +717,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/fields/payload-types.ts b/test/fields/payload-types.ts index cfb15576d95..b901ccdfca9 100644 --- a/test/fields/payload-types.ts +++ b/test/fields/payload-types.ts @@ -114,7 +114,6 @@ export type LexicalNodes_937A3078 = | 'uploads-multi-poly' | 'uploads-restricted' | 'ui-fields' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -167,7 +166,6 @@ export type LexicalNodes_313DC238 = | 'uploads-multi-poly' | 'uploads-restricted' | 'ui-fields' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -225,7 +223,6 @@ export interface Config { 'uploads-multi-poly': UploadsMultiPoly; 'uploads-restricted': UploadsRestricted; 'ui-fields': UiField; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -269,7 +266,6 @@ export interface Config { 'uploads-multi-poly': UploadsMultiPolySelect | UploadsMultiPolySelect; 'uploads-restricted': UploadsRestrictedSelect | UploadsRestrictedSelect; 'ui-fields': UiFieldsSelect | UiFieldsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -2049,31 +2045,6 @@ export interface UiField { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -2241,10 +2212,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'ui-fields'; value: string | UiField; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -3872,22 +3839,6 @@ export interface UiFieldsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/folders/payload-types.ts b/test/folders/payload-types.ts index cde5157ed23..319ce9a4672 100644 --- a/test/folders/payload-types.ts +++ b/test/folders/payload-types.ts @@ -72,7 +72,6 @@ export interface Config { media: Media; 'translated-labels': TranslatedLabel; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -89,7 +88,6 @@ export interface Config { media: MediaSelect | MediaSelect; 'translated-labels': TranslatedLabelsSelect | TranslatedLabelsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -239,31 +237,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -307,10 +280,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -432,22 +401,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/form-state/payload-types.ts b/test/form-state/payload-types.ts index ee7ad94fbae..bf1669ca7d6 100644 --- a/test/form-state/payload-types.ts +++ b/test/form-state/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { 'autosave-posts': AutosavePost; conditions: Condition; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -83,7 +82,6 @@ export interface Config { 'autosave-posts': AutosavePostsSelect | AutosavePostsSelect; conditions: ConditionsSelect | ConditionsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -232,31 +230,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -296,10 +269,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -439,22 +408,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/globals/payload-types.ts b/test/globals/payload-types.ts index 6a40453583e..c8fcc99d71b 100644 --- a/test/globals/payload-types.ts +++ b/test/globals/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -154,31 +152,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -206,10 +179,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -275,22 +244,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/graphql-schema-gen/payload-types.ts b/test/graphql-schema-gen/payload-types.ts index acdd553f97f..fd7ba351317 100644 --- a/test/graphql-schema-gen/payload-types.ts +++ b/test/graphql-schema-gen/payload-types.ts @@ -82,7 +82,6 @@ export interface Config { collection2: Collection2; 'no-graphql': NoGraphql; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -94,7 +93,6 @@ export interface Config { collection2: Collection2Select | Collection2Select; 'no-graphql': NoGraphqlSelect | NoGraphqlSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -228,31 +226,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -292,10 +265,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -441,22 +410,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/graphql/payload-types.ts b/test/graphql/payload-types.ts index a9c88ea300d..dc3188f6b1e 100644 --- a/test/graphql/payload-types.ts +++ b/test/graphql/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { posts: Post; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { posts: PostsSelect | PostsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -171,31 +169,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -227,10 +200,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -318,22 +287,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/group-by/payload-types.ts b/test/group-by/payload-types.ts index 68eb6da3fac..ba476e7256e 100644 --- a/test/group-by/payload-types.ts +++ b/test/group-by/payload-types.ts @@ -74,7 +74,6 @@ export interface Config { relationships: Relationship; 'no-groupable': NoGroupable; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -90,7 +89,6 @@ export interface Config { relationships: RelationshipsSelect | RelationshipsSelect; 'no-groupable': NoGroupableSelect | NoGroupableSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -288,31 +286,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -364,10 +337,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -589,22 +558,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/hierarchy/payload-types.ts b/test/hierarchy/payload-types.ts index 2fcbab8e640..79ec53cd80f 100644 --- a/test/hierarchy/payload-types.ts +++ b/test/hierarchy/payload-types.ts @@ -75,7 +75,6 @@ export interface Config { products: Product; regions: Region; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -91,7 +90,6 @@ export interface Config { products: ProductsSelect | ProductsSelect; regions: RegionsSelect | RegionsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -255,31 +253,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -335,10 +308,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -496,22 +465,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/hooks/payload-types.ts b/test/hooks/payload-types.ts index 1a32d5fd924..b804e7280b5 100644 --- a/test/hooks/payload-types.ts +++ b/test/hooks/payload-types.ts @@ -101,7 +101,6 @@ export type LexicalNodes_3CBD56AD = | 'value-hooks' | 'after-read' | 'override-access-hooks' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -135,7 +134,6 @@ export interface Config { 'value-hooks': ValueHook; 'after-read': AfterRead; 'override-access-hooks': OverrideAccessHook; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -161,7 +159,6 @@ export interface Config { 'value-hooks': ValueHooksSelect | ValueHooksSelect; 'after-read': AfterReadSelect | AfterReadSelect; 'override-access-hooks': OverrideAccessHooksSelect | OverrideAccessHooksSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -456,31 +453,6 @@ export interface OverrideAccessHook { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | HooksUser; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -576,10 +548,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'override-access-hooks'; value: string | OverrideAccessHook; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -852,22 +820,6 @@ export interface OverrideAccessHooksSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/i18n/payload-types.ts b/test/i18n/payload-types.ts index b1863e5a681..aafac989aa8 100644 --- a/test/i18n/payload-types.ts +++ b/test/i18n/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { collection1: Collection1; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { collection1: Collection1Select | Collection1Select; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -163,31 +161,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -219,10 +192,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -302,22 +271,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/joins/payload-types.ts b/test/joins/payload-types.ts index c9ad26dc32c..57f4ea4e9dc 100644 --- a/test/joins/payload-types.ts +++ b/test/joins/payload-types.ts @@ -93,7 +93,6 @@ export interface Config { 'example-posts': ExamplePost; folderPoly1: FolderPoly1; folderPoly2: FolderPoly2; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -185,7 +184,6 @@ export interface Config { 'example-posts': ExamplePostsSelect | ExamplePostsSelect; folderPoly1: FolderPoly1Select | FolderPoly1Select; folderPoly2: FolderPoly2Select | FolderPoly2Select; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -842,31 +840,6 @@ export interface FolderPoly2 { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -994,10 +967,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'folderPoly2'; value: string | FolderPoly2; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1414,22 +1383,6 @@ export interface FolderPoly2Select { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/kv/payload-types.ts b/test/kv/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/kv/payload-types.ts +++ b/test/kv/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/lexical-mdx/payload-types.ts b/test/lexical-mdx/payload-types.ts index bf574c8d7bd..da87c8d0c07 100644 --- a/test/lexical-mdx/payload-types.ts +++ b/test/lexical-mdx/payload-types.ts @@ -77,7 +77,6 @@ export type LexicalNodes_AE29B1B0 = | 'posts' | 'simple' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -109,7 +108,6 @@ export type LexicalNodes_E1F445FF = | 'posts' | 'simple' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -131,7 +129,6 @@ export interface Config { simple: Simple; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -143,7 +140,6 @@ export interface Config { simple: SimpleSelect | SimpleSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -282,31 +278,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -346,10 +317,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -494,22 +461,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/lexical/payload-types.ts b/test/lexical/payload-types.ts index 98c6057e383..028a7aef30f 100644 --- a/test/lexical/payload-types.ts +++ b/test/lexical/payload-types.ts @@ -103,7 +103,6 @@ export type LexicalNodes_5AC12460 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -189,7 +188,6 @@ export type LexicalNodes_2C8551FD = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -248,7 +246,6 @@ export type LexicalNodes_E507B1AE = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -305,7 +302,6 @@ export type LexicalNodes_7946FE5E = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -359,7 +355,6 @@ export type LexicalNodes_2B82BF4F = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -423,7 +418,6 @@ export type LexicalNodes_02CE3078 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -481,7 +475,6 @@ export type LexicalNodes_72D60A3E = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -531,7 +524,6 @@ export type LexicalNodes_EC568A9D = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -656,7 +648,6 @@ export type LexicalNodes_3E8FEE89 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -709,7 +700,6 @@ export type LexicalNodes_42C4EBEA = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -764,7 +754,6 @@ export type LexicalNodes_B7407628 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -819,7 +808,6 @@ export type LexicalNodes_C929D2DF = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -874,7 +862,6 @@ export type LexicalNodes_C20156B0 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -929,7 +916,6 @@ export type LexicalNodes_4514FA55 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -984,7 +970,6 @@ export type LexicalNodes_E3EDEE42 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1081,7 +1066,6 @@ export type LexicalNodes_D1F4FBEF = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1147,7 +1131,6 @@ export type LexicalNodes_419CE8C9 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1204,7 +1187,6 @@ export type LexicalNodes_54186730 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1259,7 +1241,6 @@ export type LexicalNodes_E2F8B3EA = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1316,7 +1297,6 @@ export type LexicalNodes_D7B0C859 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1376,7 +1356,6 @@ export type LexicalNodes_00DF9459 = | 'OnDemandOutsideForm' | 'lexical-custom-cell' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -1423,7 +1402,6 @@ export interface Config { OnDemandOutsideForm: OnDemandOutsideForm; 'lexical-custom-cell': LexicalCustomCell; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -1462,7 +1440,6 @@ export interface Config { OnDemandOutsideForm: OnDemandOutsideFormSelect | OnDemandOutsideFormSelect; 'lexical-custom-cell': LexicalCustomCellSelect | LexicalCustomCellSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -2099,31 +2076,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -2271,10 +2223,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -2820,22 +2768,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/live-preview/payload-types.ts b/test/live-preview/payload-types.ts index 22227ee3c49..a8d042afc2e 100644 --- a/test/live-preview/payload-types.ts +++ b/test/live-preview/payload-types.ts @@ -84,7 +84,6 @@ export type LexicalNodes_A6D73F5A = | 'static-url' | 'custom-live-preview' | 'conditional-url' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -120,7 +119,6 @@ export type LexicalNodes_850D1707 = | 'static-url' | 'custom-live-preview' | 'conditional-url' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -160,7 +158,6 @@ export type LexicalNodes_1A3BAFDD = | 'static-url' | 'custom-live-preview' | 'conditional-url' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -187,7 +184,6 @@ export interface Config { 'static-url': StaticUrl; 'custom-live-preview': CustomLivePreview; 'conditional-url': ConditionalUrl; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -207,7 +203,6 @@ export interface Config { 'static-url': StaticUrlSelect | StaticUrlSelect; 'custom-live-preview': CustomLivePreviewSelect | CustomLivePreviewSelect; 'conditional-url': ConditionalUrlSelect | ConditionalUrlSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -636,31 +631,6 @@ export interface ConditionalUrl { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -732,10 +702,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'conditional-url'; value: string | ConditionalUrl; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1396,22 +1362,6 @@ export interface ConditionalUrlSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/localization-rtl/payload-types.ts b/test/localization-rtl/payload-types.ts index 03b7016920e..fdd7e7c1870 100644 --- a/test/localization-rtl/payload-types.ts +++ b/test/localization-rtl/payload-types.ts @@ -87,7 +87,6 @@ export type LexicalNodes_4AD70FC8 = | SerializedRelationshipNode< | 'users' | 'posts' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -102,7 +101,6 @@ export interface Config { collections: { users: User; posts: Post; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -112,7 +110,6 @@ export interface Config { collectionsSelect: { users: UsersSelect | UsersSelect; posts: PostsSelect | PostsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -191,31 +188,6 @@ export interface Post { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -247,10 +219,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'posts'; value: string | Post; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -327,22 +295,6 @@ export interface PostsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/localization/payload-types.ts b/test/localization/payload-types.ts index 9c91eae18e3..9731253bdb1 100644 --- a/test/localization/payload-types.ts +++ b/test/localization/payload-types.ts @@ -103,7 +103,6 @@ export type LexicalNodes_B43B745B = | 'blocks-same-name' | 'localized-within-localized' | 'array-with-fallback-fields' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -144,7 +143,6 @@ export interface Config { 'blocks-same-name': BlocksSameName; 'localized-within-localized': LocalizedWithinLocalized; 'array-with-fallback-fields': ArrayWithFallbackField; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -175,7 +173,6 @@ export interface Config { 'blocks-same-name': BlocksSameNameSelect | BlocksSameNameSelect; 'localized-within-localized': LocalizedWithinLocalizedSelect | LocalizedWithinLocalizedSelect; 'array-with-fallback-fields': ArrayWithFallbackFieldsSelect | ArrayWithFallbackFieldsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -944,31 +941,6 @@ export interface ArrayWithFallbackField { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -1084,10 +1056,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'array-with-fallback-fields'; value: string | ArrayWithFallbackField; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1815,22 +1783,6 @@ export interface ArrayWithFallbackFieldsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/locked-documents/payload-types.ts b/test/locked-documents/payload-types.ts index f7b44f583e1..e7b99a9010f 100644 --- a/test/locked-documents/payload-types.ts +++ b/test/locked-documents/payload-types.ts @@ -93,7 +93,6 @@ export type LexicalNodes_58262B91 = | 'simple-with-versions' | 'tests' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -114,7 +113,6 @@ export interface Config { 'simple-with-versions': SimpleWithVersion; tests: Test; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -130,7 +128,6 @@ export interface Config { 'simple-with-versions': SimpleWithVersionsSelect | SimpleWithVersionsSelect; tests: TestsSelect | TestsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -288,31 +285,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -364,10 +336,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -509,22 +477,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/login-with-username/payload-types.ts b/test/login-with-username/payload-types.ts index a498ae08591..6dcd3851bb2 100644 --- a/test/login-with-username/payload-types.ts +++ b/test/login-with-username/payload-types.ts @@ -72,7 +72,6 @@ export interface Config { users: User; 'login-with-either': LoginWithEither; 'require-email': RequireEmail; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -83,7 +82,6 @@ export interface Config { users: UsersSelect | UsersSelect; 'login-with-either': LoginWithEitherSelect | LoginWithEitherSelect; 'require-email': RequireEmailSelect | RequireEmailSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -246,31 +244,6 @@ export interface RequireEmail { password?: string | null; collection: 'require-email'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -306,10 +279,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'require-email'; value: string | RequireEmail; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: @@ -440,22 +409,6 @@ export interface RequireEmailSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/migrations-cli/payload-types.ts b/test/migrations-cli/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/migrations-cli/payload-types.ts +++ b/test/migrations-cli/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/nested-fields/payload-types.ts b/test/nested-fields/payload-types.ts index 960074cb792..195701d66cf 100644 --- a/test/nested-fields/payload-types.ts +++ b/test/nested-fields/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { 'nested-fields': NestedField; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { 'nested-fields': NestedFieldsSelect | NestedFieldsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -213,31 +211,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -269,10 +242,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -436,22 +405,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/payload-cloud/payload-types.ts b/test/payload-cloud/payload-types.ts index c2febcabc33..70995d667ea 100644 --- a/test/payload-cloud/payload-types.ts +++ b/test/payload-cloud/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { documents: Document; media: Media; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { documents: DocumentsSelect | DocumentsSelect; media: MediaSelect | MediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -202,31 +200,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +235,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -391,22 +360,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-cloud-storage/payload-types.ts b/test/plugin-cloud-storage/payload-types.ts index 3de549ace30..9bd52c6f37b 100644 --- a/test/plugin-cloud-storage/payload-types.ts +++ b/test/plugin-cloud-storage/payload-types.ts @@ -77,7 +77,6 @@ export interface Config { 'restricted-media': RestrictedMedia; 'test-metadata': TestMetadatum; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -95,7 +94,6 @@ export interface Config { 'restricted-media': RestrictedMediaSelect | RestrictedMediaSelect; 'test-metadata': TestMetadataSelect | TestMetadataSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -384,31 +382,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -472,10 +445,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -766,22 +735,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-ecommerce/payload-types.ts b/test/plugin-ecommerce/payload-types.ts index d8398af764f..462137d50b6 100644 --- a/test/plugin-ecommerce/payload-types.ts +++ b/test/plugin-ecommerce/payload-types.ts @@ -82,7 +82,6 @@ export interface Config { carts: Cart; orders: Order; transactions: Transaction; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -107,7 +106,6 @@ export interface Config { carts: CartsSelect | CartsSelect; orders: OrdersSelect | OrdersSelect; transactions: TransactionsSelect | TransactionsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -451,31 +449,6 @@ export interface Transaction { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -539,10 +512,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'transactions'; value: string | Transaction; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -814,22 +783,6 @@ export interface TransactionsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-form-builder/payload-types.ts b/test/plugin-form-builder/payload-types.ts index 78ba1e4430e..ef994855a3f 100644 --- a/test/plugin-form-builder/payload-types.ts +++ b/test/plugin-form-builder/payload-types.ts @@ -76,7 +76,6 @@ export type LexicalNodes_47A9529B = | SerializedRelationshipNode< | 'pages' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -100,7 +99,6 @@ export interface Config { documents: Document; forms: Form; 'form-submissions': FormSubmission; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -114,7 +112,6 @@ export interface Config { documents: DocumentsSelect | DocumentsSelect; forms: FormsSelect | FormsSelect; 'form-submissions': FormSubmissionsSelect | FormSubmissionsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -549,31 +546,6 @@ export interface FormSubmission { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -621,10 +593,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'form-submissions'; value: string | FormSubmission; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -973,22 +941,6 @@ export interface FormSubmissionsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-import-export/payload-types.ts b/test/plugin-import-export/payload-types.ts index 6b0c0941ada..fe6d17171c5 100644 --- a/test/plugin-import-export/payload-types.ts +++ b/test/plugin-import-export/payload-types.ts @@ -106,7 +106,6 @@ export type LexicalNodes_47963D26 = | 'posts-with-field-hooks' | 'posts-with-column-map' | 'custom-id-pages' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-jobs' | 'payload-locked-documents' @@ -148,7 +147,6 @@ export interface Config { 'posts-with-hooks-import': PostsWithHooksImport; 'posts-with-field-hooks-import': PostsWithFieldHooksImport; 'posts-with-column-map-import': PostsWithColumnMapImport; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-jobs': PayloadJob; 'payload-locked-documents': PayloadLockedDocument; @@ -185,7 +183,6 @@ export interface Config { 'posts-with-hooks-import': PostsWithHooksImportSelect | PostsWithHooksImportSelect; 'posts-with-field-hooks-import': PostsWithFieldHooksImportSelect | PostsWithFieldHooksImportSelect; 'posts-with-column-map-import': PostsWithColumnMapImportSelect | PostsWithColumnMapImportSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-jobs': PayloadJobsSelect | PayloadJobsSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; @@ -1138,31 +1135,6 @@ export interface PostsWithColumnMapImport { focalX?: number | null; focalY?: number | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -1330,10 +1302,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'custom-id-pages'; value: string | CustomIdPage; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -2106,22 +2074,6 @@ export interface PostsWithColumnMapImportSelect { focalX?: T; focalY?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-mcp/config.ts b/test/plugin-mcp/config.ts index 7c35e1d65db..54d6c659c7b 100644 --- a/test/plugin-mcp/config.ts +++ b/test/plugin-mcp/config.ts @@ -79,15 +79,6 @@ export default buildConfigWithDefaults({ })(), mcpPlugin({ - overrideApiKeyCollection: (collection) => { - collection.fields.push({ - name: 'override', - type: 'text', - admin: { description: 'This field added by overrideApiKeyCollection' }, - defaultValue: 'This field added by overrideApiKeyCollection', - }) - return collection - }, collections: { users: { description: 'User accounts.', @@ -176,6 +167,12 @@ export default buildConfigWithDefaults({ verboseLogs: true, }, tools: { + hiddenTool: defineTool({ + access: () => false, + description: 'This tool should be hidden by its access callback', + }).handler(() => ({ + content: [{ type: 'text' as const, text: 'hidden' }], + })), diceRoll: defineTool({ description: 'Rolls a virtual dice with a specified number of sides', input: z.object({ diff --git a/test/plugin-multi-tenant/payload-types.ts b/test/plugin-multi-tenant/payload-types.ts index 952f95aadae..0bca0d2be53 100644 --- a/test/plugin-multi-tenant/payload-types.ts +++ b/test/plugin-multi-tenant/payload-types.ts @@ -83,7 +83,6 @@ export type LexicalNodes_68925DC9 = | 'multi-tenant-posts' | 'notTenanted' | 'folders' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -111,7 +110,6 @@ export interface Config { media: Media; notTenanted: NotTenanted; folders: Folder; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -133,7 +131,6 @@ export interface Config { media: MediaSelect | MediaSelect; notTenanted: NotTenantedSelect | NotTenantedSelect; folders: FoldersSelect | FoldersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -354,31 +351,6 @@ export interface Media { focalX?: number | null; focalY?: number | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -442,10 +414,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'folders'; value: string | Folder; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -639,22 +607,6 @@ export interface FoldersSelect { _h_slugPath?: T; _h_titlePath?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-nested-docs/payload-types.ts b/test/plugin-nested-docs/payload-types.ts index cf3cce3986f..7dfbffb38c7 100644 --- a/test/plugin-nested-docs/payload-types.ts +++ b/test/plugin-nested-docs/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { pages: Page; categories: Category; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { pages: PagesSelect | PagesSelect; categories: CategoriesSelect | CategoriesSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -194,31 +192,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -254,10 +227,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -363,22 +332,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-redirects/payload-types.ts b/test/plugin-redirects/payload-types.ts index fa2bac3c22a..02aa202574f 100644 --- a/test/plugin-redirects/payload-types.ts +++ b/test/plugin-redirects/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { users: User; pages: Page; redirects: Redirect; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { users: UsersSelect | UsersSelect; pages: PagesSelect | PagesSelect; redirects: RedirectsSelect | RedirectsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -178,31 +176,6 @@ export interface Redirect { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -238,10 +211,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'redirects'; value: string | Redirect; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -336,22 +305,6 @@ export interface RedirectsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-search/payload-types.ts b/test/plugin-search/payload-types.ts index bde63068082..2df2eda9f54 100644 --- a/test/plugin-search/payload-types.ts +++ b/test/plugin-search/payload-types.ts @@ -74,7 +74,6 @@ export interface Config { 'custom-ids-2': CustomIds2; 'filtered-locales': FilteredLocale; search: Search; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -89,7 +88,6 @@ export interface Config { 'custom-ids-2': CustomIds2Select | CustomIds2Select; 'filtered-locales': FilteredLocalesSelect | FilteredLocalesSelect; search: SearchSelect | SearchSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -245,31 +243,6 @@ export interface Search { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -321,10 +294,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'search'; value: string | Search; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -456,22 +425,6 @@ export interface SearchSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-sentry/payload-types.ts b/test/plugin-sentry/payload-types.ts index 9c1196c071d..c40ee1cf7c2 100644 --- a/test/plugin-sentry/payload-types.ts +++ b/test/plugin-sentry/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { posts: Post; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { posts: PostsSelect | PostsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -154,31 +152,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -210,10 +183,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -288,22 +257,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-seo/payload-types.ts b/test/plugin-seo/payload-types.ts index ca6c57abc47..5a6052eb3c3 100644 --- a/test/plugin-seo/payload-types.ts +++ b/test/plugin-seo/payload-types.ts @@ -81,7 +81,6 @@ export type LexicalNodes_FFFC944E = | 'users' | 'pages' | 'pagesWithImportedFields' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -98,7 +97,6 @@ export interface Config { pages: Page; media: Media; pagesWithImportedFields: PagesWithImportedField; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -110,7 +108,6 @@ export interface Config { pages: PagesSelect | PagesSelect; media: MediaSelect | MediaSelect; pagesWithImportedFields: PagesWithImportedFieldsSelect | PagesWithImportedFieldsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -243,31 +240,6 @@ export interface PagesWithImportedField { createdAt: string; _status?: ('draft' | 'published') | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -307,10 +279,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'pagesWithImportedFields'; value: string | PagesWithImportedField; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -443,22 +411,6 @@ export interface PagesWithImportedFieldsSelect { createdAt?: T; _status?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugin-stripe/payload-types.ts b/test/plugin-stripe/payload-types.ts index 5640b189600..0f3c211d0db 100644 --- a/test/plugin-stripe/payload-types.ts +++ b/test/plugin-stripe/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { users: User; products: Product; customers: Customer; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -82,7 +81,6 @@ export interface Config { users: UsersSelect | UsersSelect; products: ProductsSelect | ProductsSelect; customers: CustomersSelect | CustomersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -230,31 +228,6 @@ export interface Customer { password?: string | null; collection: 'customers'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -290,10 +263,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'customers'; value: string | Customer; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: @@ -424,22 +393,6 @@ export interface CustomersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/plugins/payload-types.ts b/test/plugins/payload-types.ts index 2bef5a57b70..bf2642d69c4 100644 --- a/test/plugins/payload-types.ts +++ b/test/plugins/payload-types.ts @@ -69,7 +69,6 @@ export interface Config { collections: { users: User; pages: Page; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -79,7 +78,6 @@ export interface Config { collectionsSelect: { users: UsersSelect | UsersSelect; pages: PagesSelect | PagesSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -154,31 +152,6 @@ export interface Page { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -210,10 +183,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'pages'; value: string | Page; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -288,22 +257,6 @@ export interface PagesSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/query-presets/payload-types.ts b/test/query-presets/payload-types.ts index 5ef2559be30..e76244c32b6 100644 --- a/test/query-presets/payload-types.ts +++ b/test/query-presets/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { posts: Post; users: User; 'default-columns': DefaultColumn; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -84,7 +83,6 @@ export interface Config { posts: PostsSelect | PostsSelect; users: UsersSelect | UsersSelect; 'default-columns': DefaultColumnsSelect | DefaultColumnsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -190,31 +188,6 @@ export interface DefaultColumn { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -246,10 +219,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'default-columns'; value: string | DefaultColumn; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -403,22 +372,6 @@ export interface DefaultColumnsSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/queues/payload-types.ts b/test/queues/payload-types.ts index 8e92816d8aa..c13b5c5b490 100644 --- a/test/queues/payload-types.ts +++ b/test/queues/payload-types.ts @@ -83,7 +83,6 @@ export type LexicalNodes_0E9BF36D = | 'posts' | 'simple' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-jobs' | 'payload-locked-documents' @@ -105,7 +104,6 @@ export interface Config { posts: Post; simple: Simple; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-jobs': PayloadJob; 'payload-locked-documents': PayloadLockedDocument; @@ -117,7 +115,6 @@ export interface Config { posts: PostsSelect | PostsSelect; simple: SimpleSelect | SimpleSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-jobs': PayloadJobsSelect | PayloadJobsSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; @@ -249,31 +246,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -461,10 +433,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -551,22 +519,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/relationships/payload-types.ts b/test/relationships/payload-types.ts index 267bf1111fd..b18e751bad7 100644 --- a/test/relationships/payload-types.ts +++ b/test/relationships/payload-types.ts @@ -89,7 +89,6 @@ export interface Config { items: Item; blocks: Block1; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -123,7 +122,6 @@ export interface Config { items: ItemsSelect | ItemsSelect; blocks: BlocksSelect | BlocksSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -523,31 +521,6 @@ export interface Some { blockName?: string | null; blockType: 'some'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -659,10 +632,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1002,22 +971,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/sdk/payload-types.ts b/test/sdk/payload-types.ts index dda11e95aa5..148a4ec28f4 100644 --- a/test/sdk/payload-types.ts +++ b/test/sdk/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { posts: Post; emails: Email; media: Media; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -83,7 +82,6 @@ export interface Config { posts: PostsSelect | PostsSelect; emails: EmailsSelect | EmailsSelect; media: MediaSelect | MediaSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -198,31 +196,6 @@ export interface Media { focalX?: number | null; focalY?: number | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +235,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'media'; value: string | Media; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -376,22 +345,6 @@ export interface MediaSelect { focalX?: T; focalY?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/select/payload-types.ts b/test/select/payload-types.ts index edddbac6795..4dd829039d2 100644 --- a/test/select/payload-types.ts +++ b/test/select/payload-types.ts @@ -86,7 +86,6 @@ export type LexicalNodes_AE9E55AF = | 'relationships-blocks' | 'custom-ids' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -114,7 +113,6 @@ export interface Config { 'relationships-blocks': RelationshipsBlock; 'custom-ids': CustomId; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -134,7 +132,6 @@ export interface Config { 'relationships-blocks': RelationshipsBlocksSelect | RelationshipsBlocksSelect; 'custom-ids': CustomIdsSelect | CustomIdsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -552,31 +549,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -648,10 +620,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1059,22 +1027,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/server-functions/payload-types.ts b/test/server-functions/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/server-functions/payload-types.ts +++ b/test/server-functions/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/server-url/payload-types.ts b/test/server-url/payload-types.ts index c2ab68cfdd3..152e56fc437 100644 --- a/test/server-url/payload-types.ts +++ b/test/server-url/payload-types.ts @@ -68,7 +68,6 @@ export interface Config { blocks: {}; collections: { users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -77,7 +76,6 @@ export interface Config { collectionsJoins: {}; collectionsSelect: { users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -142,31 +140,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -194,10 +167,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -263,22 +232,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/sort/payload-types.ts b/test/sort/payload-types.ts index ef94eb3408b..5e3e211a187 100644 --- a/test/sort/payload-types.ts +++ b/test/sort/payload-types.ts @@ -75,7 +75,6 @@ export interface Config { orderable: Orderable; 'orderable-join': OrderableJoin; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -98,7 +97,6 @@ export interface Config { orderable: OrderableSelect | OrderableSelect; 'orderable-join': OrderableJoinSelect | OrderableJoinSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -278,31 +276,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -358,10 +331,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -525,22 +494,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-azure/payload-types.ts b/test/storage-azure/payload-types.ts index b755af85614..16263ece575 100644 --- a/test/storage-azure/payload-types.ts +++ b/test/storage-azure/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { media: Media; 'media-with-prefix': MediaWithPrefix; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { media: MediaSelect | MediaSelect; 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -202,31 +200,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +235,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -391,22 +360,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-gcs/payload-types.ts b/test/storage-gcs/payload-types.ts index b755af85614..16263ece575 100644 --- a/test/storage-gcs/payload-types.ts +++ b/test/storage-gcs/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { media: Media; 'media-with-prefix': MediaWithPrefix; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { media: MediaSelect | MediaSelect; 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -202,31 +200,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -262,10 +235,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -391,22 +360,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-r2/payload-types.ts b/test/storage-r2/payload-types.ts index b29d5943c54..a06b966b05a 100644 --- a/test/storage-r2/payload-types.ts +++ b/test/storage-r2/payload-types.ts @@ -71,7 +71,6 @@ export interface Config { 'media-with-prefix': MediaWithPrefix; 'media-client': MediaClient; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -83,7 +82,6 @@ export interface Config { 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; 'media-client': MediaClientSelect | MediaClientSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -241,31 +239,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -305,10 +278,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -476,22 +445,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-s3/payload-types.ts b/test/storage-s3/payload-types.ts index 254210caa24..8442133f0a8 100644 --- a/test/storage-s3/payload-types.ts +++ b/test/storage-s3/payload-types.ts @@ -74,7 +74,6 @@ export interface Config { 'media-with-prefix': MediaWithPrefix; 'media-with-signed-downloads': MediaWithSignedDownload; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -89,7 +88,6 @@ export interface Config { 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; 'media-with-signed-downloads': MediaWithSignedDownloadsSelect | MediaWithSignedDownloadsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -297,31 +295,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -373,10 +346,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -589,22 +558,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-uploadthing/payload-types.ts b/test/storage-uploadthing/payload-types.ts index 6cd253e4c72..b87d4b5fd80 100644 --- a/test/storage-uploadthing/payload-types.ts +++ b/test/storage-uploadthing/payload-types.ts @@ -70,7 +70,6 @@ export interface Config { media: Media; 'media-with-prefix': MediaWithPrefix; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -81,7 +80,6 @@ export interface Config { media: MediaSelect | MediaSelect; 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -205,31 +203,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -265,10 +238,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -397,22 +366,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/storage-vercel-blob/payload-types.ts b/test/storage-vercel-blob/payload-types.ts index 22217841428..78c0aee397e 100644 --- a/test/storage-vercel-blob/payload-types.ts +++ b/test/storage-vercel-blob/payload-types.ts @@ -73,7 +73,6 @@ export interface Config { 'media-with-dynamic-prefix': MediaWithDynamicPrefix; 'media-with-prefix': MediaWithPrefix; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -87,7 +86,6 @@ export interface Config { 'media-with-dynamic-prefix': MediaWithDynamicPrefixSelect | MediaWithDynamicPrefixSelect; 'media-with-prefix': MediaWithPrefixSelect | MediaWithPrefixSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -277,31 +275,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -349,10 +322,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -548,22 +517,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/tags/payload-types.ts b/test/tags/payload-types.ts index 8a55e4eca27..20a38196134 100644 --- a/test/tags/payload-types.ts +++ b/test/tags/payload-types.ts @@ -73,7 +73,6 @@ export interface Config { media: Media; tags: Tag; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -87,7 +86,6 @@ export interface Config { media: MediaSelect | MediaSelect; tags: TagsSelect | TagsSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -223,31 +221,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -295,10 +268,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -430,22 +399,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/trash/payload-types.ts b/test/trash/payload-types.ts index 8741de3c34b..0a25a30ab29 100644 --- a/test/trash/payload-types.ts +++ b/test/trash/payload-types.ts @@ -72,7 +72,6 @@ export interface Config { 'restricted-collection': RestrictedCollection; 'differentiated-trash-collection': DifferentiatedTrashCollection; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -85,7 +84,6 @@ export interface Config { 'restricted-collection': RestrictedCollectionSelect | RestrictedCollectionSelect; 'differentiated-trash-collection': DifferentiatedTrashCollectionSelect | DifferentiatedTrashCollectionSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -203,31 +201,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -271,10 +244,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -389,22 +358,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/types/payload-types.ts b/test/types/payload-types.ts index 569738999f7..5eb2b0096ac 100644 --- a/test/types/payload-types.ts +++ b/test/types/payload-types.ts @@ -92,7 +92,6 @@ export type LexicalNodes_4CE595A9 = | 'pages-categories' | 'draft-posts' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -117,7 +116,6 @@ export interface Config { media: Media; gallery: Gallery; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -136,7 +134,6 @@ export interface Config { media: MediaSelect | MediaSelect; gallery: GallerySelect | GallerySelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -307,35 +304,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv". - */ export interface PayloadKv { id: string; key: string; @@ -383,10 +351,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -539,26 +503,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv_select". - */ export interface PayloadKvSelect { key?: T; data?: T; @@ -809,4 +753,4 @@ export interface LexicalRichText { declare module 'payload' { // @ts-ignore export interface GeneratedTypes extends Config {} -} \ No newline at end of file +} diff --git a/test/types/types.spec.ts b/test/types/types.spec.ts index cb40c4fb737..fe0b6c02a28 100644 --- a/test/types/types.spec.ts +++ b/test/types/types.spec.ts @@ -1151,7 +1151,6 @@ describe('Types testing', () => { | 'pages-categories' | 'payload-kv' | 'payload-locked-documents' - | 'payload-mcp-api-keys' | 'payload-migrations' | 'payload-preferences' | 'posts' @@ -1170,7 +1169,6 @@ describe('Types testing', () => { | 'pages-categories' | 'payload-kv' | 'payload-locked-documents' - | 'payload-mcp-api-keys' | 'payload-migrations' | 'payload-preferences' | 'posts' diff --git a/test/uploads/payload-types.ts b/test/uploads/payload-types.ts index 6bf4597ba95..746ec0df362 100644 --- a/test/uploads/payload-types.ts +++ b/test/uploads/payload-types.ts @@ -137,7 +137,6 @@ export type LexicalNodes_7A11A510 = | 'list-view-preview' | 'simple-relationship' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-locked-documents' | 'payload-preferences' @@ -212,7 +211,6 @@ export interface Config { 'media-with-image-size-admin-props': MediaWithImageSizeAdminProp; 'prefix-media': PrefixMedia; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -282,7 +280,6 @@ export interface Config { 'media-with-image-size-admin-props': MediaWithImageSizeAdminPropsSelect | MediaWithImageSizeAdminPropsSelect; 'prefix-media': PrefixMediaSelect | PrefixMediaSelect; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -1950,31 +1947,6 @@ export interface User { password?: string | null; collection: 'users'; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -2246,10 +2218,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -4003,22 +3971,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/v4/payload-types.ts b/test/v4/payload-types.ts index e9664892c13..f1a2a30e041 100644 --- a/test/v4/payload-types.ts +++ b/test/v4/payload-types.ts @@ -108,7 +108,6 @@ export interface Config { autosave: Autosave; 'versions-diff': VersionsDiff; 'draft-versions': DraftVersion; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-jobs': PayloadJob; 'payload-locked-documents': PayloadLockedDocument; @@ -174,7 +173,6 @@ export interface Config { autosave: AutosaveSelect | AutosaveSelect; 'versions-diff': VersionsDiffSelect | VersionsDiffSelect; 'draft-versions': DraftVersionsSelect | DraftVersionsSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-jobs': PayloadJobsSelect | PayloadJobsSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; @@ -1665,31 +1663,6 @@ export interface DraftVersion { createdAt: string; _status?: ('draft' | 'published') | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -1969,10 +1942,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'draft-versions'; value: string | DraftVersion; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -3091,22 +3060,6 @@ export interface DraftVersionsSelect { createdAt?: T; _status?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". diff --git a/test/versions/payload-types.ts b/test/versions/payload-types.ts index b04100c3e45..a2baf73867b 100644 --- a/test/versions/payload-types.ts +++ b/test/versions/payload-types.ts @@ -99,7 +99,6 @@ export type LexicalNodes_3937C7CB = | 'diff' | 'text' | 'users' - | 'payload-mcp-api-keys' | 'payload-kv' | 'payload-jobs' | 'payload-locked-documents' @@ -135,7 +134,6 @@ export interface Config { media: Media; media2: Media2; users: User; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-jobs': PayloadJob; 'payload-locked-documents': PayloadLockedDocument; @@ -166,7 +164,6 @@ export interface Config { media: MediaSelect | MediaSelect; media2: Media2Select | Media2Select; users: UsersSelect | UsersSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-jobs': PayloadJobsSelect | PayloadJobsSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; @@ -741,31 +738,6 @@ export interface Media2 { focalX?: number | null; focalY?: number | null; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - updatedAt: string; - createdAt: string; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv". @@ -969,10 +941,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'users'; value: string | User; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -1443,22 +1411,6 @@ export interface UsersSelect { expiresAt?: T; }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - updatedAt?: T; - createdAt?: T; -} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "payload-kv_select". From cb2f0c54f078014be32f8de67bb79c980fb1ad5a Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Thu, 18 Jun 2026 06:20:59 +0000 Subject: [PATCH 2/5] commit --- docs/migration-guide/v4.mdx | 4 +- docs/plugins/mcp.mdx | 13 +- packages/plugin-mcp/src/endpoint/access.ts | 22 +- packages/plugin-mcp/src/index.ts | 11 +- .../src/mcp/builtin/getConfigInfoTool.ts | 26 +- .../plugin-mcp/src/mcp/sanitizeMCPConfig.ts | 6 - packages/plugin-mcp/src/types.ts | 135 +++---- .../plugin-mcp/src/utils/getPluginConfig.ts | 2 +- test/plugin-mcp/collections/Pages.ts | 5 + test/plugin-mcp/e2e.spec.ts | 28 +- test/plugin-mcp/globals/SiteSettings.ts | 5 + test/plugin-mcp/helpers/mcpClient.ts | 2 +- test/plugin-mcp/helpers/mcpFixtures.ts | 72 ++-- test/plugin-mcp/helpers/realMcpClient.ts | 5 +- test/plugin-mcp/int.spec.ts | 372 ++++++------------ test/plugin-mcp/limitedAccess.ts | 1 + test/plugin-mcp/payload-types.ts | 62 +-- 17 files changed, 271 insertions(+), 500 deletions(-) create mode 100644 test/plugin-mcp/limitedAccess.ts diff --git a/docs/migration-guide/v4.mdx b/docs/migration-guide/v4.mdx index 8a963e06c7d..b46150e7ac5 100644 --- a/docs/migration-guide/v4.mdx +++ b/docs/migration-guide/v4.mdx @@ -974,7 +974,9 @@ mcpPlugin({ }) ``` -**MCP now uses user API keys.** The `payload-mcp-api-keys` collection was removed. API keys sent to `/api/mcp` now use Payload's normal `Authorization: API-Key ` header and are looked up against the configured `userCollection` using Payload's normal `auth.useAPIKey` fields. Enable `auth.useAPIKey` on that collection and create API keys on the users that should call MCP. Existing `payload-mcp-api-keys` documents no longer authenticate, and `overrideApiKeyCollection` was removed. +**MCP now uses user API keys.** The `payload-mcp-api-keys` collection was removed. API keys sent to `/api/mcp` now use Payload's normal `Authorization: API-Key ` header and Payload's normal `auth.useAPIKey` fields. Enable `auth.useAPIKey` on the auth collection whose users should call MCP. Existing `payload-mcp-api-keys` documents no longer authenticate, and `overrideApiKeyCollection` was removed. + +The `userCollection` option was also removed. MCP now accepts any Payload user authenticated through API-key auth, using the collection slug from the `Authorization` header. **MCP tool access is configured in code.** The old per-key permissions UI was removed with the MCP API-key collection. Tools, prompts, and resources can now define an `access` callback; built-in collection/global tools accept `access` in their override object. diff --git a/docs/plugins/mcp.mdx b/docs/plugins/mcp.mdx index 796f2dd390a..a11536115d6 100644 --- a/docs/plugins/mcp.mdx +++ b/docs/plugins/mcp.mdx @@ -142,7 +142,6 @@ mcpPlugin({ | `prompts` | `object` | Custom prompts, keyed by name. Values are `Prompt` objects (use [`definePrompt`](#prompts)). | | `resources` | `object` | Custom resources, keyed by name. Values are `Resource` objects. | | `disabled` | `boolean` | Skip MCP endpoint registration. | -| `userCollection` | `CollectionSlug` | Auth collection used for default API-key lookup. Defaults to `config.admin.user` (typically `users`). | | `overrideAuth` | `function` | Replace the default API-key auth with a fully custom access strategy. See [Custom auth](#custom-auth). | | `mcp.serverOptions.serverInfo.name` | `string` | The MCP server name advertised to clients. Default `'Payload MCP Server'`. | | `mcp.serverOptions.serverInfo.version` | `string` | The MCP server version. Default `'1.0.0'`. | @@ -332,19 +331,19 @@ npx @modelcontextprotocol/inspector The HTTP endpoint requires Payload's normal API-key header on every request: ```txt -Authorization: API-Key +Authorization: API-Key ``` -MCP authenticates those keys against the configured `userCollection` using Payload's normal auth API-key fields. +MCP authenticates those keys with Payload's normal API-key auth strategy. ### Creating an API key 1. Start your Payload server and open the admin panel -2. Open a user document in the collection configured as `userCollection` +2. Open a user document in an auth-enabled collection with `auth.useAPIKey` 3. Enable API key auth for that user, generate a key, then save and copy it -4. Use that key as `Authorization: users API-Key ` when calling `/api/mcp` (replace `users` with your configured `userCollection`) +4. Use that key as `Authorization: users API-Key ` when calling `/api/mcp` (replace `users` with that auth collection's slug) -The user attached to the API key is used for Payload access control. Enable `auth.useAPIKey` on your configured user collection if it is not already enabled. +The user attached to the API key is used for Payload access control. ### Dev-mode session fallback @@ -390,7 +389,7 @@ The handler receives: - `req` - the incoming `PayloadRequest` - `pluginConfig` - the fully sanitized plugin config, including the registered `items` -- `getAPIKeyUser(overrideKey?)` - runs the default API-key lookup against the configured user collection (optionally with a key you provide) +- `getAPIKeyUser(headers?)` - returns the current API-key-authenticated user, or runs Payload API-key auth against full headers you provide - `getAuthorizedMCP({ user, overrideAccess? })` - builds an `AuthorizedMCP` with all configured items for the given user ## Defining custom tools, prompts, and resources diff --git a/packages/plugin-mcp/src/endpoint/access.ts b/packages/plugin-mcp/src/endpoint/access.ts index 3c4dfa5d69b..4642363caee 100644 --- a/packages/plugin-mcp/src/endpoint/access.ts +++ b/packages/plugin-mcp/src/endpoint/access.ts @@ -52,8 +52,7 @@ export const getAuthorizedMCP: (args: { if (pluginConfig.overrideAuth) { return await filterAuthorizedMCPItems({ authorizedMCP: await pluginConfig.overrideAuth({ - getAPIKeyUser: (overrideApiKey) => - getAPIKeyUser({ overrideApiKey, pluginConfig, req }), + getAPIKeyUser: (headers) => getAPIKeyUser({ headers, req }), getAuthorizedMCP: getAuthorizedMCPForUser, pluginConfig, req, @@ -74,30 +73,21 @@ export const getAuthorizedMCP: (args: { } return await filterAuthorizedMCPItems({ - authorizedMCP: getAuthorizedMCPForUser({ user: await getAPIKeyUser({ pluginConfig, req }) }), + authorizedMCP: getAuthorizedMCPForUser({ user: await getAPIKeyUser({ req }) }), req, }) } const getAPIKeyUser = async ({ - overrideApiKey, - pluginConfig, + headers, req, }: { - overrideApiKey?: string - pluginConfig: ReturnType + headers?: Headers req: PayloadRequest }): Promise => { - const headers = new Headers(req.headers) - if (overrideApiKey) { - headers.set('Authorization', `${pluginConfig.userCollection} API-Key ${overrideApiKey}`) - } - - const user = overrideApiKey - ? (await req.payload.auth({ headers })).user - : req.user + const user = headers ? (await req.payload.auth({ headers: new Headers(headers) })).user : req.user - if (user?._strategy !== 'api-key' || user.collection !== pluginConfig.userCollection) { + if (user?._strategy !== 'api-key') { throw new UnauthorizedError() } diff --git a/packages/plugin-mcp/src/index.ts b/packages/plugin-mcp/src/index.ts index 362354abc7e..4367c1fd1e5 100644 --- a/packages/plugin-mcp/src/index.ts +++ b/packages/plugin-mcp/src/index.ts @@ -1,4 +1,4 @@ -import { defaultUserCollection, definePlugin } from 'payload' +import { definePlugin } from 'payload' import type { AuthorizedMCP, MCPPluginConfig, SanitizedMCPPluginConfig } from './types.js' @@ -23,15 +23,6 @@ export const mcpPlugin = definePlugin({ slug: '@payloadcms/plugin-mcp', order: 10, plugin: ({ config, plugins, ...rawConfig }) => { - // If a project has no auth collection yet, add the default users collection - // so the default `userCollection` exists for API-key authentication. - if (!rawConfig.disabled && !config.admin?.user) { - const firstCollectionWithAuth = (config.collections ?? []).find(({ auth }) => Boolean(auth)) - if (!firstCollectionWithAuth) { - ;(config.collections ??= []).push(defaultUserCollection) - } - } - const pluginConfig = sanitizeMCPConfig({ config, pluginConfig: rawConfig }) // Stash the sanitized config on plugin options so `getPluginConfig()` reads it. diff --git a/packages/plugin-mcp/src/mcp/builtin/getConfigInfoTool.ts b/packages/plugin-mcp/src/mcp/builtin/getConfigInfoTool.ts index 7faffd44892..dc378fbb1dd 100644 --- a/packages/plugin-mcp/src/mcp/builtin/getConfigInfoTool.ts +++ b/packages/plugin-mcp/src/mcp/builtin/getConfigInfoTool.ts @@ -12,17 +12,32 @@ export const getConfigInfoTool = defineTool({ }, description: 'List the Payload collection and global slugs visible to this MCP client.', }).handler(async ({ authorizedMCP, req }) => { - const user = authorizedMCP.user ?? req.user ?? null - const permissions = user ? await getAccessResults({ req: { ...req, user } }) : null + const user = authorizedMCP.user + const permissions = authorizedMCP.overrideAccess + ? null + : await getAccessResults({ req: { ...req, user } }) + const authorizedCollectionSlugs = new Set() + const authorizedGlobalSlugs = new Set() + + for (const item of authorizedMCP.items) { + if (item.type === 'collectionTool') { + authorizedCollectionSlugs.add(item.collectionSlug) + } else if (item.type === 'globalTool') { + authorizedGlobalSlugs.add(item.globalSlug) + } + } const collections: string[] = [] const globals: string[] = [] for (const collection of req.payload.config.collections) { + if (!authorizedCollectionSlugs.has(collection.slug)) { + continue + } if (user && isEntityHidden({ hidden: collection.admin.hidden, user })) { continue } - if (user && !permissions?.collections?.[collection.slug]?.read) { + if (!authorizedMCP.overrideAccess && !permissions?.collections?.[collection.slug]?.read) { continue } @@ -30,10 +45,13 @@ export const getConfigInfoTool = defineTool({ } for (const global of req.payload.config.globals) { + if (!authorizedGlobalSlugs.has(global.slug)) { + continue + } if (user && isEntityHidden({ hidden: global.admin.hidden, user })) { continue } - if (user && !permissions?.globals?.[global.slug]?.read) { + if (!authorizedMCP.overrideAccess && !permissions?.globals?.[global.slug]?.read) { continue } diff --git a/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts b/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts index 31a7e948c8a..3d177b1b27e 100644 --- a/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts +++ b/packages/plugin-mcp/src/mcp/sanitizeMCPConfig.ts @@ -33,7 +33,6 @@ import { * - Flattens `tools` / `prompts` / `resources` / per-collection / per-global * tool maps into a single `items` array. * - Applies built-in tools for collections and globals, respecting opt-out user overrides. - * - Applies the `userCollection` default * * Called once during plugin init. After that, `plugins['@payloadcms/plugin-mcp'] * ?.options` holds the sanitized result @@ -98,16 +97,11 @@ export const sanitizeMCPConfig = ({ }) } - // Mirror Payload's own admin.user detection (sanitize.ts) since plugins run first. - const firstCollectionWithAuth = config.collections?.find(({ auth }) => Boolean(auth)) - return { disabled: pluginConfig.disabled, items, mcp: pluginConfig.mcp, overrideAuth: pluginConfig.overrideAuth, - userCollection: - pluginConfig.userCollection ?? config.admin?.user ?? firstCollectionWithAuth?.slug ?? 'users', } } diff --git a/packages/plugin-mcp/src/types.ts b/packages/plugin-mcp/src/types.ts index fbf7b65d5a5..b616b571de9 100644 --- a/packages/plugin-mcp/src/types.ts +++ b/packages/plugin-mcp/src/types.ts @@ -10,9 +10,7 @@ import type { } from '@modelcontextprotocol/server' import type { AuthCollectionSlug, - CollectionConfig, CollectionSlug, - DefaultDocumentIDType, GlobalSlug, MaybePromise, PayloadRequest, @@ -36,27 +34,6 @@ export type { JsonSchemaType, StandardSchemaWithJSON, ToolAnnotations } */ export type ToolInputSchema = JsonSchemaType | StandardSchemaWithJSON -/** - * Serializable mirror of `SanitizedMCPPluginConfig` for client components — - * the full sanitized config carries functions (tool handlers, etc.) that can't - * cross the server→client boundary. Built by `sanitizeClientPluginConfig` and - * passed to the `AccessField` component via `clientProps`. - * - * @internal - */ -export type ClientMCPPluginConfig = { - items: Array<{ - collectionSlug?: string - configKey: string - description?: string - globalSlug?: string - /** Admin-UI bucket for collection/global tools: built-in CRUD, auth, or custom. */ - group?: 'auth' | 'custom' | 'operations' - label: string - type: 'collectionTool' | 'globalTool' | 'prompt' | 'resource' | 'tool' - }> -} - export type MCPToolResponse = { content: ContentBlock[] /** @@ -83,6 +60,19 @@ export type TypedInput = TSchema extends StandardSchemaWithJSON : StandardSchemaWithJSON.InferOutput : Record +export type MCPAccessArgs = { + authorizedMCP: AuthorizedMCP + req: PayloadRequest +} + +export type CollectionMCPAccessArgs = { + collectionSlug: CollectionSlug +} & MCPAccessArgs + +export type GlobalMCPAccessArgs = { + globalSlug: GlobalSlug +} & MCPAccessArgs + export type ToolHandlerArgs = { authorizedMCP: AuthorizedMCP input: TypedInput @@ -99,6 +89,7 @@ export type GlobalToolHandlerArgs = { } & ToolHandlerArgs export type Tool = { + access?: (args: MCPAccessArgs) => MaybePromise annotations?: ToolAnnotations description: string handler: (args: ToolHandlerArgs) => MaybePromise @@ -112,12 +103,14 @@ export type Tool = { + access?: (args: CollectionMCPAccessArgs) => MaybePromise handler: (args: CollectionToolHandlerArgs) => MaybePromise input?: TSchema } & Pick export type GlobalTool = { + access?: (args: GlobalMCPAccessArgs) => MaybePromise handler: (args: GlobalToolHandlerArgs) => MaybePromise input?: TSchema } & Pick @@ -127,7 +120,16 @@ export type GlobalTool MaybePromise + annotations?: ToolAnnotations + description?: string + handler?: never + overrideResponse?: MCPResponseOverride +} + +export type MCPBuiltInGlobalToolOverride = { + access?: (args: GlobalMCPAccessArgs) => MaybePromise annotations?: ToolAnnotations description?: string handler?: never @@ -142,13 +144,17 @@ export type MCPBuiltInToolOverride = { export type MCPTopLevelToolEntry = Tool export type MCPCollectionToolsMap = { - [customToolName: string]: boolean | CollectionTool | MCPBuiltInToolOverride | undefined + [customToolName: string]: + | boolean + | CollectionTool + | MCPBuiltInCollectionToolOverride + | undefined } & { - [K in MCPCollectionBuiltinName]?: false | MCPBuiltInToolOverride + [K in MCPCollectionBuiltinName]?: false | MCPBuiltInCollectionToolOverride } export type MCPAuthCollectionToolsMap = { - [K in MCPCollectionAuthToolName]?: MCPBuiltInToolOverride | true + [K in MCPCollectionAuthToolName]?: MCPBuiltInCollectionToolOverride | true } & MCPCollectionToolsMap /** Auth-enabled collections get auth-tool name autocomplete; others get CRUD-only. */ @@ -157,9 +163,13 @@ export type MCPToolsMapForCollection = Slug extends : MCPCollectionToolsMap export type MCPGlobalToolsMap = { - [customToolName: string]: boolean | GlobalTool | MCPBuiltInToolOverride | undefined + [customToolName: string]: + | boolean + | GlobalTool + | MCPBuiltInGlobalToolOverride + | undefined } & { - [K in MCPGlobalBuiltinName]?: false | MCPBuiltInToolOverride + [K in MCPGlobalBuiltinName]?: false | MCPBuiltInGlobalToolOverride } export type MCPTopLevelToolsMap = Record @@ -171,6 +181,7 @@ export type PromptHandlerArgs = { } export type Prompt = { + access?: (args: MCPAccessArgs) => MaybePromise argsSchema: TSchema description: string handler: (args: PromptHandlerArgs) => MaybePromise<{ @@ -188,6 +199,7 @@ export type ResourceHandlerArgs = { } export type Resource = { + access?: (args: MCPAccessArgs) => MaybePromise description: string handler: (args: ResourceHandlerArgs) => MaybePromise<{ contents: Array<{ text: string; uri: string }> @@ -221,7 +233,7 @@ export type MCPPluginConfig = { collections?: { [Slug in CollectionSlug]?: MCPPluginCollectionConfig } - /** Skip MCP registration. The API key collection is still added (so DB / types stay stable). */ + /** Skip MCP endpoint registration. */ disabled?: boolean globals?: { [Slug in GlobalSlug]?: MCPPluginGlobalConfig @@ -230,11 +242,10 @@ export type MCPPluginConfig = { serverOptions?: MCPServerOptions verboseLogs?: boolean } - overrideApiKeyCollection?: (collection: CollectionConfig) => CollectionConfig /** Replace the default API-key auth with a custom resolver. */ overrideAuth?: (args: { - getAPIKeyDoc: (overrideApiKey?: string) => Promise - getAuthorizedMCP: (args: { apiKeyDoc: MCPAPIKeysDoc }) => AuthorizedMCP + getAPIKeyUser: (headers?: Headers) => Promise + getAuthorizedMCP: (args: { overrideAccess?: boolean; user: null | TypedUser }) => AuthorizedMCP pluginConfig: SanitizedMCPPluginConfig req: PayloadRequest }) => MaybePromise @@ -242,13 +253,11 @@ export type MCPPluginConfig = { resources?: Record /** Cross-cutting tools (not scoped to any collection or global). */ tools?: MCPTopLevelToolsMap - userCollection?: CollectionSlug } export type SanitizedMCPPluginConfig = { items: MCPItem[] - userCollection: CollectionSlug -} & Pick +} & Pick export type MCPServerOptions = { options?: ConstructorParameters[1] @@ -256,52 +265,12 @@ export type MCPServerOptions = { } /** - * Nested access tree as stored in the collection. - * A `false` leaf disables that tool; missing keys defer to - * defaults (built-in CRUD is on, opt-in tools are off). - */ -export type MCPAPIKeysDocAccessTree = { - collections?: { - [CollectionSlug: CollectionSlug]: { - [ToolKey: string]: boolean - } - } - globals?: { - [GlobalSlug: GlobalSlug]: { - [ToolKey: string]: boolean - } - } - prompts?: { - [PromptKey: string]: boolean - } - resources?: { - [ResourceKey: string]: boolean - } - tools?: { - [ToolKey: string]: boolean - } -} - -/** - * Stored on `payload-mcp-api-keys` docs - */ -export type MCPAPIKeysDoc = { - access: MCPAPIKeysDocAccessTree - apiKey?: string - apiKeyIndex?: string - id: DefaultDocumentIDType - lastUsed?: string - overrideAccess?: boolean - user: null | TypedUser -} - -/** - * One MCP primitive plus the metadata needed for access checks, admin UI, and + * One MCP primitive plus the metadata needed for config-driven filtering and * registration. * - * - `configKey`: the config/API-key identifier, e.g. `find` or `echo`. + * - `configKey`: the config identifier, e.g. `find` or `echo`. * - `mcpName`: the MCP wire name, e.g. `findDocuments` or `echo`. - * - `label`: human-readable admin checkbox text. + * - `label`: human-readable display text. */ export type MCPItemBase = { configKey: string @@ -338,10 +307,10 @@ export type MCPItem = | GlobalMCPItem /** - * The caller's identity + the MCP items they can use for this request. Returned - * by `getAuthorizedMCP`; denied items are simply absent from `items`. Handlers - * receive this via `args.authorizedMCP` so they can spread - * `localAPIDefaults(authorizedMCP)` into every local API call. + * The caller's identity + the MCP items authorized for this request. Disabled + * items and items blocked by access callbacks or Payload operation access are + * absent from `items`. Handlers receive this via `args.authorizedMCP` so they + * can spread `localAPIDefaults(authorizedMCP)` into every local API call. */ export type AuthorizedMCP = { items: MCPItem[] diff --git a/packages/plugin-mcp/src/utils/getPluginConfig.ts b/packages/plugin-mcp/src/utils/getPluginConfig.ts index 69600ac6898..080f43e5518 100644 --- a/packages/plugin-mcp/src/utils/getPluginConfig.ts +++ b/packages/plugin-mcp/src/utils/getPluginConfig.ts @@ -5,7 +5,7 @@ import type { SanitizedMCPPluginConfig } from '../types.js' /** * Returns the sanitized plugin config — the form produced by * `sanitizeMCPConfig` and stashed back on the plugin's `options` during init. - * Callers downstream of plugin init can rely on `items`, `userCollection`, etc. + * Callers downstream of plugin init can rely on `items` and other defaults * being fully resolved. */ export const getPluginConfig: (args: { config: SanitizedConfig }) => SanitizedMCPPluginConfig = ({ diff --git a/test/plugin-mcp/collections/Pages.ts b/test/plugin-mcp/collections/Pages.ts index 66cbe03a3d7..1b1ea95cb33 100644 --- a/test/plugin-mcp/collections/Pages.ts +++ b/test/plugin-mcp/collections/Pages.ts @@ -1,10 +1,15 @@ import type { CollectionConfig } from 'payload' +import { limitedMCPUserEmail } from '../limitedAccess.js' + export const heroBlockSlug = 'hero' export const textBlockSlug = 'textContent' export const Pages: CollectionConfig = { slug: 'pages', + access: { + update: ({ req }) => req.user?.email !== limitedMCPUserEmail, + }, fields: [ { name: 'title', diff --git a/test/plugin-mcp/e2e.spec.ts b/test/plugin-mcp/e2e.spec.ts index 66601bd6575..12e673a7a70 100644 --- a/test/plugin-mcp/e2e.spec.ts +++ b/test/plugin-mcp/e2e.spec.ts @@ -39,31 +39,19 @@ test.describe('MCP Plugin', () => { const token = loginData.token const userId = loginData.user.id - // Create an API key with permissions to call tools/list - const createKeyRes = await request.post(`${serverURL}/api/payload-mcp-api-keys`, { + apiKey = randomUUID() + + // Enable a user API key for MCP authentication + const updateUserRes = await request.patch(`${serverURL}/api/users/${userId}`, { data: { - access: { - collections: { - posts: { - create: true, - delete: true, - find: true, - update: true, - }, - products: { find: true }, - }, - }, - apiKey: randomUUID(), - label: 'E2E Test Key', - user: userId, + apiKey, + enableAPIKey: true, }, headers: { Authorization: `JWT ${token}`, }, }) - expect(createKeyRes.ok()).toBeTruthy() - const keyData = await createKeyRes.json() - apiKey = keyData.doc.apiKey + expect(updateUserRes.ok()).toBeTruthy() }) test('should not poison the Next.js runtime after MCP requests', async ({ request }) => { @@ -81,7 +69,7 @@ test.describe('MCP Plugin', () => { const mcpHeaders = { Accept: 'application/json, text/event-stream', - Authorization: `Bearer ${apiKey}`, + Authorization: `users API-Key ${apiKey}`, 'Content-Type': 'application/json', } diff --git a/test/plugin-mcp/globals/SiteSettings.ts b/test/plugin-mcp/globals/SiteSettings.ts index 117f11d8474..b4c45dfcd5c 100644 --- a/test/plugin-mcp/globals/SiteSettings.ts +++ b/test/plugin-mcp/globals/SiteSettings.ts @@ -1,7 +1,12 @@ import type { GlobalConfig } from 'payload' +import { limitedMCPUserEmail } from '../limitedAccess.js' + export const SiteSettings: GlobalConfig = { slug: 'site-settings', + access: { + update: ({ req }) => req.user?.email !== limitedMCPUserEmail, + }, fields: [ { name: 'siteName', diff --git a/test/plugin-mcp/helpers/mcpClient.ts b/test/plugin-mcp/helpers/mcpClient.ts index 01d27e3be3e..80eb6ddd938 100644 --- a/test/plugin-mcp/helpers/mcpClient.ts +++ b/test/plugin-mcp/helpers/mcpClient.ts @@ -44,7 +44,7 @@ export function createMcpClient(restClient: NextRESTClient): McpClient { body: JSON.stringify(body), headers: { Accept: 'application/json, text/event-stream', - ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...(apiKey ? { Authorization: `users API-Key ${apiKey}` } : {}), 'Content-Type': 'application/json', }, }), diff --git a/test/plugin-mcp/helpers/mcpFixtures.ts b/test/plugin-mcp/helpers/mcpFixtures.ts index 8b503d5285e..1ec8054a1a2 100644 --- a/test/plugin-mcp/helpers/mcpFixtures.ts +++ b/test/plugin-mcp/helpers/mcpFixtures.ts @@ -9,52 +9,44 @@ import type { NextRESTClient } from '../../__helpers/shared/NextRESTClient.js' import { initPayloadInt } from '../../__helpers/shared/initPayloadInt.js' import { devUser } from '../../credentials.js' +import { limitedMCPUserEmail } from '../limitedAccess.js' import { createMcpClient, type McpClient } from './mcpClient.js' export let payload: Payload export let restClient: NextRESTClient +export let limitedUserId: number | string export let userId: string -export type GetApiKeyOptions = { - enableDelete?: boolean - enableUpdate?: boolean - globalFind?: boolean - globalUpdate?: boolean +export async function getApiKey(): Promise { + const apiKey = randomUUID() + + await payload.update({ + id: userId, + collection: 'users', + data: { + apiKey, + enableAPIKey: true, + }, + overrideAccess: true, + }) + + return apiKey } -export async function getApiKey({ - enableDelete = false, - enableUpdate = false, - globalFind = false, - globalUpdate = false, -}: GetApiKeyOptions = {}): Promise { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', +export async function getLimitedApiKey(): Promise { + const apiKey = randomUUID() + + await payload.update({ + id: limitedUserId, + collection: 'users', data: { - access: { - collections: { - posts: { - create: true, - delete: enableDelete, - find: true, - update: enableUpdate, - }, - products: { find: true }, - }, - ...(globalFind || globalUpdate - ? { - globals: { - 'site-settings': { find: globalFind, update: globalUpdate }, - }, - } - : {}), - }, - apiKey: randomUUID(), - label: 'Test API Key', - user: userId, + apiKey, + enableAPIKey: true, }, + overrideAccess: true, }) - return doc.apiKey + + return apiKey } const fixtureDir = path.dirname(fileURLToPath(import.meta.url)) @@ -80,6 +72,16 @@ export const it = base.extend({ .then((res) => res.json()) userId = loginResponse.user.id + const limitedUser = await payload.create({ + collection: 'users', + data: { + email: limitedMCPUserEmail, + password: randomUUID(), + }, + overrideAccess: true, + }) + limitedUserId = limitedUser.id + await use() await payload.destroy() diff --git a/test/plugin-mcp/helpers/realMcpClient.ts b/test/plugin-mcp/helpers/realMcpClient.ts index f73bd164ea3..fd2ca703242 100644 --- a/test/plugin-mcp/helpers/realMcpClient.ts +++ b/test/plugin-mcp/helpers/realMcpClient.ts @@ -19,9 +19,10 @@ export async function connectMcpClient({ }): Promise { const client = new Client({ name: 'plugin-mcp-tests', version: '1.0.0' }) const transport = new StreamableHTTPClientTransport(new URL('http://in-process/api/mcp'), { - authProvider: { token: () => Promise.resolve(apiKey) }, fetch: (_url, init) => { - const headers = init?.headers as HeadersInit + const headers = new Headers(init?.headers) + headers.set('Authorization', `users API-Key ${apiKey}`) + return (init?.method ?? 'GET').toUpperCase() === 'POST' ? restClient.POST('/mcp', { body: init?.body as string, headers }) : restClient.GET('/mcp', { headers }) diff --git a/test/plugin-mcp/int.spec.ts b/test/plugin-mcp/int.spec.ts index afed74c8cea..20204d84d8c 100644 --- a/test/plugin-mcp/int.spec.ts +++ b/test/plugin-mcp/int.spec.ts @@ -1,8 +1,14 @@ -import { randomUUID } from 'crypto' -import { afterEach, describe, expect, vi } from 'vitest' +import { afterEach, describe, expect } from 'vitest' import { getToolDoc, getToolText } from './helpers/mcpClient.js' -import { getApiKey, it, payload, restClient, userId } from './helpers/mcpFixtures.js' +import { + getApiKey, + getLimitedApiKey, + it, + payload, + restClient, + userId, +} from './helpers/mcpFixtures.js' /** * Reports JSON Schema draft 2020-12 violations in a tool's `input_schema @@ -57,43 +63,11 @@ describe('@payloadcms/plugin-mcp', () => { }) describe('API Keyed Access', () => { - it('should create an API Key', async () => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - apiKey: randomUUID(), - label: 'Test API Key', - access: { - collections: { - posts: { create: true, find: true }, - products: { find: false }, - }, - }, - user: userId, - }, - }) - - expect(doc).toBeDefined() - expect(doc.user).toBeDefined() - // @ts-expect-error - doc.user is a string | User - expect(doc.user?.id).toBe(userId) - expect(doc.label).toBe('Test API Key') - // @ts-expect-error - access is a JSON field - expect(doc.access?.collections?.posts?.find).toBe(true) - // @ts-expect-error - access is a JSON field - expect(doc.access?.collections?.posts?.create).toBe(true) - // @ts-expect-error - access is a JSON field - expect(doc.access?.collections?.products?.find).toBe(false) - expect(typeof doc.apiKey).toBe('string') - expect(doc.apiKey).toHaveLength(36) - expect(doc.override).toBe('This field added by overrideApiKeyCollection') - }) - it('should not allow GET /api/mcp', async () => { const apiKey = await getApiKey() const response = await restClient.GET(`/mcp`, { headers: { - Authorization: `Bearer ${apiKey}`, + Authorization: `users API-Key ${apiKey}`, }, }) @@ -108,7 +82,7 @@ describe('@payloadcms/plugin-mcp', () => { body: JSON.stringify({}), headers: { Accept: 'application/json, text/event-stream', - Authorization: `Bearer fake${apiKey}key`, + Authorization: `users API-Key fake${apiKey}key`, 'Content-Type': 'application/json', }, }) @@ -122,43 +96,24 @@ describe('@payloadcms/plugin-mcp', () => { ) }) - it('should update last used with a direct database write', async ({ mcp }) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - apiKey: randomUUID(), - label: 'Last Used API Key', - user: userId, + it('should not accept Bearer API keys for default API-key auth', async () => { + const apiKey = await getApiKey() + const response = await restClient.POST('/mcp', { + body: JSON.stringify({}), + headers: { + Accept: 'application/json, text/event-stream', + Authorization: `Bearer ${apiKey}`, + 'Content-Type': 'application/json', }, }) - const beforeRequest = Date.now() - const updateOneSpy = vi.spyOn(payload.db, 'updateOne') - try { - const client = await mcp.connect(doc.apiKey) - await client.ping() - - expect(updateOneSpy).toHaveBeenCalledWith( - expect.objectContaining({ - collection: 'payload-mcp-api-keys', - id: doc.id, - returning: false, - }), - ) - - const updatedDoc = await payload.findByID({ - id: doc.id, - collection: 'payload-mcp-api-keys', - depth: 0, - }) + const json: any = await response.json() - expect(updatedDoc.lastUsed).toBeDefined() - expect(new Date(updatedDoc.lastUsed as string).getTime()).toBeGreaterThanOrEqual( - beforeRequest, - ) - } finally { - updateOneSpy.mockRestore() - } + expect(response.status).toBe(401) + expect(json?.errors).toBeDefined() + expect(json.errors[0].message).toBe( + 'Unauthorized, you must be logged in to make this request.', + ) }) }) @@ -270,6 +225,7 @@ describe('@payloadcms/plugin-mcp', () => { openWorldHint: false, readOnlyHint: true, }) + expect(toolsByName.hiddenTool).toBeUndefined() const createDocumentTools = toolsResponse.tools.filter( (tool: { name: string }) => tool.name === 'createDocument', @@ -372,7 +328,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should return config info', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true, globalUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const response = await client.callTool({ arguments: {}, name: 'getConfigInfo' }) const text = getToolText(response) @@ -383,57 +339,6 @@ describe('@payloadcms/plugin-mcp', () => { expect(text).toContain('site-settings') }) - it('should return readable slugs even when scoped tools are disabled', async ({ mcp }) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - access: { - collections: { - posts: { - create: false, - delete: false, - find: false, - getCollectionSchema: false, - publish: false, - update: false, - }, - }, - }, - apiKey: randomUUID(), - label: 'Readable Slugs', - user: userId, - }, - }) - - const client = await mcp.connect(doc.apiKey) - const response = await client.callTool({ arguments: {}, name: 'getConfigInfo' }) - const text = getToolText(response) - - expect(text).toContain('posts') - }) - - it('should hide config info when disabled for an API key', async ({ mcp }) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - access: { - tools: { - getConfigInfo: false, - }, - }, - apiKey: randomUUID(), - label: 'No Config Info', - user: userId, - }, - }) - - const client = await mcp.connect(doc.apiKey) - const toolsResponse = await client.listTools() - const toolNames = toolsResponse.tools.map((tool: { name: string }) => tool.name) - - expect(toolNames).not.toContain('getConfigInfo') - }) - it('should expose only tool input schemas that are valid JSON Schema draft 2020-12', async ({ mcp, }) => { @@ -498,7 +403,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should list globals', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true, globalUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const toolsResponse = await client.listTools() @@ -552,7 +457,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should list updateDocument when API key permits update and include select schema', async ({ mcp, }) => { - const apiKey = await getApiKey({ enableUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const toolsResponse = await client.listTools() @@ -804,44 +709,6 @@ describe('@payloadcms/plugin-mcp', () => { expect(callResponse.content[1].text).toContain('Override MCP response for Posts!') }) - it('should respect per-collection access for createDocument', async ({ mcp }) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - access: { - collections: { - posts: { create: false }, - }, - }, - apiKey: randomUUID(), - label: 'Denied Create Document Key', - user: userId, - }, - }) - - const client = await mcp.connect(doc.apiKey) - const toolsResponse = await client.listTools() - const createDocument = toolsResponse.tools.find((tool) => tool.name === 'createDocument') - expect(createDocument.inputSchema.properties.collectionSlug.type).toBe('string') - expect(createDocument.inputSchema.properties.collectionSlug.enum).toBeUndefined() - - const callResponse = await client.callTool({ - arguments: { - collectionSlug: 'posts', - data: { - content: 'Should not be created', - title: 'Denied Generic Create', - }, - }, - name: 'createDocument', - }) - - expect((callResponse as any).isError).toBe(true) - expect(callResponse.content[0].text).toContain( - 'MCP access to "createDocument" is not enabled for collection "posts"', - ) - }) - it('should call findDocuments', async ({ mcp }) => { await payload.create({ collection: 'posts', @@ -1005,7 +872,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1040,7 +907,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1071,7 +938,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1105,7 +972,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1136,7 +1003,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1173,7 +1040,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1220,7 +1087,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1292,7 +1159,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should handle point fields with object format in updateDocument', async ({ mcp }) => { - const apiKey = await getApiKey({ enableUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const createdPost = await payload.create({ @@ -1336,32 +1203,8 @@ describe('@payloadcms/plugin-mcp', () => { describe('Blocks fields', () => { const createdPageIds: (number | string)[] = [] - const getPagesApiKey = async (enableUpdate = false) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - label: 'Pages API Key', - access: { - collections: { - pages: { - create: true, - delete: true, - find: true, - update: enableUpdate, - }, - posts: { create: false, find: false }, - products: { find: false }, - }, - }, - apiKey: randomUUID(), - user: userId, - }, - }) - return doc.apiKey - } - it('should create a page with a block', async ({ mcp }) => { - const apiKey = await getPagesApiKey() + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ @@ -1392,7 +1235,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create a page with multiple block types', async ({ mcp }) => { - const apiKey = await getPagesApiKey() + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ @@ -1437,7 +1280,7 @@ describe('@payloadcms/plugin-mcp', () => { createdPageIds.push(page.id) - const apiKey = await getPagesApiKey(true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ @@ -1480,7 +1323,7 @@ describe('@payloadcms/plugin-mcp', () => { describe('Virtual Fields', () => { it('should not include virtual fields in collection schema', async ({ mcp }) => { - const apiKey = await getApiKey({ enableUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const schemaResponse = await client.callTool({ arguments: { @@ -1524,7 +1367,7 @@ describe('@payloadcms/plugin-mcp', () => { data: { title: 'Virtual Field Update Test' }, }) - const apiKey = await getApiKey({ enableUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1575,7 +1418,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should find site-settings global', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { globalSlug: 'site-settings' }, @@ -1600,7 +1443,7 @@ describe('@payloadcms/plugin-mcp', () => { }, }) - const apiKey = await getApiKey({ globalFind: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1648,7 +1491,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should update site-settings global', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true, globalUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1669,7 +1512,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should update site-settings global with select', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true, globalUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -1695,6 +1538,51 @@ describe('@payloadcms/plugin-mcp', () => { }) }) + describe('Payload access control', () => { + it('should not advertise global update tools when Payload access denies update', async ({ + mcp, + }) => { + const apiKey = await getLimitedApiKey() + const client = await mcp.connect(apiKey) + const toolsResponse = await client.listTools() + const toolNames = toolsResponse.tools.map((tool: { name: string }) => tool.name) + + expect(toolNames).toContain('findGlobal') + expect(toolNames).toContain('getGlobalSchema') + expect(toolNames).not.toContain('updateGlobal') + }) + + it('should reject collection operations when Payload access denies that operation', async ({ + mcp, + }) => { + const apiKey = await getLimitedApiKey() + const client = await mcp.connect(apiKey) + const toolsResponse = await client.listTools() + const updateTool = toolsResponse.tools.find( + (tool: { name: string }) => tool.name === 'updateDocument', + ) + + expect(updateTool).toBeDefined() + expect(updateTool.inputSchema.properties.collectionSlug.enum).toBeUndefined() + + const callResponse = await client.callTool({ + arguments: { + collectionSlug: 'pages', + data: { + title: 'Limited MCP Access Page Updated', + }, + id: 'limited-access-page-id', + }, + name: 'updateDocument', + }) + + expect(callResponse.isError).toBe(true) + expect(getToolText(callResponse)).toContain( + 'MCP access to "updateDocument" is not enabled for collection "pages"', + ) + }) + }) + describe('Minified JSON responses', () => { const createdIDs: string[] = [] @@ -1744,7 +1632,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should return minified JSON in global responses', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { globalSlug: 'site-settings' }, @@ -1797,7 +1685,7 @@ describe('@payloadcms/plugin-mcp', () => { describe('Localization', () => { it('should include locale parameters in tool schemas', async ({ mcp }) => { - const apiKey = await getApiKey({ enableUpdate: true, enableDelete: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const toolsResponse = await client.listTools() @@ -1862,7 +1750,7 @@ describe('@payloadcms/plugin-mcp', () => { }) // Update with Spanish translation via MCP - const apiKey = await getApiKey({ enableUpdate: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2010,28 +1898,6 @@ describe('@payloadcms/plugin-mcp', () => { describe('Field Types', () => { const createdFieldTypeIds: (number | string)[] = [] - const getFieldTypesApiKey = async (enableUpdate = false, enableDelete = false) => { - const doc = await payload.create({ - collection: 'payload-mcp-api-keys', - data: { - label: 'Field Types API Key', - access: { - collections: { - 'field-types': { - create: true, - delete: enableDelete, - find: true, - update: enableUpdate, - }, - }, - }, - apiKey: randomUUID(), - user: userId, - }, - }) - return doc.apiKey - } - describe('Schema validation', () => { const getFieldTypeInputProps = async (mcp: any, apiKey: string) => { const client = await mcp.connect(apiKey) @@ -2044,14 +1910,14 @@ describe('@payloadcms/plugin-mcp', () => { } it('should not include ui field in create tool schema', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) expect(inputProps).not.toHaveProperty('uiField') }) it('should include group field as nested object in create tool schema', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) expect(inputProps.groupField).toBeDefined() @@ -2064,7 +1930,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should include collapsible children as top-level fields in create tool schema', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) // Children of collapsible appear at the top level, not under a `collapsible` key @@ -2077,7 +1943,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should include row children as top-level fields in create tool schema', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) // Children of row appear at the top level, not under a `row` key @@ -2089,7 +1955,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should include named tab as nested object and unnamed tab children at top level in create tool schema', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) // Named tab appears as a nested object @@ -2105,7 +1971,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should include select field with enum values in create tool schema', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) expect(inputProps.selectField).toBeDefined() @@ -2116,7 +1982,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should include radio field with enum values in create tool schema', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) expect(inputProps.radioField).toBeDefined() @@ -2127,7 +1993,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should include array field with item schema in create tool schema', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const inputProps = await getFieldTypeInputProps(mcp, apiKey) expect(inputProps.arrayField).toBeDefined() @@ -2143,7 +2009,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should create and find document with atomic data fields (text, textarea, number, email, checkbox)', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2180,7 +2046,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should return the collection schema when createDocument fails validation', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2199,7 +2065,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with date, code, and json fields', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const testDate = '2024-01-15T10:30:00.000Z' const callResponse = await client.callTool({ @@ -2228,7 +2094,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with select field', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2252,7 +2118,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with radio field', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2276,7 +2142,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with group field (nested object)', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2305,7 +2171,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with collapsible children at top level', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2330,7 +2196,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with row children at top level', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2357,7 +2223,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should create document with tabs fields (named tab as object, unnamed tab children at top level)', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2389,7 +2255,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should create document with array field', async ({ mcp }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2426,7 +2292,7 @@ describe('@payloadcms/plugin-mcp', () => { }) createdFieldTypeIds.push(created.id) - const apiKey = await getFieldTypesApiKey() + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2455,7 +2321,7 @@ describe('@payloadcms/plugin-mcp', () => { }) createdFieldTypeIds.push(created.id) - const apiKey = await getFieldTypesApiKey(true, false) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2495,7 +2361,7 @@ describe('@payloadcms/plugin-mcp', () => { }) createdFieldTypeIds.push(created.id) - const apiKey = await getFieldTypesApiKey(true, false) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2526,7 +2392,7 @@ describe('@payloadcms/plugin-mcp', () => { }) createdFieldTypeIds.push(created.id) - const apiKey = await getFieldTypesApiKey(true, false) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2557,7 +2423,7 @@ describe('@payloadcms/plugin-mcp', () => { }) createdFieldTypeIds.push(created.id) - const apiKey = await getFieldTypesApiKey(true, false) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { @@ -2589,7 +2455,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should create document with ui field present without errors and ui field absent from response', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) // Create a doc without passing any `uiField` value (it has no stored data) @@ -2618,7 +2484,7 @@ describe('@payloadcms/plugin-mcp', () => { it('should create and find document with all structural layout fields populated', async ({ mcp, }) => { - const apiKey = await getFieldTypesApiKey(false, true) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const callResponse = await client.callTool({ arguments: { diff --git a/test/plugin-mcp/limitedAccess.ts b/test/plugin-mcp/limitedAccess.ts new file mode 100644 index 00000000000..f22d30ac51c --- /dev/null +++ b/test/plugin-mcp/limitedAccess.ts @@ -0,0 +1 @@ +export const limitedMCPUserEmail = 'limited-mcp-user@payloadcms.com' diff --git a/test/plugin-mcp/payload-types.ts b/test/plugin-mcp/payload-types.ts index afd0712951e..70e75f36ff5 100644 --- a/test/plugin-mcp/payload-types.ts +++ b/test/plugin-mcp/payload-types.ts @@ -76,7 +76,6 @@ export interface Config { 'returned-resources': ReturnedResource; pages: Page; 'field-types': FieldType; - 'payload-mcp-api-keys': PayloadMcpApiKey; 'payload-kv': PayloadKv; 'payload-locked-documents': PayloadLockedDocument; 'payload-preferences': PayloadPreference; @@ -93,7 +92,6 @@ export interface Config { 'returned-resources': ReturnedResourcesSelect | ReturnedResourcesSelect; pages: PagesSelect | PagesSelect; 'field-types': FieldTypesSelect | FieldTypesSelect; - 'payload-mcp-api-keys': PayloadMcpApiKeysSelect | PayloadMcpApiKeysSelect; 'payload-kv': PayloadKvSelect | PayloadKvSelect; 'payload-locked-documents': PayloadLockedDocumentsSelect | PayloadLockedDocumentsSelect; 'payload-preferences': PayloadPreferencesSelect | PayloadPreferencesSelect; @@ -420,39 +418,6 @@ export interface FieldType { updatedAt: string; createdAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys". - */ -export interface PayloadMcpApiKey { - id: string; - apiKey: string; - apiKeyIndex: string; - access?: - | { - [k: string]: unknown; - } - | unknown[] - | string - | number - | boolean - | null; - label?: string | null; - description?: string | null; - lastUsed?: string | null; - user: string | User; - overrideAccess?: boolean | null; - /** - * This field added by overrideApiKeyCollection - */ - override?: string | null; - updatedAt: string; - createdAt: string; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv". - */ export interface PayloadKv { id: string; key: string; @@ -508,10 +473,6 @@ export interface PayloadLockedDocument { | ({ relationTo: 'field-types'; value: string | FieldType; - } | null) - | ({ - relationTo: 'payload-mcp-api-keys'; - value: string | PayloadMcpApiKey; } | null); globalSlug?: string | null; user: { @@ -727,27 +688,6 @@ export interface FieldTypesSelect { updatedAt?: T; createdAt?: T; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-mcp-api-keys_select". - */ -export interface PayloadMcpApiKeysSelect { - apiKey?: T; - apiKeyIndex?: T; - access?: T; - label?: T; - description?: T; - lastUsed?: T; - user?: T; - overrideAccess?: T; - override?: T; - updatedAt?: T; - createdAt?: T; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "payload-kv_select". - */ export interface PayloadKvSelect { key?: T; data?: T; @@ -844,4 +784,4 @@ export interface Auth { declare module 'payload' { // @ts-ignore export interface GeneratedTypes extends Config {} -} \ No newline at end of file +} From cb5b0351c65d56ea09dfd51c0d9f4d9dddf5d015 Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Thu, 18 Jun 2026 06:38:06 +0000 Subject: [PATCH 3/5] update v4.mdx --- docs/migration-guide/v4.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/migration-guide/v4.mdx b/docs/migration-guide/v4.mdx index b46150e7ac5..36405a1426f 100644 --- a/docs/migration-guide/v4.mdx +++ b/docs/migration-guide/v4.mdx @@ -978,6 +978,8 @@ mcpPlugin({ The `userCollection` option was also removed. MCP now accepts any Payload user authenticated through API-key auth, using the collection slug from the `Authorization` header. +Because the `payload-mcp-api-keys` collection config was removed, run your normal database migration workflow after upgrading so the old collection/table is removed where your database adapter requires schema migrations. Back up any existing MCP API key documents first if you need to reference them while recreating credentials as user API keys. You can build your own RBAC system, managable in the admin UI, using the new access functions added to mcp items, if needed. Otherwise, just manage tool access in code. + **MCP tool access is configured in code.** The old per-key permissions UI was removed with the MCP API-key collection. Tools, prompts, and resources can now define an `access` callback; built-in collection/global tools accept `access` in their override object. **Dependencies.** The plugin now builds on `@modelcontextprotocol/server` instead of `@modelcontextprotocol/sdk` + `mcp-handler`, and moved to `zod` v4. If your custom tools import `zod` directly, make sure it resolves to v4. From 828d12d9870d36494c2759dd19195bdab1f63f0f Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Thu, 18 Jun 2026 06:43:45 +0000 Subject: [PATCH 4/5] lint --- packages/plugin-mcp/src/endpoint/access.ts | 2 +- packages/plugin-mcp/src/types.ts | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/plugin-mcp/src/endpoint/access.ts b/packages/plugin-mcp/src/endpoint/access.ts index 4642363caee..c2436a3c7fb 100644 --- a/packages/plugin-mcp/src/endpoint/access.ts +++ b/packages/plugin-mcp/src/endpoint/access.ts @@ -3,13 +3,13 @@ import type { PayloadRequest, SanitizedPermissions, TypedUser } from 'payload' import { getAccessResults, UnauthorizedError } from 'payload' import type { AuthorizedMCP } from '../types.js' + import { COLLECTION_BUILTINS, GLOBAL_BUILTINS, type MCPCollectionBuiltinName, type MCPGlobalBuiltinName, } from '../mcp/builtinTools.js' - import { getLogger } from '../utils/getLogger.js' import { getPluginConfig } from '../utils/getPluginConfig.js' diff --git a/packages/plugin-mcp/src/types.ts b/packages/plugin-mcp/src/types.ts index b616b571de9..c9ac0504e80 100644 --- a/packages/plugin-mcp/src/types.ts +++ b/packages/plugin-mcp/src/types.ts @@ -144,11 +144,7 @@ export type MCPBuiltInGlobalToolOverride = { export type MCPTopLevelToolEntry = Tool export type MCPCollectionToolsMap = { - [customToolName: string]: - | boolean - | CollectionTool - | MCPBuiltInCollectionToolOverride - | undefined + [customToolName: string]: boolean | CollectionTool | MCPBuiltInCollectionToolOverride | undefined } & { [K in MCPCollectionBuiltinName]?: false | MCPBuiltInCollectionToolOverride } @@ -163,11 +159,7 @@ export type MCPToolsMapForCollection = Slug extends : MCPCollectionToolsMap export type MCPGlobalToolsMap = { - [customToolName: string]: - | boolean - | GlobalTool - | MCPBuiltInGlobalToolOverride - | undefined + [customToolName: string]: boolean | GlobalTool | MCPBuiltInGlobalToolOverride | undefined } & { [K in MCPGlobalBuiltinName]?: false | MCPBuiltInGlobalToolOverride } From 943468198b80e8f1a95be36628dc8e32a090de0e Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Thu, 18 Jun 2026 15:57:46 +0000 Subject: [PATCH 5/5] fix tests --- test/plugin-mcp/int.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin-mcp/int.spec.ts b/test/plugin-mcp/int.spec.ts index 20204d84d8c..b0af87a1987 100644 --- a/test/plugin-mcp/int.spec.ts +++ b/test/plugin-mcp/int.spec.ts @@ -1,4 +1,4 @@ -import { afterEach, describe, expect } from 'vitest' +import { afterEach, describe, expect, vi } from 'vitest' import { getToolDoc, getToolText } from './helpers/mcpClient.js' import { @@ -1465,7 +1465,7 @@ describe('@payloadcms/plugin-mcp', () => { }) it('should pass populate to findGlobal', async ({ mcp }) => { - const apiKey = await getApiKey({ globalFind: true }) + const apiKey = await getApiKey() const client = await mcp.connect(apiKey) const findGlobalSpy = vi.spyOn(payload, 'findGlobal')