Overview
A documentation framework that serves the same content to readers and to AI agents. A folder of Markdown or MDX becomes a searchable site backed by Postgres, with navigation and titles taken from your files, frontmatter and an optional meta.json; one .mdx file is already a site. An optional docs.json carries colours, fonts, navigation, redirects, versions and OpenAPI pages and is compatible with Mintlify's docs.json, with Margin's own settings under an x-margin key, so moving an existing Mintlify docs tree over is mostly a copy. The agent side is the reason it is here: every page has a Markdown and a PDF twin, there is an llms.txt, an MCP server, skills and an optional AI assistant, plus documented link relations for agents. Safety and deployment are explicit: MDX is validated at ingest and server-rendered in an isolate with no host access, and each commit becomes its own immutable content version so previews and rollbacks serve exactly what was built. It is built with TanStack Start, fumadocs and Postgres. One-click deploy to Vercel provisions a Neon Postgres database and asks only for a SITE_NAME; outside Vercel the required environment variables are DATABASE_URL and SITE_ORIGIN. Running locally needs Bun, Node.js 24 or newer and Docker. Flags: it is early (22 stars, created 2026-11-09) and Postgres is a hard dependency, so this is heavier than a static docs generator. Licence Apache-2.0, originally built by Manicule.
Quick summary. This page gives a short overview of this tool. For installation steps, full documentation and the latest changes, read the official source; details such as features and versions can change there first.
Example prompts example
Illustrative examples written by FoxaMind's AI Trends Scout — not quoted from the source.
- Start without docs.json: files and frontmatter already define navigation and titles.
- Coming from Mintlify, keep your docs.json and put Margin-only settings under x-margin.
- Read docs/agents/overview.mdx for what agents get: Markdown and PDF twins, LLM indexes, MCP and skills.