Looking to contribute to MDCMS itself? See Development
Setup.
1. Install the CLI
2. Initialize your project
Themdcms init wizard configures everything — server connection, project/environment selection, content type detection, and initial sync:
- Ask for your MDCMS server URL
- Open a browser for authentication
- Scan your repo for existing Markdown/MDX files
- Generate a
mdcms.config.tswith inferred content types - Push the initial schema and content to the server
3. Define your content schema
The generatedmdcms.config.ts is your starting point. Customize it to match your content model:
mdcms.config.ts
4. Sync schema and content
5. Fetch content in your app
Install the SDK:6. Embed the Studio UI (optional)
Add a visual editing interface to your app by installing@mdcms/studio and mounting it on a catch-all route:
app/admin/[[...path]]/page.tsx
app/admin/[[...path]]/admin-studio-client.tsx
prepareStudioConfig runs on the server, where the full mdcms.config.ts is available, and computes the schema hash Studio needs before it allows edits. Pass only these plain values to the client component: the full config holds Zod schemas and functions that cannot cross the server/client boundary. Do not use createStudioEmbedConfig for an editing Studio: it carries no schema hash, so every document opens read-only.
For the full setup — including MDX component registration, authentication, CORS configuration, and production hardening — see the Integration Guide.
Next steps
CLI Commands
Push, pull, login, schema sync, and all CLI flags
Schema Guide
Field types, references, environment overlays, MDX components
Studio Guide
Visual content editing, publishing, and version history
SDK Reference
Full typed client API for content reads