v3.65.0

payloadcms/payloadv3.65.0Nov 25, 2025by denolfe

AI Summary

This release disables Turbopack Build support and introduces type-safe custom properties for collections and globals, along with MongoDB lifecycle hooks and enhanced MCP plugin capabilities.

Key Highlights

  • Type-safe custom properties (CollectionCustom, GlobalCustom, etc.)
  • Turbopack build support disabled
  • MongoDB lifecycle hooks (afterCreateConnection, afterOpenConnection)
  • Localization support for MCP resource operations
  • PayloadRequest object access in MCP handlers

Breaking Changes

  • Removal of 'override' config from plugin-mcp

New Features

  • Add augmentable interfaces for collection and global custom properties
  • Allow to specify payload instance cache key in handleEndpoints
  • Add afterCreateConnection and afterOpenConnection hooks for MongoDB
  • Add localization support to MCP resource operations
  • Add a PayloadRequest to custom tool, prompt, and resource handlers
  • Extract block selector from blocks drawer

Full Release Notes

## [v3.65.0](https://github.com/payloadcms/payload/compare/v3.64.0...v3.65.0) (2025-11-25)

### ❗️Breaking Change

This release disables Turbopack Build support. Please use Webpack to build your app for now. You can do so by using `pnpm build` on Next.js 15 and `pnpm build --webpack` on Next.js 16.


### 🚀 Features

* add augmentable interfaces for collection and global custom properties ([#14729](https://github.com/payloadcms/payload/issues/14729)) ([850c252](https://github.com/payloadcms/payload/commit/850c252))
* allow to specify payload instance cache key in `handleEndpoints` ([#14675](https://github.com/payloadcms/payload/issues/14675)) ([efa2fd2](https://github.com/payloadcms/payload/commit/efa2fd2))
* **db-mongodb:** add afterCreateConnection and afterOpenConnection hooks ([#14649](https://github.com/payloadcms/payload/issues/14649)) ([af6ba86](https://github.com/payloadcms/payload/commit/af6ba86))
* **plugin-mcp:** add localization support to MCP resource operations ([#14334](https://github.com/payloadcms/payload/issues/14334)) ([a3f490b](https://github.com/payloadcms/payload/commit/a3f490b))
* **plugin-mcp:** adds a PayloadRequest to custom tool, prompt, and resource handlers ([#14644](https://github.com/payloadcms/payload/issues/14644)) ([0d14b06](https://github.com/payloadcms/payload/commit/0d14b06))
* **ui:** extract block selector from blocks drawer ([#14697](https://github.com/payloadcms/payload/issues/14697)) ([b9b11f0](https://github.com/payloadcms/payload/commit/b9b11f0))

**Type-Safe Custom Properties** - Add augmentable interfaces for collection and global custom properties: `CollectionCustom`, `CollectionAdminCustom`, `GlobalCustom`, and `GlobalAdminCustom`. Enables type-safe plugin configuration at the collection/global level with full autocomplete support, matching the existing `FieldCustom` pattern. [#14729](https://github.com/payloadcms/payload/pull/14729)

```ts
// Augment interfaces in your plugin or project
declare module 'payload' {
  export interface CollectionAdminCustom {
    disabledFields?: string[]
  }

  export interface CollectionCustom {
    myPluginConfig?: {
      enabled: boolean
      settings: Record<string, any>
    }
  }
}

// Now get full type safety in collections
export const Posts: CollectionConfig = {
  slug: 'posts',
  admin: {
    custom: {
      disabledFields: ['status'] // ✅ Type-safe!
    }
  },
  custom: {
    myPluginConfig: {
      enabled: true,
      settings: {}
    }
  }
}
```

**Payload Instance Cache Key** - Specify `payloadInstanceCacheKey` in `handleEndpoints` and `createPayloadRequest` to control which cached Payload instance is used for custom endpoints. Useful for multi-tenant scenarios or when managing multiple Payload instances. [#14675](https://github.com/payloadcms/payload/pull/14675)

**MongoDB Connection Lifecycle Hooks (db-mongodb)** - Add `afterCreateConnection` and `afterOpenConnection` hooks to the MongoDB adapter for performing setup logic after connection/pool initialization. Enables use cases like connection pooling in serverless environments. [#14649](https://github.com/payloadcms/payload/pull/14649)

```ts
export const databaseAdapter = mongooseAdapter({
  // ...
  afterOpenConnection: async (adapter) => {
    const client = adapter.connection.getClient()
    attachDatabasePool(client);
  },
})
```

**MCP Localization Support (plugin-mcp)** - Add full localization support to MCP resource operations (create, update, find, delete). All MCP tools now accept `locale` and `fallbackLocale` parameters, bringing feature parity with Payload's REST API for multilingual content management. [#14334](https://github.com/payloadcms/payload/pull/14334)

```json
// Create content in English
{ "name": "createPosts", "arguments": { "title": "Hello", "locale": "en" }}

// Add Spanish translation
{ "name": "updatePosts", "arguments": { "id": "123", "title": "Hola", "locale": "es" }}

// Retrieve all translations
{ "name": "findPosts", "arguments": { "id": "123", "locale": "all" }}
```

**PayloadRequest in MCP Handlers (plugin-mcp)** - Custom tool, prompt, and resource handlers now receive a `PayloadRequest` object, enabling access to the Payload instance and consistent access control patterns without additional lookups. [#14644](https://github.com/payloadcms/payload/pull/14644)

```ts
// Previously
handler: async (args: Record<string, unknown>) => {}

// Now with req parameter
handler: async (args: Record<string, unknown>, req: PayloadRequest, _extra) => {
  // Access payload instance, user, locale, etc.
  const { payload, user, locale } = req
}
```

**Reusable Block Selector Component (ui)** - Extract `BlockSelector` component from `BlocksDrawer` and export for external use. Includes new `onSelect` callback for custom side effects when blocks are selected. [#14697](https://github.com/payloadcms/payload/pull/14697)

### 🐛 Bug Fixes

* trigger login hooks after reset password ([#14711](https://github.com/payloadcms/payload/issues/14711)) ([32560e9](https://github.com/payloadcms/payload/commit/32560e9))
* ensure restoreAsDraft only updates the published doc when draft is false ([#14658](https://github.com/payloadcms/payload/issues/14658)) ([3f3f5db](https://github.com/payloadcms/payload/commit/3f3f5db))
* remove init of transaction for global doc access ([#14693](https://github.com/payloadcms/payload/issues/14693)) ([c455f58](https://github.com/payloadcms/payload/commit/c455f58))
* count versions should allow querying on localized fields ([#14695](https://github.com/payloadcms/payload/issues/14695)) ([e1168a0](https://github.com/payloadcms/payload/commit/e1168a0))
* prevent upload mimeType error when useTempFiles is true ([#14689](https://github.com/payloadcms/payload/issues/14689)) ([fe8a3e8](https://github.com/payloadcms/payload/commit/fe8a3e8))
* autoRefresh not working due to stale closure and missing in client config ([#14612](https://github.com/payloadcms/payload/issues/14612)) ([8a3c6dc](https://github.com/payloadcms/payload/commit/8a3c6dc))
* type TypeWithVersion missing latest property ([#14676](https://github.com/payloadcms/payload/issues/14676)) ([9b6e1a3](https://github.com/payloadcms/payload/commit/9b6e1a3))
* graphql version error in production ([#14622](https://github.com/payloadcms/payload/issues/14622)) ([cd5b344](https://github.com/payloadcms/payload/commit/cd5b344))
* corrects outgoing localized data from afterRead ([#14603](https://github.com/payloadcms/payload/issues/14603)) ([87137fe](https://github.com/payloadcms/payload/commit/87137fe))
* relationships should not fallback if fallbackLocale is false ([#14641](https://github.com/payloadcms/payload/issues/14641)) ([9f55254](https://github.com/payloadcms/payload/commit/9f55254))
* hide turbopack warnings ([#14640](https://github.com/payloadcms/payload/issues/14640)) ([03f19bc](https://github.com/payloadcms/payload/commit/03f19bc))
* logout-inactivity route gets stuck on loading indicator when inactivity and isLoggedIn are true ([#14596](https://github.com/payloadcms/payload/issues/14596)) ([7a31c02](https://github.com/payloadcms/payload/commit/7a31c02))
* tighten up error visibility handling ([#14606](https://github.com/payloadcms/payload/issues/14606)) ([c74a40f](https://github.com/payloadcms/payload/commit/c74a40f))
* **claude:** properly structure claude plugin ([#14432](https://github.com/payloadcms/payload/issues/14432)) ([3198bbe](https://github.com/payloadcms/payload/commit/3198bbe))
* **db-*:** do not exit process on error during connect ([#14647](https://github.com/payloadcms/payload/issues/14647)) ([ab03163](https://github.com/payloadcms/payload/commit/ab03163))
* **db-mongodb,drizzle:** prevent race condition in transaction session cleanup ([#14651](https://github.com/payloadcms/payload/issues/14651)) ([a7cf30d](https://github.com/payloadcms/payload/commit/a7cf30d))
* **drizzle:** postgres 18 support ([#14700](https://github.com/payloadcms/payload/issues/14700)) ([294ebf5](https://github.com/payloadcms/payload/commit/294ebf5))
* **next:** remove turbopack build support to fix bundle size regression ([#14696](https://github.com/payloadcms/payload/issues/14696)) ([c484a05](https://github.com/payloadcms/payload/commit/c484a05))
* **next:** prevent transaction race condition in renderDocument parallel operations ([#14652](https://github.com/payloadcms/payload/issues/14652)) ([802a21a](https://github.com/payloadcms/payload/commit/802a21a))
* **plugin-multi-tenant:** fix infinite sync tenant network calls ([#14604](https://github.com/payloadcms/payload/issues/14604)) ([8901c7b](https://github.com/payloadcms/payload/commit/8901c7b))
* **richtext-lexical:** block names were not loaded ([#14698](https://github.com/payloadcms/payload/issues/14698)) ([c7a87c0](https://github.com/payloadcms/payload/commit/c7a87c0))
* **ui:** ensures modal closes on route change ([#14718](https://github.com/payloadcms/payload/issues/14718)) ([a044a08](https://github.com/payloadcms/payload/commit/a044a08))
* **ui:** query preset crash with empty filters in postgres/sqlite ([#14722](https://github.com/payloadcms/payload/issues/14722)) ([42a4384](https://github.com/payloadcms/payload/commit/42a4384))
* **ui:** app header overflow on mobile ([#14704](https://github.com/payloadcms/payload/issues/14704)) ([91d3e04](https://github.com/payloadcms/payload/commit/91d3e04))
* **ui:** shows minRowsProp instead of minRows ([#14681](https://github.com/payloadcms/payload/issues/14681)) ([e40a4b7](https://github.com/payloadcms/payload/commit/e40a4b7))
* **ui:** publish label regression from 14690 ([#14692](https://github.com/payloadcms/payload/issues/14692)) ([ba5834b](https://github.com/payloadcms/payload/commit/ba5834b))
* **ui:** publish button shows locale-specific text without localized fields ([#14690](https://github.com/payloadcms/payload/issues/14690)) ([caf68e4](https://github.com/payloadcms/payload/commit/caf68e4))
* **ui:** equals filter shows no results when value is cleared ([#14673](https://github.com/payloadcms/payload/issues/14673)) ([220a18f](https://github.com/payloadcms/payload/commit/220a18f))
* **ui:** select/relationship field values have no tooltip on hover ([#14662](https://github.com/payloadcms/payload/issues/14662)) ([bc23084](https://github.com/payloadcms/payload/commit/bc23084))
* **ui:** bulk uploads silently skips files without filenames ([#14621](https://github.com/payloadcms/payload/issues/14621)) ([8f14359](https://github.com/payloadcms/payload/commit/8f14359))
* **ui:** relationship field label not updated when document is updated from other drawer ([#14609](https://github.com/payloadcms/payload/issues/14609)) ([0cc06a1](https://github.com/payloadcms/payload/commit/0cc06a1))
* **ui:** duplicate should duplicate as draft by default ([#14619](https://github.com/payloadcms/payload/issues/14619)) ([fb05840](https://github.com/payloadcms/payload/commit/fb05840))

### ⚡ Performance

* up to 5000% faster permissions calculation ([#14631](https://github.com/payloadcms/payload/issues/14631)) ([0d9ec91](https://github.com/payloadcms/payload/commit/0d9ec91))
* **plugin-mcp:** removes 'override' config ([#14598](https://github.com/payloadcms/payload/issues/14598)) ([89ab526](https://github.com/payloadcms/payload/commit/89ab526))

### 🛠 Refactors

* **db-mongodb,drizzle:** reduce race condition window between retrieving and using a session ([#14653](https://github.com/payloadcms/payload/issues/14653)) ([bd9f15f](https://github.com/payloadcms/payload/commit/bd9f15f))
* **ui:** strongly type render-list server action ([#14611](https://github.com/payloadcms/payload/issues/14611)) ([337409b](https://github.com/payloadcms/payload/commit/337409b))

### 📚 Documentation

* clarify draft parameter and _status field interaction ([#14723](https://github.com/payloadcms/payload/issues/14723)) ([00d9156](https://github.com/payloadcms/payload/commit/00d9156))
* add info about imports and ui best practices ([#14702](https://github.com/payloadcms/payload/issues/14702)) ([38f370a](https://github.com/payloadcms/payload/commit/38f370a))
* adds examples for sending email attachments ([#14665](https://github.com/payloadcms/payload/issues/14665)) ([61547f9](https://github.com/payloadcms/payload/commit/61547f9))
* updates node version in docker file ([#14664](https://github.com/payloadcms/payload/issues/14664)) ([276685d](https://github.com/payloadcms/payload/commit/276685d))

### 🧪 Tests

* deflakes localization e2e suite ([#14639](https://github.com/payloadcms/payload/issues/14639)) ([6e364fa](https://github.com/payloadcms/payload/commit/6e364fa))
* fix auth e2e test suite flakiness ([#14655](https://github.com/payloadcms/payload/issues/14655)) ([78d5be6](https://github.com/payloadcms/payload/commit/78d5be6))
* adjust test targeting to wait for input ([#14614](https://github.com/payloadcms/payload/issues/14614)) ([36f3cad](https://github.com/payloadcms/payload/commit/36f3cad))
* fix flaky toast assertions in draft validation tests ([#14615](https://github.com/payloadcms/payload/issues/14615)) ([62508ca](https://github.com/payloadcms/payload/commit/62508ca))

### 🏡 Chores

* getLocalizedPaths should filter fields with locale-like names ([#14661](https://github.com/payloadcms/payload/issues/14661)) ([fd7c94c](https://github.com/payloadcms/payload/commit/fd7c94c))
* updates MCP docs ([#14625](https://github.com/payloadcms/payload/issues/14625)) ([61c61fe](https://github.com/payloadcms/payload/commit/61c61fe))
* **claude:** further improve payload skill ([#14705](https://github.com/payloadcms/payload/issues/14705)) ([89be107](https://github.com/payloadcms/payload/commit/89be107))
* **db-mongodb:** export `transform` function ([#14677](https://github.com/payloadcms/payload/issues/14677)) ([51898f5](https://github.com/payloadcms/payload/commit/51898f5))

### ⚠️ BREAKING CHANGES

* **plugin-mcp:** removes 'override' config ([#14598](https://github.com/payloadcms/payload/issues/14598)) ([89ab526](https://github.com/payloadcms/payload/commit/89ab526))

  - Removes `override` from the plugin config
  - Updates documentation



### 🤝 Contributors

- Patrik (@PatrikKozak)
- MrLijan (@MrLijan)
- Jessica Rynkar (@jessrynkar)
- Alessio Gravili (@AlessioGr)
- Paul (@paulpopus)
- Sean Zubrickas (@zubricks)
- Elliot DeNolf (@denolfe)
- Jacob Fletcher (@jacobsfletch)
- Violet Rosenzweig (@6TELOIV)
- Kendell (@kendelljoseph)
- Dan Ribbens (@DanRibbens)
- Steven Ceuppens (@stevenceuppens)
- Jarrod Flesch (@JarrodMFlesch)
- Sasha (@r1tsuu)
- Zvonimir Bušić (@ZvonimirBusic)