Launch Week II Day 3: Open Source MDX Engine
January 10, 2024
Hahnbee Lee
Co-Founder
Share this article

Launch Week II Day 3 open-sourced Mintlify's MDX Engine, providing two APIs: getCompiledMdx for server-side MDX compilation and MDXComponent for HTML rendering. This open-source package enables developers to integrate Mintlify-flavored markdown and code syntax highlighting into their own projects, supporting the community while maintaining active development and contributions.
Day 2 of Launch Week 2 brings open-sourcing Mintlify's MDX Engine 🚀.
It exposes two APIs:
- getCompiledMdx
- This function takes in your MDX content and converts it into an object that the MDXComponent can understand to render properly. This works on the server side of Next.js.
- MDXComponent
- This component takes in the object returned by the `getCompiledMdx` function and renders HTML.
Why it matters
At Mintlify, we believe that focusing on the developer experience is essential for creating exceptional documentation.
We've discovered that members of our community are interested in using our engine for their own projects.
You can now integrate our package to access Mintlify-flavored markdown and code syntax highlighting. If you're developing a new blog in 2024, consider giving our engine a try 🚂.
We welcome contributions to the project— our team is committed to actively maintaining a roadmap and is open to your suggestions. We're excited to see all the projects that will utilize our engine!
Getting started
You can directly access the NPM package here to kickstart using the MDX Engine.
Installation
# using npm
npm i @mintlify/mdx
# using yarn
yarn add @mintlify/mdx
Using the Engine
1. Call the `getCompiledMdx` function inside `getStaticProps` and return the `mdxSource` object.
export const getStaticProps = (async () => {
 const mdxSource = await getCompiledMdx({
  source: '## Markdown H2',
 });
 return {
  props: {
   mdxSource,
  },
 };
}) satisfies GetStaticProps<{
 mdxSource: MDXRemoteSerializeResult;
}>;
1. Pass the `mdxSource` object as props inside the `MDXComponent`.
export default function Page({
 mdxSource,
}: InferGetStaticPropsType<typeof getStaticProps>) {
 return <MDXComponent {...mdxSource} />;
}
Full Example
import { getCompiledMdx, MDXComponent } from '@mintlify/mdx';
import type { InferGetStaticPropsType, GetStaticProps } from 'next';
import type { MDXRemoteSerializeResult } from '@mintlify/mdx';
import React from 'react';
export const getStaticProps = (async () => {
 const mdxSource = await getCompiledMdx({
  source: '## Markdown H2',
 });
 return {
  props: {
   mdxSource,
  },
 };
}) satisfies GetStaticProps<{
 mdxSource: MDXRemoteSerializeResult;
}>;
export default function Page({
 mdxSource,
}: InferGetStaticPropsType<typeof getStaticProps>) {
 return <MDXComponent {...mdxSource} />;
}
That's a wrap for Day 3 of Launch Week! Follow our Twitter or join the community to stay tuned for the rest of this week's launches 😊
More blog posts to read

How Mintlify uses Claude Code as a technical writing assistant
As the sole technical writer at Mintlify, I'm always looking for ways to improve my workflows and empower other people on my team to contribute to the docs. I also want to take a vacation without blocking docs ships for a week and a half.
August 19, 2025Ethan Palm
Technical Writing

AI Documentation Trends: What's Changing in 2025
Coming into 2025, there were a number of predictions as to how AI would impact what we do and how we do it. And just halfway through the year, those predictions are already reshaping our daily tools and practices faster than anyone expected, across nearly every domain.
August 6, 2025Emma Adler
Contributor @ Hackmamba
Hahnbee Lee
Co-Founder