---
title: .md Extension
description: Access documentation pages as raw Markdown by appending .md or .mdx to any URL
type: conceptual
summary: Access any documentation page as raw Markdown by appending .md or .mdx to the URL for AI tool consumption.
related:
  - /docs/agent-readiness
  - /docs/llms-txt
  - /docs/proxy
---

# .md Extension



Geistdocs lets AI tools and language models access documentation pages as plain Markdown. Append `.md` or `.mdx` to a documentation URL to get the processed Markdown content for that page.

<CopyPrompt text="Help me test raw Markdown routes in this Geistdocs project. Fetch a docs page with .mdx appended, compare it to the rendered page, and explain how AI tools can use it.">
  Help me test raw Markdown routes in this Geistdocs project. Fetch a docs page with `.mdx` appended, compare it to the rendered page, and explain how AI tools can use it.
</CopyPrompt>

## How it works

When you add `.md` or `.mdx` to a documentation URL, Geistdocs returns the page content as Markdown instead of rendered HTML. AI tools can use that response as focused context for one page.

### Example

```
# Normal page
https://yourdomain.com/docs/getting-started

# Markdown version
https://yourdomain.com/docs/getting-started.mdx
```

The `.mdx` version returns:

* The page title as an H1 heading
* The full processed Markdown content
* No HTML, styling, or navigation

## Use cases

This feature is particularly useful for:

* **AI Chat Tools** - Tools like ChatGPT, Claude, and Cursor can fetch and read your docs
* **LLM Context** - Provides clean text for language model prompts
* **Documentation Analysis** - Extract content for processing or analysis
* **Content Migration** - Export documentation in a clean format

## Implementation

The package proxy routes `.md` and `.mdx` requests to the package-backed markdown route handler:

```ts title="proxy.ts"
const proxy = createProxy({
  config: geistdocsConfig,
  markdownRoutes: [
    { from: "/docs/*path", to: "/[lang]/llms.mdx/*path" },
  ],
});
```

The destination route uses `createDocsMarkdownRoute` to process the page and return Markdown with a `text/markdown` content type:

```ts title="app/[lang]/llms.mdx/[[...slug]]/route.ts"
import { createDocsMarkdownRoute } from "@vercel/geistdocs/routes/llms";
import { geistdocsSource } from "@/lib/geistdocs/source";

export const { GET, generateStaticParams, revalidate } =
  createDocsMarkdownRoute({
    sources: [geistdocsSource],
  });
```

Read [Proxy and markdown routes](/docs/proxy) to configure additional route families such as `/cookbook` or `/v5/docs`.

## Response Format

The response includes:

* Content-Type: `text/markdown`
* The page title as a level 1 heading
* Processed Markdown content from Fumadocs

All MDX components are processed and converted to plain Markdown equivalents.


---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)