Everything you need to add content negotiation to your Next.js app. Serve markdown to LLMs and HTML to humans — from the same URL.
Install, initialize, and serve your first markdown route in under 2 minutes.
HTTP content negotiation, Accept headers, route patterns, and the request flow.
How content negotiation preserves crawling budget and avoids duplicate content penalties.
md.config.ts, route patterns, handler functions, integration strategies, and options.
Make your markdown endpoints discoverable to AI agents with the LlmHint component.
Complete reference for every function, component, type, and CLI command.
HTTP has a built-in mechanism for content negotiation: the Accept header. When an LLM agent requests a page with Accept: text/markdown, next-md-negotiate intercepts the request and returns a markdown version instead of the normal HTML page.
The key insight: no new URLs are created. The same URL serves both formats. This means zero impact on your sitemap, zero duplicate content, and zero wasted crawling budget.