github payloadcms/payload v3.77.0

8 hours ago

v3.77.0 (2026-02-18)

๐Ÿš€ Features

  • pass local API depth through to req.query.depth for consistency (#15023) (9a38469)
  • db-*: add customID arg to db.create (#15653) (0935824)
  • plugin-mcp: migrate from @vercel/mcp-adapter to mcp-handler (#15661) (24025fd)

Feature Details

Local API Depth Consistency - The depth option passed to Local API calls like payload.find() is now automatically set on req.query.depth. Previously, hooks relying on req.query.depth would behave differently between Local API and REST/GraphQL calls unless you manually passed req: { query: { depth: x } } in addition to depth: x. This change ensures consistent behavior across all API methods. #15023

Custom ID Support in db.create (db-*) - New customID argument on payload.db.create allows creating documents with a specific ID without requiring a custom ID field in your collection schema. #15653

payload.db.create({ collection: 'posts', customID: 'ce98d6c4-c3ab-45de-9dfc-bf33d94cc941', data: { } })

MCP Plugin Migration (plugin-mcp) - Migrates from the deprecated @vercel/mcp-adapter to mcp-handler and bumps @modelcontextprotocol/sdk to 1.25.2 addressing a security vulnerability. Exposes new handler options: disableSse, onEvent, and redisUrl. #15661

import { mcpPlugin } from '@payloadcms/plugin-mcp'

export default buildConfig({
  plugins: [
    mcpPlugin({
      // Optional: Enable SSE transport (disabled by default)
      disableSse: false,
      // Optional: Redis URL for SSE session management (defaults to REDIS_URL env)
      redisUrl: 'redis://localhost:6379',
      // Optional: Track MCP events for analytics/debugging
      onEvent: (event) => {
        console.log('MCP event:', event)
      },
    }),
  ],
})

๐Ÿ› Bug Fixes

  • hasMany text fields cannot be filtered with contains operator (#15671) (4513a05)
  • use consistent empty state styling between list and folder views (#15555) (8953b37)
  • populate previousValue correctly in afterChange hooks for nested lexical fields (#15623) (1cc3bb9)
  • add i18n support for dashboard edit mode buttons (#15564) (818e31d)
  • next: handle undefined fieldTab in version diff tabs (#15590) (bbacab8)
  • plugin-cloud-storage: ensure file data persists across operations (#15570) (6af3673)
  • plugin-cloud-storage: generateFileURL only ran when disablePayloadAccessControl was true (#15667) (6c5611c)
  • plugin-import-export: remove deprecated import (#15666) (733b1df)
  • plugin-import-export: export and import issues when using custom IDs (#15518) (7e2a3ab)
  • plugin-import-export: columns being duplicated when using toCSV hook (#15597) (28e07dc)
  • plugin-mcp: resolve union type fields failing in update tool (#15660) (9ae89dd)
  • plugin-multi-tenant: improve translation for "Tenant" (use "Mandant" instead of "Mieter") (#15537) (4d4033b)
  • plugin-multi-tenant: tenant selector not appearing after login (#15617) (dd09f67)
  • storage-r2: build error due to types issue in R2 Bucket type (#15670) (7d1e233)
  • ui: fix broken polymorphic join edit drawer (#15621) (d450e99)

๐Ÿ“š Documentation

๐Ÿงช Tests

  • trash e2e tests check URL before navigation completes (#15599) (7fe5a8c)

๐Ÿก Chores

  • add md and mdx language block linting (#15309) (5415516)
  • bump playwright to fix vscode run test indicators (#15626) (f74d288)
  • only add publishAllLocales to publish when localizeStatus is enabled (#15610) (d57bc22)

๐Ÿค Contributors

Don't miss a new payload release

NewReleases is sending notifications on new releases.