There's a [release candidate for MDX v2 support](https://github.com/gatsbyjs/gatsby/discussions/25068). Docs: https://github.com/gatsbyjs/gatsby/blob/feat/mdx-v2/packages/gatsby-plugin-mdx/README.md.