Fumadocs doesn't have a built-in Mermaid wrapper provided, instead you can try different approaches easily.
@theguild/remark-mermaid
converts codeblocks to JSX elements using MDX and render them in a React component. It renders the graph on client side.
Add their remark plugin, for example (in Fumadocs MDX):